/usr/share/doc/autogen/html/autogen_6.html is in autogen 1:5.18-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual is for GNU AutoGen version 5.18, updated July 2013.
Copyright C 1992-2013 by Bruce Korb.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
-->
<!-- Created on December 14, 2013 by texi2html 1.82
texi2html was written by:
Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>GNU AutoGen - The Automated Program Generator: 6. Configuring and Installing</title>
<meta name="description" content="GNU AutoGen - The Automated Program Generator: 6. Configuring and Installing">
<meta name="keywords" content="GNU AutoGen - The Automated Program Generator: 6. Configuring and Installing">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Installation"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="autogen_5.html#autogen-Examples" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#configuring" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen_5.html#autogen-Invocation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Configuring-and-Installing"></a>
<h1 class="chapter">6. Configuring and Installing</h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#configuring">6.1 Configuring AutoGen</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#AutoGen-CGI">6.2 AutoGen as a CGI server</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#signal-names">6.3 Signal Names</a></td><td> </td><td align="left" valign="top"></td></tr>
<tr><td align="left" valign="top"><a href="#installing">6.4 Installing AutoGen</a></td><td> </td><td align="left" valign="top"></td></tr>
</table>
<hr size="6">
<a name="configuring"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Installation" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#AutoGen-CGI" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Installation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Installation" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Configuring-AutoGen"></a>
<h2 class="section">6.1 Configuring AutoGen</h2>
<a name="index-configuring"></a>
<p>AutoGen is configured and built using Libtool, Automake and Autoconf.
Consequently, you can install it wherever you wish using the ‘<samp>--prefix</samp>’
and other options. To the various configuration options supplied by these
tools, AutoGen adds a few of its own:
</p>
<dl compact="compact">
<dt> ‘<samp>--disable-shell</samp>’</dt>
<dd><p>AutoGen is now capable of acting as a CGI forms server, See section <a href="#AutoGen-CGI">AutoGen as a CGI server</a>.
As such, it will gather its definitions using either ‘<samp>GET</samp>’ or
‘<samp>POST</samp>’ methods. All you need to do is have a template named
‘<tt>cgi.tpl</tt>’ handy or specify a different one with a command line
option.
</p>
<p>However, doing this without disabling the server shell brings
considerable risk. If you were to pass user input to a script
that contained, say, the classic "‘<samp>`rm -rf /`</samp>’", you might have
a problem. This configuration option will cause shell template
commands to simply return the command string as the result.
No mistakes. Much safer. Strongly recommended.
The default is to have server shell scripting enabled.
</p>
<p>Disabling the shell will have some build side effects, too.
</p>
<ul>
<li>
Many of the make check tests will fail, since they assume
a working server shell.
</li><li>
The getdefs and columns programs are not built.
The options are distributed as definition files and they
cannot be expanded with a shell-disabled AutoGen.
</li><li>
Similarly, the documentation cannot be regenerated because
the documentation templates depend on subshell functionality.
</li></ul>
</dd>
<dt> ‘<samp>--enable-debug</samp>’</dt>
<dd><p>Turning on AutoGen debugging enables very detailed inspection of
the input definitions and monitoring shell script processing.
These options are not particularly useful to anyone not directly
involved in maintaining AutoGen. If you do choose to enable AutoGen
debugging, be aware that the usage page was generated without these
options, so when the build process reaches the documentation rebuild,
there will be a failure. ‘<samp>cd</samp>’ into the ‘<tt>agen5</tt>’ build
directory, ‘<samp>make</samp>’ the ‘<samp>autogen.texi</samp>’ file and all will
be well thereafter.
</p>
</dd>
<dt> ‘<samp>--with-regex-header</samp>’</dt>
<dt> ‘<samp>--with-header-path</samp>’</dt>
<dt> ‘<samp>--with-regex-lib</samp>’</dt>
<dd><p>These three work together to specify how to compile with and link to a
particular POSIX regular expression library. The value for
‘<tt>--with-regex-header=value</tt>’ must be the name of the relevant header file.
The AutoGen sources will attempt to include that source with a
<code>#include <value></code> C preprocessing statement. The <var>path</var> from the
‘<samp>--with-header-path=path</samp>’ will be added to <code>CPPFLAGS</code> as
‘<samp>-Ipath</samp>’. The <var>lib-specs</var> from ‘<samp>--with-regex-lib=lib-specs</samp>’
will be added to <code>LDFLAGS</code> without any adornment.
</p></dd>
</dl>
<hr size="6">
<a name="AutoGen-CGI"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#configuring" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#signal-names" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Installation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Installation" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="AutoGen-as-a-CGI-server"></a>
<h2 class="section">6.2 AutoGen as a CGI server</h2>
<p>AutoGen is now capable of acting as a CGI forms server.
It behaves as a CGI server if the definitions input is from stdin
and the environment variable <code>REQUEST_METHOD</code> is defined
and set to either "GET" or "POST". If set to anything else,
AutoGen will exit with a failure message. When set to one of those
values, the CGI data will be converted to AutoGen definitions
(see section <a href="autogen_2.html#Definitions-File">Definitions File</a>) and the template named "‘<tt>cgi.tpl</tt>’"
will be processed.
</p>
<p>This works by including the name of the real template to process
in the form data and having the "‘<tt>cgi.tpl</tt>’" template include
that template for processing. I do this for processing the form
<a href="http://autogen.sourceforge.net/conftest.html">http://autogen.sourceforge.net/conftest.html</a>. The "‘<tt>cgi.tpl</tt>’"
looks approximately like this:
</p>
<table><tr><td> </td><td><pre class="example"><? AutoGen5 Template ?>
<?
IF (not (exist? "template")) ?><?
form-error ?><?
ELIF (=* (get "template") "/") ?><?
form-error ?><?
ELIF (define tpl-file (string-append "cgi-tpl/"
(get "template")))
(access? tpl-file R_OK) ?><?
INCLUDE (. tpl-file) ?><?
ELIF (set! tpl-file (string-append tpl-file ".tpl"))
(access? tpl-file R_OK) ?><?
INCLUDE (. tpl-file) ?><?
ELSE ?><?
form-error ?><?
ENDIF ?>
</pre></td></tr></table>
<p>This forces the template to be found in the "‘<tt>cgi-tpl/</tt>’"
directory. Note also that there is no suffix specified in the
pseudo macro (see section <a href="autogen_3.html#pseudo-macro">Format of the Pseudo Macro</a>). That tells AutoGen to emit
the output to ‘<tt>stdout</tt>’.
</p>
<p>The output is actually spooled until it is complete so that,
in the case of an error, the output can be discarded and a proper
error message can be written in its stead.
</p>
<p><strong>Please also note</strong> that it is advisable, <em>especially</em> for network
accessible machines, to configure AutoGen (see section <a href="#configuring">Configuring AutoGen</a>) with
shell processing disabled (‘<samp>--disable-shell</samp>’). That will make it
impossible for any referenced template to hand data to a subshell for
interpretation.
</p>
<hr size="6">
<a name="signal-names"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#AutoGen-CGI" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#installing" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Installation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Installation" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Signal-Names"></a>
<h2 class="section">6.3 Signal Names</h2>
<a name="index-Signal-Names"></a>
<p>When AutoGen is first built, it tries to use <code>psignal(3)</code>,
<code>sys_siglist</code>, <code>strsigno(3)</code> and <code>strsignal(3)</code> from the
host operating system. If your system does not supply these, the
AutoGen distribution will. However, it will use the distributed mapping
and this mapping is unlikely to match what your system uses. This can
be fixed. Once you have installed autogen, the mapping can be rebuilt
on the host operating system. To do so, you must perform the
following steps:
</p>
<ol>
<li>
Build and install AutoGen in a place where it will be found in your
search path.
</li><li>
‘<tt>cd ${top_srcdir}/compat</tt>’
</li><li>
‘<samp>autogen strsignal.def</samp>’
</li><li>
Verify the results by examining the ‘<tt>strsignal.h</tt>’ file produced.
</li><li>
Re-build and re-install AutoGen.
</li></ol>
<p>If you have any problems or peculiarities that cause this process to
fail on your platform, please send me copies of the header files
containing the signal names and numbers, along with the full path names
of these files. I will endeavor to fix it. There is a shell script
inside of ‘<tt>strsignal.def</tt>’ that tries to hunt down the information.
</p>
<hr size="6">
<a name="installing"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#signal-names" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#Installation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#Installation" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Installing-AutoGen"></a>
<h2 class="section">6.4 Installing AutoGen</h2>
<a name="index-Installing"></a>
<p>There are several files that get installed. The number depend
whether or not both shared and archive libraries are to be
installed. The following assumes that everything is installed
relative to <code>$prefix</code>. You can, of course, use
<code>configure</code> to place these files where you wish.
</p>
<p><strong>NB</strong> AutoGen does not contain any compiled-in path names.
All support directories are located via option processing,
the environment variable <code>HOME</code> or finding the directory where
the executable came from.
</p>
<p>The installed files are:
</p>
<ol>
<li>
The executables in ‘<tt>bin</tt>’ (autogen, getdefs and columns).
</li><li>
The AutoOpts link libraries as ‘<tt>lib/libopts.*</tt>’.
</li><li>
An include file in ‘<tt>include/options.h</tt>’, needed for
Automated Option Processing (see next chapter).
</li><li>
Several template files and a scheme script in ‘<tt>share/autogen</tt>’, needed
for Automated Option Processing (see section <a href="autogen_7.html#AutoOpts">Automated Option Processing</a>), parsing definitions
written with scheme syntax (see section <a href="autogen_2.html#Dynamic-Text">Dynamic Text</a>), the templates for
producing documentation for your program (see section <a href="autogen_7.html#documentation-attributes">Man and Info doc Attributes</a>),
autoconf test macros, and AutoFSM.
</li><li>
Info-style help files as ‘<tt>info/autogen.info*</tt>’.
These files document AutoGen, the option processing
library AutoOpts, and several add-on components.
</li><li>
The three man pages for the three executables are installed in man/man1.
</li></ol>
<p>This program, library and supporting files can be installed
with three commands:
</p>
<ul>
<li>
<src-dir>/configure [ <configure-options> ]
</li><li>
make
</li><li>
make install
</li></ul>
<p>However, you may wish to insert ‘<samp>make check</samp>’
before the ‘<samp>make install</samp>’ command.
</p>
<p>If you do perform a ‘<samp>make check</samp>’ and there are any failures, you
will find the results in ‘<tt><module>/test/FAILURES</tt>’. Needless to say, I
would be interested in seeing the contents of those files and any
associated messages. If you choose to go on and analyze one of these
failures, you will need to invoke the test scripts individually. You
may do so by specifying the test (or list of test) in the TESTS make
variable, thus:
</p>
<table><tr><td> </td><td><pre class="example">gmake TESTS=test-name.test check
</pre></td></tr></table>
<p>I specify <code>gmake</code> because most makes will not let you override
internal definitions with command line arguments. <code>gmake</code> does.
</p>
<p>All of the AutoGen tests are written to honor the contents of the
<tt>VERBOSE</tt> environment variable. Normally, any commentary generated
during a test run is discarded unless the <tt>VERBOSE</tt> environment
variable is set. So, to see what is happening during the test, you
might invoke the following with <i>bash</i> or <i>ksh</i>:
</p>
<table><tr><td> </td><td><pre class="example">VERBOSE=1 gmake TESTS="for.test forcomma.test" check
</pre></td></tr></table>
<p>Or equivalently with <i>csh</i>:
</p>
<table><tr><td> </td><td><pre class="example">env VERBOSE=1 gmake TESTS="for.test forcomma.test" check
</pre></td></tr></table>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Installation" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="autogen.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="autogen_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="autogen_7.html#AutoOpts" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="autogen_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>Build Daemon user</em> on <em>December 14, 2013</em> using <a href="http://www.nongnu.org/texi2html/"><em>texi2html 1.82</em></a>.
</font>
<br>
</p>
</body>
</html>
|