home *** CD-ROM | disk | FTP | other *** search
/ Solo Programadores 21 / SOLOPROG21.iso / utillnux / info-htm / configur.000 < prev    next >
Encoding:
Text File  |  1996-04-02  |  81.9 KB  |  1,845 lines

  1. <HTML>
  2. <HEAD>
  3. <!-- This HTML file has been created by TEXI.HTM 1.31
  4.      from /usr/src/devel/gnats-3.2/etc/configure.texi on 9 June 1995 -->
  5.  
  6. <TITLE>Cygnus configure</TITLE>
  7. </HEAD>
  8. <BODY>
  9. <H1>Cygnus configure</H1>
  10. <P>
  11. <A NAME="IDX1"></A>
  12. <P>
  13. Edited January, 1993, by Jeffrey Osier, Cygnus Support.
  14. <P>
  15. Copyright (C) 1991, 1992, 1993 Cygnus Support
  16. <P>
  17. Permission is granted to make and distribute verbatim copies of
  18. this manual provided the copyright notice and this permission notice
  19. are preserved on all copies.
  20. <P>
  21. Permission is granted to copy and distribute modified versions of this
  22. manual under the conditions for verbatim copying, provided that the entire
  23. resulting derived work is distributed under the terms of a permission
  24. notice identical to this one.
  25. <P>
  26. Permission is granted to copy and distribute translations of this manual
  27. into another language, under the above conditions for modified versions,
  28. except that this permission notice may be stated in a translation approved
  29. by Cygnus Support.
  30. <P>
  31. <A NAME="IDX2"></A>
  32. <A NAME="IDX3"></A>
  33. <A NAME="IDX4"></A>
  34. <A NAME="IDX5"></A>
  35. <H1><A NAME="SEC1" HREF="CONFIGUR.HTM#SEC1">What <CODE>configure</CODE> does</A></H1>
  36. <P>
  37. This manual documents Cygnus <CODE>configure</CODE>, a program which helps to
  38. automate much of the setup activity associated with building large suites of
  39. programs, such the Cygnus Support Developer's Kit.  This manual is therefore
  40. geared toward readers who are likely to face the problem of configuring
  41. software in source form before compiling and installing it.  We assume you are
  42. an experienced programmer or system administrator.
  43. For further background on this topic, see <CITE>On Configuring Development
  44. Tools</CITE> by K. Richard Pixley.
  45. <P>
  46. When <CODE>configure</CODE> runs, it does the following things:
  47. <P>
  48. <DL COMPACT>
  49. <A NAME="IDX6"></A>
  50. <A NAME="IDX7"></A>
  51. <A NAME="IDX8"></A>
  52. <DT><EM>* creates build directories</EM>
  53. <DD>When you run <CODE>configure</CODE> with the <SAMP>`--srcdir'</SAMP> option, it uses the
  54. current directory as the <DFN>build directory</DFN>, creating under it a directory
  55. tree that parallels the directory structure of the source directory.  If you
  56. don't specify a <SAMP>`srcdir'</SAMP>, <CODE>configure</CODE> first assumes that the source
  57. code you wish to configure is in your current directory; if it finds no
  58. <TT>`configure.in'</TT> input file there, it searches in the directory
  59. <CODE>configure</CODE> itself lies in.  (For details, see section <A HREF="CONFIGUR.000#SEC6">Build directories</A>.)
  60.  
  61. <A NAME="IDX9"></A>
  62. <DT><EM>* generates <TT>`Makefile'</TT></EM>
  63. <DD>A <TT>`Makefile'</TT> template from the source directory, usually called
  64. <TT>`Makefile.in'</TT>, is copied to an output file in the build directory which is
  65. most often named <TT>`Makefile'</TT>.  <CODE>configure</CODE> places definitions for a
  66. number of standard <TT>`Makefile'</TT> macros at the beginning of the output file.
  67. If <SAMP>`--prefix=<VAR>dir</VAR>'</SAMP> or <SAMP>`--exec_prefix=<VAR>dir</VAR>'</SAMP> are
  68. specified on the <CODE>configure</CODE> command line, corresponding <TT>`Makefile'</TT>
  69. variables are set accordingly.  If host, target, or site-specific
  70. <TT>`Makefile'</TT> fragments exist, these are inserted into the output file.  (For
  71. details, see section <A HREF="CONFIGUR.000#SEC7"><CODE>Makefile</CODE> generation</A>.)
  72.  
  73. <A NAME="IDX10"></A>
  74. <DT><EM>* generates <TT>`.gdbinit'</TT></EM>
  75. <DD>If the source directory contains a <TT>`.gdbinit'</TT> file and the build directory
  76. is not the same as the source directory, a <TT>`.gdbinit'</TT> file is created in
  77. the build directory.  This <TT>`.gdbinit'</TT> file contains commands which allow
  78. the source directory to be read when debugging with the GNU debugger,
  79. <CODE>gdb</CODE>.  (See section `Command Files' in <CITE>Debugging With GDB</CITE>.)
  80.  
  81. <A NAME="IDX11"></A>
  82. <DT><EM>* makes symbolic links</EM>
  83. <DD>Most build directories require that some symbolic links with generic names are
  84. built pointing to specific files in the source directory.  If the system where
  85. <CODE>configure</CODE> runs cannot support symbolic links, hard links are used
  86. instead.  (For details, see section <A HREF="CONFIGUR.000#SEC10">The <CODE>configure.in</CODE> input file</A>.)
  87.  
  88. <A NAME="IDX12"></A>
  89. <DT><EM>* generates <TT>`config.status'</TT></EM>
  90. <DD><CODE>configure</CODE> creates a shell script named <TT>`config.status'</TT> in the build
  91. directory.  This shell script, when run from the build directory (usually from
  92. within a <TT>`Makefile'</TT>), will reconfigure the build directory (but not its
  93. subdirectories).  This is most often used to have a <TT>`Makefile'</TT> update
  94. itself automatically if a new source directory is available.
  95.  
  96. <A NAME="IDX13"></A>
  97. <DT><EM>* calls itself recursively</EM>
  98. <DD>If the source directory has subdirectories that should also be configured,
  99. <CODE>configure</CODE> is called for each.  
  100. </DL>
  101. <P>
  102. <A NAME="IDX14"></A>
  103. <A NAME="IDX15"></A>
  104. <H1><A NAME="SEC2" HREF="CONFIGUR.HTM#SEC2">Invoking <CODE>configure</CODE></A></H1>
  105. <P>
  106. Cygnus <CODE>configure</CODE> is a shell script which resides in a source tree.  The
  107. usual way to invoke <CODE>configure</CODE> is from the shell, as follows:
  108. <A NAME="IDX16"></A>
  109. <P>
  110. <PRE>
  111. eg$ ./configure <VAR>hosttype</VAR>
  112. </PRE>
  113. <P>
  114. This prepares the source in the current directory (<TT>`.'</TT>) to be
  115. compiled for a <VAR>hosttype</VAR> environment.  It assumes that you wish to
  116. build programs and files in the default <DFN>build directory</DFN> (also the
  117. current directory, <TT>`.'</TT>).  If you do not specify a value for
  118. <VAR>hosttype</VAR>, Cygnus <CODE>configure</CODE> will attempt to discover this
  119. information by itself (see section <A HREF="CONFIGUR.000#SEC8">Determining system information</A>).  For information on <VAR>hosttype</VAR> environments,
  120. See section <A HREF="CONFIGUR.000#SEC22">Host</A>.
  121. <P>
  122. All GNU software is packaged with one or more <CODE>configure</CODE> script(s)
  123. (see section `How Configuration Should Work' in <CITE>GNU Coding Standards</CITE>).  By using <CODE>configure</CODE> you prepare the source for your
  124. specific environment by selecting and using <TT>`Makefile'</TT> fragments and
  125. fragments of shell scripts, which are prepared in advance and stored with the
  126. source.
  127. <P>
  128. <CODE>configure</CODE>'s command-line options also allow you to specify other aspects
  129. of the source configuration:
  130. <P>
  131. <PRE>
  132.   configure <VAR>hosttype</VAR>  [--target=<VAR>target</VAR>] [--srcdir=<VAR>dir</VAR>] [--rm]
  133.             [--site=<VAR>site</VAR>] [--prefix=<VAR>dir</VAR>] [--exec-prefix=<VAR>dir</VAR>]
  134.             [--program-prefix=<VAR>string</VAR>] [--tmpdir=<VAR>dir</VAR>]
  135.             [--with-<VAR>package</VAR>[=<VAR>yes/no</VAR>]] [--norecursion]
  136.             [--nfp] [-s] [-v] [-V | --version] [--help]
  137. </PRE>
  138. <P>
  139. <DL COMPACT>
  140. <A NAME="IDX17"></A>
  141. <A NAME="IDX18"></A>
  142. <A NAME="IDX19"></A>
  143. <DT><CODE>--target=<VAR>target</VAR></CODE>
  144. <DD>Requests that the sources be configured to target the <VAR>target</VAR> machine.  If
  145. no target is specified explicitly, the target is assumed to be the same as the
  146. host (i.e., a <DFN>native</DFN> configuration).  See section <A HREF="CONFIGUR.000#SEC22">Host</A>, and
  147. section <A HREF="CONFIGUR.000#SEC23">Target</A>, for
  148. discussions of each.
  149.  
  150. <A NAME="IDX20"></A>
  151. <A NAME="IDX21"></A>
  152. <A NAME="IDX22"></A>
  153. <DT><CODE>--srcdir=<VAR>dir</VAR></CODE>
  154. <DD>Direct each generated <TT>`Makefile'</TT> to use the sources located in directory
  155. <VAR>dir</VAR>.  Use this option whenever you wish the object code to reside in a
  156. different place from the source code.  The <DFN>build directory</DFN> is always
  157. assumed to be the directory you call <CODE>configure</CODE> from.  See section <A HREF="CONFIGUR.000#SEC6">Build directories</A>, for an example.  If the source directory is
  158. not specified, <CODE>configure</CODE> assumes that the source is in your current
  159. directory.  If <CODE>configure</CODE> finds no <TT>`configure.in'</TT> there, it searches
  160. in the same directory that the <CODE>configure</CODE> script itself lies in.
  161. Pathnames specified (Values for <VAR>dir</VAR>) can be either absolute relative to
  162. the <EM>build</EM> directory.
  163.  
  164. <A NAME="IDX23"></A>
  165. <A NAME="IDX24"></A>
  166. <A NAME="IDX25"></A>
  167. <DT><CODE>--rm</CODE>
  168. <DD><EM>Remove</EM> the configuration specified by <VAR>hosttype</VAR> and the other
  169. command-line options, rather than create it.
  170.  
  171. <BLOCKQUOTE>
  172. <EM>Note:</EM> We recommend that you use <SAMP>`make distclean'</SAMP> rather than
  173. use this option; see section `Invoking <CODE>make</CODE>' in <CITE>GNU Make</CITE>, for details on <SAMP>`make distclean'</SAMP>.
  174. </BLOCKQUOTE>
  175.  
  176. <A NAME="IDX26"></A>
  177. <A NAME="IDX27"></A>
  178. <A NAME="IDX28"></A>
  179. <DT><CODE>--site=<VAR>site</VAR></CODE>
  180. <DD>Generate the <TT>`Makefile'</TT> using site-specific <TT>`Makefile'</TT> fragments for
  181. <VAR>site</VAR>.  See section <A HREF="CONFIGUR.000#SEC24">Adding information about local conventions</A>.
  182.  
  183. <A NAME="IDX29"></A>
  184. <A NAME="IDX30"></A>
  185. <A NAME="IDX31"></A>
  186. <DT><CODE>--prefix=<VAR>dir</VAR></CODE>
  187. <DD>Configure the source to install programs and files under directory <VAR>dir</VAR>.
  188.  
  189. This option sets the variable <SAMP>`prefix'</SAMP>.  Each generated <TT>`Makefile'</TT>
  190. will have its <SAMP>`prefix'</SAMP> variables set to this value.  (See section <A HREF="CONFIGUR.000#SEC4">What <CODE>configure</CODE> really does</A>.)
  191.  
  192. <A NAME="IDX32"></A>
  193. <A NAME="IDX33"></A>
  194. <A NAME="IDX34"></A>
  195. <DT><CODE>--exec-prefix=<VAR>dir</VAR></CODE>
  196. <DD>Configure the source to install <DFN>host dependent</DFN> files in <VAR>dir</VAR>.
  197.  
  198. This option sets the variable <SAMP>`exec_prefix'</SAMP>.  Each generated
  199. <TT>`Makefile'</TT> will have its <SAMP>`exec_prefix'</SAMP> variables set to this value.
  200. (See section <A HREF="CONFIGUR.000#SEC4">What <CODE>configure</CODE> really does</A>.)
  201.  
  202. <A NAME="IDX35"></A>
  203. <A NAME="IDX36"></A>
  204. <A NAME="IDX37"></A>
  205. <DT><CODE>--program-prefix=<VAR>string</VAR></CODE>
  206. <DD>Configure the source to install certain programs using <VAR>string</VAR> as a
  207. prefix.  This applies to programs which might be used for cross-compilation,
  208. such as the compiler and the binary utilities, and also to programs which have
  209. the same names as common Unix programs, such as <CODE>make</CODE>.
  210.  
  211. This option sets the variable <SAMP>`program_prefix'</SAMP>.  Each generated
  212. <TT>`Makefile'</TT> will have its <SAMP>`program_prefix'</SAMP> variables set to this
  213. value.  (See section <A HREF="CONFIGUR.000#SEC4">What <CODE>configure</CODE> really does</A>.)
  214.  
  215. <A NAME="IDX38"></A>
  216. <A NAME="IDX39"></A>
  217. <A NAME="IDX40"></A>
  218. <DT><CODE>--tmpdir=<VAR>tmpdir</VAR></CODE>
  219. <DD>Use the directory <VAR>tmpdir</VAR> for <CODE>configure</CODE>'s temporary files.  The
  220. default is the value of the environment variable <CODE>TMPDIR</CODE>, or
  221. <TT>`/tmp'</TT> if the environment variable is not set.
  222.  
  223. <A NAME="IDX41"></A>
  224. <A NAME="IDX42"></A>
  225. <A NAME="IDX43"></A>
  226. <DT><CODE>--with-<VAR>package</VAR>[=<VAR>yes/no</VAR>]</CODE>
  227. <DD>Indicate that <VAR>package</VAR> is present, or not present, depending on
  228. <VAR>yes/no</VAR>.  If <VAR>yes/no</VAR> is nonexistent, its value is assumed to
  229. be <CODE>yes</CODE>.
  230.  
  231. For example, if you wish to configure the program <CODE>gcc</CODE> for a Sun
  232. SPARCstation running SunOS 4.x, and you want <CODE>gcc</CODE> to use the
  233. GNU linker <CODE>ld</CODE>, you can configure <CODE>gcc</CODE> using
  234.  
  235. <A NAME="IDX44"></A>
  236. <PRE>
  237. eg$ configure --with-gnu-ld sun4
  238. </PRE>
  239.  
  240. See section <A HREF="CONFIGUR.000#SEC4">What <CODE>configure</CODE> really does</A>, for
  241. details.  See the installation or release notes for your particular package for
  242. details on which other <VAR>package</VAR> options are recognized.
  243.  
  244. <A NAME="IDX45"></A>
  245. <A NAME="IDX46"></A>
  246. <A NAME="IDX47"></A>
  247. <DT><CODE>--norecursion</CODE>
  248. <DD>Configure only this directory; ignore any subdirectories.  This is used by the
  249. executable shell script <TT>`config.status'</TT> to reconfigure only the current
  250. directory; it is most often used non-interactively, when <CODE>make</CODE> is
  251. invoked.  (See section <A HREF="CONFIGUR.000#SEC9"><CODE>config.status</CODE></A>.)
  252.  
  253. <A NAME="IDX48"></A>
  254. <A NAME="IDX49"></A>
  255. <A NAME="IDX50"></A>
  256. <DT><CODE>--nfp</CODE>
  257. <DD>Assume that the intended <VAR>hosttype</VAR> has no floating point unit.
  258.  
  259. <A NAME="IDX51"></A>
  260. <A NAME="IDX52"></A>
  261. <DT><CODE>-s</CODE>
  262. <DD>Suppress status output.  This option is used internally by
  263. <CODE>configure</CODE> when calling itself recursively in subdirectories.  You
  264. can override this option with the <CODE>--verbose</CODE> option.
  265.  
  266. <DT><CODE>-v</CODE>
  267. <DD><A NAME="IDX53"></A>
  268. <A NAME="IDX54"></A>
  269. <A NAME="IDX55"></A>
  270. <A NAME="IDX56"></A>
  271. <A NAME="IDX57"></A>
  272. <A NAME="IDX58"></A>
  273. <DT><CODE>--verbose</CODE>
  274. <DD>Print status lines for each directory configured.  Normally, only the
  275. status lines for the initial working directory are printed.
  276.  
  277. <DT><CODE>--version</CODE>
  278. <DD><A NAME="IDX59"></A>
  279. <A NAME="IDX60"></A>
  280. <A NAME="IDX61"></A>
  281. <DT><CODE>-V</CODE>
  282. <DD>Print the <CODE>configure</CODE> version number.
  283.  
  284. <A NAME="IDX62"></A>
  285. <A NAME="IDX63"></A>
  286. <A NAME="IDX64"></A>
  287. <DT><CODE>--help</CODE>
  288. <DD>Print a short summary of how to invoke <CODE>configure</CODE>.
  289. </DL>
  290. <A NAME="IDX65"></A>
  291. <A NAME="IDX66"></A>
  292. <P>
  293. <EM>Note:</EM> You may introduce options with a single dash, <SAMP>`-'</SAMP>, rather
  294. than two dashes, <SAMP>`--'</SAMP>.  However, you may not be able to truncate long
  295. option names when using a single dash.  When using two dashes, options may be
  296. abbreviated as long as each option can be uniquely identified.  For example,
  297. <PRE>
  298. eg$ configure --s=/u/me/src <VAR>hosttype</VAR>
  299. </PRE>
  300. is ambiguous, as <SAMP>`--s'</SAMP> could refer to either <SAMP>`--site'</SAMP> or
  301. <SAMP>`--srcdir'</SAMP>.  However,
  302. <PRE>
  303. eg$ configure --src=/u/me/src <VAR>hosttype</VAR>
  304. </PRE>
  305. is a valid abbreviation.
  306. <P>
  307. <A NAME="IDX67"></A>
  308. <A NAME="IDX68"></A>
  309. <A NAME="IDX69"></A>
  310. <H1><A NAME="SEC3" HREF="CONFIGUR.HTM#SEC3">Using <CODE>configure</CODE></A></H1>
  311. <P>
  312. <CODE>configure</CODE> prepares source directories for building programs in
  313. them.  "Configuring" is the process of preparing software to compile
  314. correctly on a given <DFN>host</DFN>, for a given <DFN>target</DFN>.
  315. <P>
  316. <CODE>configure</CODE> subsequently writes a configured <TT>`Makefile'</TT> from a
  317. pre-built template; <CODE>configure</CODE> uses variables that have been set in the
  318. configuring process to determine the values of some variables in the
  319. <TT>`Makefile'</TT>.  Because of this we will refer to both <CODE>configure</CODE>
  320. variables and <TT>`Makefile'</TT> variables.  This convention allows us to
  321. determine where the variable should be set initially, in either
  322. <TT>`configure.in'</TT> or <TT>`Makefile.in'</TT>.
  323. <P>
  324. <A NAME="IDX70"></A>
  325. <A NAME="IDX71"></A>
  326. <A NAME="IDX72"></A>
  327. <A NAME="IDX73"></A>
  328. <H2><A NAME="SEC4" HREF="CONFIGUR.HTM#SEC4">What <CODE>configure</CODE> really does</A></H2>
  329. <P>
  330. Cygnus <CODE>configure</CODE> is a shell script that sets up an environment in
  331. which your programs will compile correctly for your machine and
  332. operating system, and will install in proper places.  <CODE>configure</CODE>
  333. accomplishes this task by doing the following:
  334. <P>
  335. <UL>
  336. <LI>
  337. it generates a <TT>`Makefile'</TT> from a custom template called
  338. <TT>`Makefile.in'</TT> in each relevant source directory;
  339.  
  340. <LI>
  341. it customizes the build process to your specifications; you set certain
  342. variables for <CODE>configure</CODE>, either on the command line or in the
  343. file <TT>`configure.in'</TT>, which subsequently sets variables in each
  344. generated <TT>`Makefile'</TT> to be used by <CODE>make</CODE> when actually
  345. building the software;
  346.  
  347. <LI>
  348. it creates <DFN>build directories</DFN>, places for your code to be compiled
  349. in before being installed;
  350.  
  351. <LI>
  352. it generates a <TT>`.gdbinit'</TT> in the build directory, if needed, to
  353. communicate to <CODE>gdb</CODE> where to find the program's source code;
  354.  
  355. <LI>
  356. it generates a shell script called <TT>`config.status'</TT>
  357. which is used most often by the <TT>`Makefile'</TT> to reconfigure itself;
  358.  
  359. <LI>
  360. it recurses in subdirectories, setting up entire trees so that they build
  361. correctly; if <CODE>configure</CODE> finds another <CODE>configure</CODE> script
  362. further down in a given source tree, it knows to use this script and not
  363. recur.
  364. </UL>
  365. <P>
  366. For the sake of safety (i.e., in order to prevent broken installations), the
  367. GNU coding standards call for software to be <DFN>configured</DFN> in such a
  368. way that an end user trying to build a given package will be able to do so by
  369. affecting a finite number of variables.  All GNU software comes with an
  370. executable <CODE>configure</CODE> shell script which sets up an environment within a
  371. build directory which will correctly compile your new package for your host
  372. (or, alternatively, whatever host you specify to <CODE>configure</CODE>).
  373. For further background on this topic, see <CITE>On Configuring Development
  374. Tools</CITE> by K. Richard Pixley.
  375. <P>
  376. Use <CODE>configure</CODE> to set for the build process:
  377. <P>
  378. <UL>
  379. <LI>
  380. correct values for certain variables;
  381.  
  382. <LI>
  383. which type of host you wish to configure a given package for
  384. (see section <A HREF="CONFIGUR.000#SEC22">Host</A>);
  385.  
  386. <LI>
  387. where you want to install this package (by using <SAMP>`prefix'</SAMP>,
  388. <SAMP>`exec-prefix'</SAMP> and <SAMP>`program-prefix'</SAMP>; see section <A HREF="CONFIGUR.000#SEC21">Full descriptions of all installation subdirectories</A>);
  389.  
  390. <LI>
  391. optionally, which type of machine you wish to <DFN>target</DFN> this
  392. package's output to (see section <A HREF="CONFIGUR.000#SEC23">Target</A>);
  393.  
  394. <LI>
  395. which other GNU packages are already installed and available to
  396. this particular build (by using the <SAMP>`--with-<VAR>package</VAR>'</SAMP> option;
  397. see section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>);
  398.  
  399. <LI>
  400. where to place temporary files (by using the <SAMP>`--tmpdir=<VAR>dir</VAR>'</SAMP>
  401. option; see section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>);
  402.  
  403. <LI>whether to recur in subdirectories (changeable through the
  404. <SAMP>`--norecursion'</SAMP> option; see section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>).
  405. </UL>
  406. <P>
  407. <CODE>configure</CODE> uses a few other files to complete its tasks.  These are
  408. discussed in detail where noted.
  409. <P>
  410. <A NAME="IDX74"></A>
  411. <DL COMPACT>
  412. <A NAME="IDX75"></A>
  413. <DT><CODE>configure.in</CODE>
  414. <DD>Input file for <CODE>configure</CODE>.  Shell script fragments reside here.
  415. See section <A HREF="CONFIGUR.000#SEC10">The <CODE>configure.in</CODE> input file</A>.
  416.  
  417. <A NAME="IDX76"></A>
  418. <DT><CODE>Makefile.in</CODE>
  419. <DD>Template which <CODE>configure</CODE> uses to build a file called <TT>`Makefile'</TT> in
  420. the <DFN>build directory</DFN>.  See section <A HREF="CONFIGUR.000#SEC7"><CODE>Makefile</CODE> generation</A>.
  421.  
  422. <A NAME="IDX77"></A>
  423. <DT><CODE>config.sub</CODE>
  424. <DD>Shell script used by <CODE>configure</CODE> to expand referents to the
  425. <VAR>hosttype</VAR> argument into a single specification of the form
  426. <VAR>cpu-vendor-os</VAR>.  For instance, on the command line you can
  427. specify
  428.  
  429. <A NAME="IDX78"></A>
  430. <PRE>
  431. eg$ ./configure sun4
  432. </PRE>
  433.  
  434. to configure for a Sun SPARCstation running SunOS 4.x.  <CODE>configure</CODE>
  435. consults <CODE>config.sub</CODE> to find that the three-part specification for this
  436. is
  437.  
  438. <PRE>
  439. sparc-sun-sunos4.1.1
  440. </PRE>
  441.  
  442. which notes the <VAR>cpu</VAR> as <SAMP>`sparc'</SAMP>, the <VAR>manufacturer</VAR> as <SAMP>`sun'</SAMP>
  443. (Sun Microsystems), and the <VAR>os</VAR> (operating system) as <SAMP>`sunos4.1.1'</SAMP>,
  444. the SunOS 4.1.1 release.  See section <A HREF="CONFIGUR.000#SEC11">Variables available to <CODE>configure.in</CODE></A>.
  445.  
  446. <A NAME="IDX79"></A>
  447. <DT><CODE>config.guess</CODE>
  448. <DD>If you do not put the <VAR>hosttype</VAR> argument on the command line,
  449. <CODE>configure</CODE> uses the <CODE>config.guess</CODE> shell script to make an
  450. analysis of your machine (it assumes that you wish to configure your
  451. software for the type of machine on which you are running).  The output
  452. of <CODE>config.guess</CODE> is a three-part identifier as described above.
  453.  
  454. <A NAME="IDX80"></A>
  455. <DT><CODE>config.status</CODE>
  456. <DD>The final step in configuring a directory is to create a shell script,
  457. <CODE>config.status</CODE>.  The main purpose of this file is to allow the
  458. <TT>`Makefile'</TT> for the current directory to rebuild itself, if
  459. necessary.  See section <A HREF="CONFIGUR.000#SEC9"><CODE>config.status</CODE></A>.
  460.  
  461. <A NAME="IDX81"></A>
  462. <DT><CODE>config/*</CODE>
  463. <DD><CODE>configure</CODE> uses three types of <TT>`Makefile'</TT> <DFN>fragments</DFN>, which
  464. reside in the directory <TT>`<VAR>srcdir</VAR>/config/'</TT>.  See section <A HREF="CONFIGUR.000#SEC24">Adding information about local conventions</A>.
  465. </DL>
  466. <P>
  467. <A NAME="IDX82"></A>
  468. <A NAME="IDX83"></A>
  469. <A NAME="IDX84"></A>
  470. <H3><A NAME="SEC5" HREF="CONFIGUR.HTM#SEC5">Build variables</A></H3>
  471. <P>
  472. There are several variables in the build process which you can control through
  473. build programs such as <CODE>make</CODE>.  These include machine definitions, local
  474. conventions, installation locations, locations for temporary files, etc.  This
  475. data is accessible through certain variables which are configurable in the
  476. build process; we refer to them as <DFN>build variables</DFN>.
  477. <P>
  478. For lists of build variables which you can affect by using <CODE>configure</CODE>,
  479. see section <A HREF="CONFIGUR.000#SEC11">Variables available to <CODE>configure.in</CODE></A>,
  480. and section <A HREF="CONFIGUR.000#SEC21">Full descriptions of all installation subdirectories</A>.
  481. <P>
  482. Generally, build variables, which are used by the <TT>`Makefile'</TT> to
  483. determine various aspects of the build and installation processes, are
  484. changeable with command-line options to <CODE>configure</CODE>.  In most large
  485. suites of programs, like the Cygnus Support Developer's Kit, the
  486. individual programs reside in several subdirectories of a single source
  487. code "tree".  All of these subdirectories need to be configured with
  488. information relative to the <DFN>build directory</DFN>, which is not known
  489. until <CODE>configure</CODE> is run.  Unless specified otherwise,
  490. <CODE>configure</CODE> recursively configures every subdirectory in the source
  491. tree.
  492. <P>
  493. Build variables are passed from <CODE>configure</CODE> directly into the
  494. <TT>`Makefile'</TT>, and use the same names (except that dashes are
  495. transformed into underbars; for example, when you specify the option
  496. <SAMP>`--exec-prefix'</SAMP> on the command line, the <TT>`Makefile'</TT> variable
  497. <SAMP>`exec_prefix'</SAMP> is set).  In other words, if you specify
  498. <A NAME="IDX85"></A>
  499. <P>
  500. <PRE>
  501. eg$ ./configure --prefix=/usr/gnu/local ... <VAR>hosttype</VAR>
  502. </PRE>
  503. <P>
  504. on the command line, <CODE>configure</CODE> sets an variable called <SAMP>`prefix'</SAMP> to
  505. <SAMP>`/usr/gnu/local'</SAMP>, and passes this into the <TT>`Makefile'</TT> in the same
  506. manner.  After this command, each <TT>`Makefile'</TT> generated by <CODE>configure</CODE>
  507. will contain a line that reads:
  508. <P>
  509. <PRE>
  510. prefix = /usr/gnu/local
  511. </PRE>
  512. <P>
  513. For a list of the <TT>`Makefile'</TT> variables <CODE>configure</CODE> can change, and
  514. instructions on how to change them, see section <A HREF="CONFIGUR.000#SEC11">Variables available to <CODE>configure.in</CODE></A>, and section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>.
  515. <P>
  516. <A NAME="IDX86"></A>
  517. <A NAME="IDX87"></A>
  518. <A NAME="IDX88"></A>
  519. <A NAME="IDX89"></A>
  520. <H3><A NAME="SEC6" HREF="CONFIGUR.HTM#SEC6">Build directories</A></H3>
  521. <P>
  522. By default, <CODE>configure</CODE> builds a <TT>`Makefile'</TT> and symbolic links in the
  523. same directory as the source files.  This default works for many cases, but it
  524. has limitations.  For instance, using this approach, you can only build object
  525. code for one host at a time.
  526. <P>
  527. We refer to each directory where <CODE>configure</CODE> builds a <TT>`Makefile'</TT> as
  528. a <DFN>build directory</DFN>.
  529. <P>
  530. The build directory for any given build is always the directory from which you
  531. call <CODE>configure</CODE>, or <TT>`.'</TT> relative to your prompt.  The default
  532. <DFN>source directory</DFN>, the place <CODE>configure</CODE> looks to find source code,
  533. is also <TT>`.'</TT>.  For instance, if we have a directory <TT>`/gnu-stuff/src/'</TT>
  534. that is the top branch of a tree of GNU source code we wish to configure,
  535. then the program we will use to configure this code is
  536. <TT>`/gnu-stuff/src/configure'</TT>, as follows.  (Assume for the sake of argument
  537. that our machine is a sun4.)
  538. <A NAME="IDX90"></A>
  539. <P>
  540. <PRE>
  541. eg$ cd /gnu-stuff/src
  542. eg$ ./configure sun4
  543. Created "Makefile" in /gnu-stuff/src
  544. eg$
  545. </PRE>
  546. <P>
  547. We just configured the code in <TT>`/gnu-stuff/src'</TT> to run on a Sun
  548. SPARCstation using SunOS 4.x by creating a <TT>`Makefile'</TT> in
  549. <TT>`/gnu-stuff/src'</TT>.  By default, we also specified that when this code is
  550. built, the object code should reside in the same directory,
  551. <TT>`/gnu-stuff/src'</TT>.
  552. <P>
  553. However, if we wanted to build this code for more than one host, we would be in
  554. trouble, because the new configuration would write over the old one, destroying
  555. it in the process.  What we can do is to make a new <DFN>build directory</DFN> and
  556. configure from there.  Running <CODE>configure</CODE> from the new directory will
  557. place a correct <TT>`Makefile'</TT> and a <TT>`config.status'</TT> in this new file.
  558. That is all <CODE>configure</CODE> does; we must run <CODE>make</CODE> to generate any
  559. object code.  
  560. <P>
  561. The new <TT>`Makefile'</TT> in <TT>`/gnu-stuff/sun4-obj'</TT>, created from the
  562. template file <TT>`/gnu-stuff/src/Makefile.in'</TT>, contains all the information
  563. needed to build the program.
  564. <A NAME="IDX91"></A>
  565. <P>
  566. <PRE>
  567. eg$ mkdir /gnu-stuff/sun4-obj
  568. eg$ cd /gnu-stuff/sun4-obj
  569. eg$ ../src/configure --srcdir=../src sun4
  570. Created "Makefile" in /gnu-stuff/sun4-obj
  571. eg$ ls
  572. Makefile       config.status
  573. eg$ make all info install install-info clean
  574. <VAR>compilation messages...</VAR>
  575. eg$ mkdir /gnu-stuff/solaris2
  576. eg$ cd /gnu-stuff/solaris2
  577. eg$ ../src/configure --srcdir=../src sol2
  578. Created "Makefile" in /gnu-stuff/solaris2
  579. eg$ ls
  580. Makefile       config.status
  581. eg$ make all info install install-info clean
  582. <VAR>compilation messages...</VAR>
  583. </PRE>
  584. <P>
  585. We can repeat this for other configurations of the same software simply
  586. by making a new build directory and reconfiguring from inside it.  If
  587. you do not specify the <VAR>hosttype</VAR> argument, <CODE>configure</CODE>
  588. will attempt to figure out what kind of machine and operating system you
  589. happen to be using.  See section <A HREF="CONFIGUR.000#SEC8">Determining system information</A>.  Of course, this may not always be the configuration you
  590. wish to build.
  591. <P>
  592. <EM>Caution:</EM> If you build more than one configuration for a single program,
  593. remember that you must also specify a different <SAMP>`--prefix'</SAMP> for each
  594. configuration at configure-time.  Otherwise, both configurations will be
  595. installed in the same default location (<TT>`/usr/local'</TT>); the configuration
  596. to be installed last would overwrite previously installed configurations.
  597. <P>
  598. <A NAME="IDX92"></A>
  599. <H3><A NAME="SEC7" HREF="CONFIGUR.HTM#SEC7"><CODE>Makefile</CODE> generation</A></H3>
  600. <P>
  601. Cygnus <CODE>configure</CODE> creates a file called <TT>`Makefile'</TT> in the build
  602. directory which can be used with <CODE>make</CODE> to automatically build a given
  603. program or package.  <CODE>configure</CODE> also builds a <TT>`Makefile'</TT> for each
  604. relevant subdirectory for a given program or package (irrelevant subdirectories
  605. would be those which contain no code which needs configuring, and which
  606. therefore have no <CODE>configure</CODE> input file <TT>`configure.in'</TT> and no
  607. <TT>`Makefile'</TT> template <TT>`Makefile.in'</TT>).  See section `How to Run <CODE>make</CODE>' in <CITE>GNU Make</CITE>, for details on using
  608. <CODE>make</CODE> to compile your source code.
  609. <P>
  610. Each <TT>`Makefile'</TT> contains variables which have been configured for a
  611. specific build.  These build variables are determined when <CODE>configure</CODE> is
  612. run.  All build variables have defaults.  By default, <CODE>configure</CODE>
  613. generates a <TT>`Makefile'</TT> which specifies: 
  614. <A NAME="IDX93"></A>
  615. <P>
  616. <UL>
  617. <LI>a <DFN>native</DFN> build, which is to occur
  618.  
  619. <LI>in the current directory, and which will be installed
  620.  
  621. <LI>in the default installation directory (<TT>`/usr/local'</TT>) when the code
  622. is compiled with <CODE>make</CODE>.  
  623. </UL>
  624. <P>
  625. Variables are changeable through command-line options to <CODE>configure</CODE>
  626. (see section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>).
  627. <P>
  628. If you are porting a new program and intend to use <CODE>configure</CODE>, see
  629. section <A HREF="CONFIGUR.000#SEC26">Porting with <CODE>configure</CODE></A>, as well as section `Writing Makefiles' in <CITE>GNU Make</CITE>, and section `Makefile Conventions' in <CITE>GNU Coding Standards</CITE>.
  630. <P>
  631. <A NAME="IDX94"></A>
  632. <H3><A NAME="SEC8" HREF="CONFIGUR.HTM#SEC8">Determining system information</A></H3>
  633. <P>
  634. The shell script <CODE>config.guess</CODE> is called when you do not specify a
  635. <VAR>hosttype</VAR> on the command line to <CODE>configure</CODE>.  <CODE>config.guess</CODE>
  636. acquires available system information from your local machine through the shell
  637. command <CODE>uname</CODE>.  It compares this information to a database and attempts
  638. to determine a usable three-part system identifier (known as a <DFN>triple</DFN>) to
  639. use as your <VAR>hosttype</VAR>.  See section <A HREF="CONFIGUR.000#SEC4">What <CODE>configure</CODE> really does</A>, to see how this information is used.
  640. <P>
  641. <EM>Note:</EM>  If you do not specify a <VAR>hosttype</VAR> on the command line,
  642. <CODE>configure</CODE> will attempt to configure your software to run on the machine
  643. you happen to be using.  This may not be the configuration you desire.
  644. <P>
  645. <A NAME="IDX95"></A>
  646. <H3><A NAME="SEC9" HREF="CONFIGUR.HTM#SEC9"><CODE>config.status</CODE></A></H3>
  647. <P>
  648. The final step in configuring a directory is to create an executable shell
  649. script, <TT>`config.status'</TT>.  The main purpose of this file is to allow the
  650. <TT>`Makefile'</TT> for the current directory to rebuild itself, if necessary.  It
  651. is usually run from within the <TT>`Makefile'</TT>.  See section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>.
  652. <P>
  653. <TT>`config.status'</TT> also contains a record of the <CODE>configure</CODE> session
  654. which created it.  
  655. <P>
  656. <A NAME="IDX96"></A>
  657. <H2><A NAME="SEC10" HREF="CONFIGUR.HTM#SEC10">The <CODE>configure.in</CODE> input file</A></H2>
  658. <P>
  659. A <TT>`configure.in'</TT> file for Cygnus <CODE>configure</CODE> consists of a
  660. <DFN>per-invocation</DFN> section, followed by a <DFN>per-host</DFN> section, followed by
  661. a <DFN>per-target</DFN> section, optionally followed by a <DFN>post-target</DFN> section.
  662. Each section is a shell script fragment, which is executed by the
  663. <CODE>configure</CODE> shell script at an appropriate time.  Values are passed among
  664. <CODE>configure</CODE> and the shell fragments through a set of shell variables.
  665. When each section is being interpreted by the shell, the shell's current
  666. directory is the build directory, and any files created by the section (or
  667. referred to by the section) will be relative to the build directory.  To
  668. reference files in other places (such as the source directory), prepend a shell
  669. variable such as <SAMP>`$(srcdir)/'</SAMP> to the desired file name.
  670. <A NAME="IDX97"></A>
  671. <P>
  672. The beginning of the <TT>`configure.in'</TT> file begins the <DFN>per-invocation</DFN>
  673. section.
  674. <A NAME="IDX98"></A>
  675. <P>
  676. A line beginning with <SAMP>`# per-host:'</SAMP> begins the <DFN>per-host</DFN> section.
  677. <A NAME="IDX99"></A>
  678. <P>
  679. A line beginning with <SAMP>`# per-target:'</SAMP> begins the <DFN>per-target</DFN> section.
  680. <A NAME="IDX100"></A>
  681. <P>
  682. If it exists, the <DFN>post-target</DFN> section begins with <SAMP>`# post-target:'</SAMP>.
  683. <P>
  684. <A NAME="IDX101"></A>
  685. <A NAME="IDX102"></A>
  686. <H3><A NAME="SEC11" HREF="CONFIGUR.HTM#SEC11">Variables available to <CODE>configure.in</CODE></A></H3>
  687. <P>
  688. The following variables pass information between the standard parts of
  689. <CODE>configure</CODE> and the shell-script fragments in <TT>`configure.in'</TT>:
  690. <P>
  691. <DL COMPACT>
  692. <A NAME="IDX103"></A>
  693. <A NAME="IDX104"></A>
  694. <DT><CODE>srctrigger</CODE>
  695. <DD>Contains the name of a source file that is expected to live in the source
  696. directory.  You must usually set this in the <DFN>per-invocation</DFN> section of
  697. <TT>`configure.in'</TT>.  <CODE>configure</CODE> tests to see that this file exists.  If
  698. the file does not exist, <CODE>configure</CODE> prints an error message.  This is
  699. used as a sanity check that <TT>`configure.in'</TT> matches the source directory.
  700.  
  701. <A NAME="IDX105"></A>
  702. <A NAME="IDX106"></A>
  703. <DT><CODE>srcname</CODE>
  704. <DD>Contains the name of the source collection contained in the source directory.
  705. You must usually set this in the <DFN>per-invocation</DFN> section of
  706. <TT>`configure.in'</TT>.  If the file named in <SAMP>`srctrigger'</SAMP> does not exist,
  707. <CODE>configure</CODE> uses the value of <SAMP>`srcname'</SAMP> when it prints the error
  708. message.
  709.  
  710. <A NAME="IDX107"></A>
  711. <A NAME="IDX108"></A>
  712. <DT><CODE>configdirs</CODE>
  713. <DD>Contains the names of any subdirectories in which <CODE>configure</CODE> should
  714. recurse.  You must usually set this in the <DFN>per-invocation</DFN> section of
  715. <TT>`configure.in'</TT>.
  716. If <TT>`Makefile.in'</TT> contains a line starting with <SAMP>`SUBDIRS ='</SAMP>,
  717. then it will be replaced with an assignment to <SAMP>`SUBDIRS'</SAMP> using
  718. the value of <SAMP>`configdirs'</SAMP> (if <SAMP>`subdirs'</SAMP> is empty).  This can
  719. be used to determine which directories to configure and build depending
  720. on the host and target configurations.
  721. Use <SAMP>`configdirs'</SAMP> (instead of the <SAMP>`subdirs'</SAMP> variable
  722. described below) if you want to be able to partition the
  723. subdirectories, or use independent <TT>`Makefile'</TT> fragments.
  724. Each subdirectory can be independent, and independently reconfigured.
  725.  
  726. <A NAME="IDX109"></A>
  727. <A NAME="IDX110"></A>
  728. <DT><CODE>subdirs</CODE>
  729. <DD>Contains the names of any subdirectories where <CODE>configure</CODE> should create a
  730. <TT>`Makefile'</TT> (in addition to the current directory), <EM>without</EM>
  731. recursively running <CODE>configure</CODE>.  Use <SAMP>`subdirs'</SAMP> (instead of the
  732. <SAMP>`configdirs'</SAMP> variable described above) if you want to configure all of the
  733. directories as a unit.  Since there is a single invocation of <CODE>configure</CODE>
  734. that configures many directories, all the directories can use the same
  735. <TT>`Makefile'</TT> fragments, and the same <CODE>configure.in</CODE>.
  736.  
  737. <A NAME="IDX111"></A>
  738. <A NAME="IDX112"></A>
  739. <A NAME="IDX113"></A>
  740. <DT><CODE>host</CODE>
  741. <DD>Contains the full configuration name for the host (generated by the script
  742. <TT>`config.sub'</TT> from the name that you entered).  This is a three-part
  743. name (commonly referred to as a <DFN>triple</DFN>) of the form
  744. <VAR>cpu</VAR>-<VAR>vendor</VAR>-<VAR>os</VAR>.
  745.  
  746. There are separate variables <SAMP>`host_cpu'</SAMP>, <SAMP>`host_vendor'</SAMP>, and
  747. <SAMP>`host_os'</SAMP> that you can use to test each of the three parts; this variable
  748. is useful, however, for error messages, and for testing combinations of the
  749. three components.
  750.  
  751. <A NAME="IDX114"></A>
  752. <DT><CODE>host_cpu</CODE>
  753. <DD>Contains the first element of the canonical triple representing the host
  754. as returned by <TT>`config.sub'</TT>.  This is occasionally used to
  755. distinguish between minor variations of a particular vendor's operating
  756. system and sometimes to determine variations in binary format between
  757. the host and the target.
  758.  
  759. <A NAME="IDX115"></A>
  760. <DT><CODE>host_vendor</CODE>
  761. <DD>Contains the second element of the canonical triple representing the host as
  762. returned by <TT>`config.sub'</TT>.  This is usually used to distinguish among the
  763. numerous variations of <EM>common</EM> operating systems.
  764.  
  765. <A NAME="IDX116"></A>
  766. <DT><CODE>host_os</CODE>
  767. <DD>Contains the the third element of the canonical triple representing the
  768. host as returned by <TT>`config.sub'</TT>.
  769.  
  770. <A NAME="IDX117"></A>
  771. <A NAME="IDX118"></A>
  772. <A NAME="IDX119"></A>
  773. <DT><CODE>target</CODE>
  774. <DD>Contains the full configuration name (generated by the script <TT>`config.sub'</TT>
  775. from the name that you entered) for the target.  Like the host, this is a
  776. three-part name of the form <VAR>cpu</VAR>-<VAR>vendor</VAR>-<VAR>os</VAR>.
  777.  
  778. There are separate variables <SAMP>`target_cpu'</SAMP>, <SAMP>`target_vendor'</SAMP>, and
  779. <SAMP>`target_os'</SAMP> that you can use to test each of the three parts; this
  780. variable is useful, however, for error messages, and for testing combinations
  781. of the three components.
  782.  
  783. <A NAME="IDX120"></A>
  784. <DT><CODE>target_cpu</CODE>
  785. <DD>Contains the first element of the canonical triple representing the target as
  786. returned by <TT>`config.sub'</TT>.  This variable is used heavily by programs which
  787. are involved in building other programs, like the compiler, assembler, linker,
  788. etc.  Most programs will not need the <SAMP>`target'</SAMP> variables at all, but this
  789. one could conceivably be used to build a program, for instance, that operated
  790. on binary data files whose byte order or alignment differ from the system where
  791. the program is running.
  792.  
  793. <A NAME="IDX121"></A>
  794. <DT><CODE>target_vendor</CODE>
  795. <DD>Contains the second element of the canonical triple representing the target as
  796. returned by <TT>`config.sub'</TT>.  This is usually used to distinguish among the
  797. numerous variations of <EM>common</EM> operating systems or object file
  798. formats.  It is sometimes used to switch between different flavors of user
  799. interfaces.
  800.  
  801. <A NAME="IDX122"></A>
  802. <DT><CODE>target_os</CODE>
  803. <DD>Contains the the third element of the canonical triple representing the
  804. target as returned by <TT>`config.sub'</TT>.  This variable is used by
  805. development tools to distinguish between subtle variations in object
  806. file formats that some vendors use across operating system releases.  It
  807. might also be use to decide which libraries to build or what user
  808. interface the tool should provide.
  809.  
  810. <A NAME="IDX123"></A>
  811. <A NAME="IDX124"></A>
  812. <A NAME="IDX125"></A>
  813. <DT><CODE>floating_point</CODE>
  814. <DD>Set to <SAMP>`no'</SAMP> if you invoked <CODE>configure</CODE> with the <SAMP>`--nfp'</SAMP>
  815. command-line option, otherwise it is empty.  This is a request to target
  816. machines with <DFN>no floating point</DFN> unit, even if the targets ordinarily have
  817. floating point units available.
  818.  
  819. <A NAME="IDX126"></A>
  820. <A NAME="IDX127"></A>
  821. <DT><CODE>gas</CODE>
  822. <DD>Set to <SAMP>`true'</SAMP> if you invoked <CODE>configure</CODE> with the
  823. <SAMP>`--with-gnu-as'</SAMP> command line option, otherwise it is empty.  This is a
  824. request to assume that the specified <VAR>hosttype</VAR> machine has GNU <CODE>as</CODE>
  825. available even if it ordinarily does not.
  826.  
  827. <A NAME="IDX128"></A>
  828. <A NAME="IDX129"></A>
  829. <DT><CODE>srcdir</CODE>
  830. <DD>Set to the name of the directory containing the source for this program.
  831. This will be different from <TT>`.'</TT> if you have specified the
  832. <SAMP>`--srcdir=<VAR>dir</VAR>'</SAMP> option.  <SAMP>`srcdir'</SAMP> can indicate either an
  833. absolute path or a path relative to the build directory.
  834.  
  835. <A NAME="IDX130"></A>
  836. <DT><CODE>package_makefile_frag</CODE>
  837. <DD>If set in <TT>`configure.in'</TT>, this variable should be the name a file relative
  838. to <SAMP>`srcdir'</SAMP> to be included in the resulting <TT>`Makefile'</TT>.  If the named
  839. file does not exist, <CODE>configure</CODE> will print a warning message.  This
  840. variable is not set by <CODE>configure</CODE>.
  841.  
  842. <A NAME="IDX131"></A>
  843. <DT><CODE>host_makefile_frag</CODE>
  844. <DD>If set in <TT>`configure.in'</TT>, this variable should be the name a file relative
  845. to <SAMP>`srcdir'</SAMP> to be included in the resulting <TT>`Makefile'</TT>.  If the named
  846. file does not exist, <CODE>configure</CODE> will print a warning message.  This
  847. variable is not set by <CODE>configure</CODE>.
  848.  
  849. <A NAME="IDX132"></A>
  850. <DT><CODE>target_makefile_frag</CODE>
  851. <DD>If set in <TT>`configure.in'</TT>, this variable should be the name of a file,
  852. relative to <SAMP>`srcdir'</SAMP>, to be included in the resulting <TT>`Makefile'</TT>.  If
  853. the named file does not exist, <CODE>configure</CODE> will print a warning message.
  854. This variable is not set by <CODE>configure</CODE>.
  855.  
  856. <A NAME="IDX133"></A>
  857. <DT><CODE>site_makefile_frag</CODE>
  858. <DD>Set to a file name representing to the default <TT>`Makefile'</TT> fragment for
  859. this host.  It may be set in <TT>`configure.in'</TT> to override this default.
  860. Normally <SAMP>`site_makefile_frag'</SAMP> is empty, but will have a value if you
  861. specify <SAMP>`--site=<VAR>site</VAR>'</SAMP> on the command line.
  862.  
  863. <A NAME="IDX134"></A>
  864. <DT><CODE>Makefile</CODE>
  865. <DD>Set to the name of the generated <TT>`Makefile'</TT>.  Normally this value is
  866. precisely <TT>`Makefile'</TT>, but some programs may want something else.
  867.  
  868. <A NAME="IDX135"></A>
  869. <A NAME="IDX136"></A>
  870. <DT><CODE>removing</CODE>
  871. <DD>Normally empty but will be set to some non-null value if you specified
  872. <SAMP>`--rm'</SAMP> on the command line.  That is, if <SAMP>`removing'</SAMP> is not empty,
  873. then <CODE>configure</CODE> is <EM>removing</EM> a configuration rather than creating
  874. one.
  875.  
  876. <A NAME="IDX137"></A>
  877. <A NAME="IDX138"></A>
  878. <DT><CODE>files</CODE>
  879. <DD>If this variable is not empty following the <DFN>per-target</DFN> section,
  880. then each word in its value will be the target of a symbolic link named
  881. in the corresponding word from the <SAMP>`links'</SAMP> variable.
  882.  
  883. <A NAME="IDX139"></A>
  884. <A NAME="IDX140"></A>
  885. <DT><CODE>links</CODE>
  886. <DD>If the <SAMP>`files'</SAMP> variable is not empty following the <DFN>per-target</DFN>
  887. section, then <CODE>configure</CODE> creates symbolic links with the first word of
  888. <SAMP>`links'</SAMP> pointing to the first word of <SAMP>`files'</SAMP>, the second word of
  889. <SAMP>`links'</SAMP> pointing to the second word of <SAMP>`files'</SAMP>, and so on.
  890. </DL>
  891. <P>
  892. <A NAME="IDX141"></A>
  893. <H3><A NAME="SEC12" HREF="CONFIGUR.HTM#SEC12">A minimal <CODE>configure.in</CODE></A></H3>
  894. <P>
  895. A minimal <TT>`configure.in'</TT> consists of four lines.
  896. <P>
  897. <PRE>
  898. srctrigger=foo.c
  899. srcname="source for the foo program"
  900. # per-host:
  901. # per-target:
  902. </PRE>
  903. <P>
  904. The <SAMP>`# per-host:'</SAMP> and <SAMP>`# per-target:'</SAMP> lines divide the file into the
  905. three required sections.  The <SAMP>`srctrigger'</SAMP> line names a file.
  906. <CODE>configure</CODE> checks to see that this file exists in the source directory
  907. before configuring.  If the <SAMP>`srctrigger'</SAMP> file does not exist,
  908. <CODE>configure</CODE> uses the value of <SAMP>`srcname'</SAMP> to print an error message
  909. about not finding the source.
  910. <P>
  911. This particular example uses no links, and only the default host,
  912. target, and site-specific <TT>`Makefile'</TT> fragments if they exist.
  913. <P>
  914. <A NAME="IDX142"></A>
  915. <A NAME="IDX143"></A>
  916. <A NAME="IDX144"></A>
  917. <H3><A NAME="SEC13" HREF="CONFIGUR.HTM#SEC13">For each invocation</A></H3>
  918. <P>
  919. <CODE>configure</CODE> invokes the entire shell script fragment from the start of
  920. <TT>`configure.in'</TT> up to a line beginning with <SAMP>`# per-host:'</SAMP>
  921. immediately after parsing command line arguments.  The variables
  922. <SAMP>`srctrigger'</SAMP> and <SAMP>`srcname'</SAMP> <EM>must</EM> be set here.
  923. <P>
  924. You might also want to set the variables <SAMP>`configdirs'</SAMP> and
  925. <SAMP>`package_makefile_frag'</SAMP> here.
  926. <P>
  927. <A NAME="IDX145"></A>
  928. <A NAME="IDX146"></A>
  929. <A NAME="IDX147"></A>
  930. <H3><A NAME="SEC14" HREF="CONFIGUR.HTM#SEC14">Host-specific instructions</A></H3>
  931. <P>
  932. The <DFN>per-host</DFN> section of <TT>`configure.in'</TT> starts with the line that
  933. begins with <SAMP>`# per-host:'</SAMP> and ends before a line beginning with
  934. <SAMP>`# per-target:'</SAMP>.  <CODE>configure</CODE> invokes the commands in the
  935. <DFN>per-host</DFN> section when determining host-specific information.
  936. <P>
  937. This section usually contains a big <CODE>case</CODE> statement using the variable
  938. <SAMP>`host'</SAMP> to determine appropriate values for <SAMP>`host_makefile_frag'</SAMP> and
  939. <SAMP>`files'</SAMP>, although <SAMP>`files'</SAMP> is not usually set here.  Usually, it is
  940. set at the end of the <DFN>per-target</DFN> section after determining the names of
  941. the target specific configuration files.
  942. <P>
  943. <A NAME="IDX148"></A>
  944. <A NAME="IDX149"></A>
  945. <A NAME="IDX150"></A>
  946. <H3><A NAME="SEC15" HREF="CONFIGUR.HTM#SEC15">Target-specific instructions</A></H3>
  947. <P>
  948. The <DFN>per-target</DFN> section of <TT>`configure.in'</TT> starts with the line that
  949. begins with <SAMP>`# per-target:'</SAMP> and ends before the line that begins with
  950. <SAMP>`# post-target:'</SAMP>, if there is such a line.  Otherwise the
  951. <DFN>per-target</DFN> section extends to the end of the file.  <CODE>configure</CODE>
  952. invokes the commands in the <DFN>per-target</DFN> section when determining
  953. target-specific information, and before building any files, directories, or
  954. links.
  955. <P>
  956. This section usually contains a big <CODE>case</CODE> statement using the variable
  957. <SAMP>`target'</SAMP> to determine appropriate values for <SAMP>`target_makefile_frag'</SAMP>
  958. and <SAMP>`files'</SAMP>.  The last lines in the <DFN>per-target</DFN> section normally set
  959. the variables <SAMP>`files'</SAMP> and <SAMP>`links'</SAMP>.
  960. <P>
  961. <A NAME="IDX151"></A>
  962. <A NAME="IDX152"></A>
  963. <H3><A NAME="SEC16" HREF="CONFIGUR.HTM#SEC16">Instructions to be executed after target info</A></H3>
  964. <P>
  965. The <DFN>post-target</DFN> section is optional.  If it exists, the
  966. <SAMP>`post-target'</SAMP> section starts with a line beginning with <SAMP>`#
  967. Post-target:'</SAMP> and extends to the end of the file.  If it exists,
  968. <CODE>configure</CODE> invokes this section once for each target after
  969. building all files, directories, or links.
  970. <P>
  971. This section is seldom needed, but you can use it to edit the <TT>`Makefile'</TT>
  972. generated by <CODE>configure</CODE>.
  973. <P>
  974. <A NAME="IDX153"></A>
  975. <A NAME="IDX154"></A>
  976. <H3><A NAME="SEC17" HREF="CONFIGUR.HTM#SEC17">An example <CODE>configure.in</CODE></A></H3>
  977. <P>
  978. Here is a small example of a <TT>`configure.in'</TT> file.
  979. <P>
  980. <PRE>
  981. # This file is a collection of shell script fragments
  982. # used to tailor a template configure script as
  983. # appropriate for this directory.  For more information,
  984. # see configure.texi.
  985.  
  986. configdirs=
  987. srctrigger=warshall.c
  988. srcname="bison"
  989.  
  990. # per-host:
  991. case "${host}" in
  992. m88k-motorola-*)
  993.         host_makefile_frag=config/mh-delta88
  994.         ;;
  995. esac
  996.  
  997. # per-target:
  998. files="bison_in.hairy"
  999. links="bison.hairy"
  1000.  
  1001. # post-target:
  1002. </PRE>
  1003. <P>
  1004. <A NAME="IDX155"></A>
  1005. <A NAME="IDX156"></A>
  1006. <H2><A NAME="SEC18" HREF="CONFIGUR.HTM#SEC18">Install locations</A></H2>
  1007. <P>
  1008. Using the default configuration, <SAMP>`make install'</SAMP> creates a single tree of
  1009. files, some of which are programs.  The location of this tree is determined by
  1010. the value of the variable <SAMP>`prefix'</SAMP>.  The default value of <SAMP>`prefix'</SAMP> is
  1011. <SAMP>`/usr/local'</SAMP>.  This is often correct for native tools installed on only
  1012. one host.
  1013. <P>
  1014. <A NAME="IDX157"></A>
  1015. <A NAME="IDX158"></A>
  1016. <A NAME="IDX159"></A>
  1017. <H3><A NAME="SEC19" HREF="CONFIGUR.HTM#SEC19">Changing the default install directory</A></H3>
  1018. <P>
  1019. In the default configuration, all files are installed in subdirectories
  1020. of <TT>`/usr/local'</TT>.  The location is determined by the value of
  1021. the <CODE>configure</CODE> variable <SAMP>`prefix'</SAMP>; in turn, this determines the
  1022. value of the <TT>`Makefile'</TT> variable of the same name (<SAMP>`prefix'</SAMP>).
  1023. <P>
  1024. You can also set the value of the <TT>`Makefile'</TT> variable <SAMP>`prefix'</SAMP>
  1025. explicitly each time you invoke <CODE>make</CODE> if you are so inclined.  However,
  1026. because many programs have this location compiled in, you must specify the
  1027. <SAMP>`prefix'</SAMP> value consistently on each invocation of <CODE>make</CODE>, or you will
  1028. end up with a broken installation.
  1029. <P>
  1030. To make this easier, the value of the <CODE>configure</CODE> variable
  1031. <SAMP>`prefix'</SAMP> can be set on the command line to <CODE>configure</CODE>
  1032. using the option <SAMP>`--prefix='</SAMP>.  
  1033. <P>
  1034. <A NAME="IDX160"></A>
  1035. <A NAME="IDX161"></A>
  1036. <A NAME="IDX162"></A>
  1037. <A NAME="IDX163"></A>
  1038. <A NAME="IDX164"></A>
  1039. <H3><A NAME="SEC20" HREF="CONFIGUR.HTM#SEC20">Installing for multiple hosts</A></H3>
  1040. <P>
  1041. By default, host dependent files are installed in subdirectories of
  1042. <TT>`$(exec_prefix)'</TT>.  The location is determined by the value of the
  1043. <CODE>configure</CODE> variable <SAMP>`exec_prefix'</SAMP>, which determines the value of the
  1044. <TT>`Makefile'</TT> variable <SAMP>`exec_prefix'</SAMP>.  This makes it easier to install
  1045. for a single host, and simplifies changing the default location for the install
  1046. tree.  The default doesn't allow for multiple hosts to effectively share
  1047. host independent files, however.
  1048. <P>
  1049. To configure so that multiple hosts can share common files, use something like:
  1050. <A NAME="IDX165"></A>
  1051. <P>
  1052. <PRE>
  1053. configure <VAR>host1</VAR> -prefix=/usr/gnu -exec_prefix=/usr/gnu/H-host1
  1054. make all info install install-info clean
  1055.  
  1056. configure <VAR>host2</VAR> -prefix=/usr/gnu -exec_prefix=/usr/gnu/H-host2
  1057. make all info install install-info
  1058. </PRE>
  1059. <P>
  1060. The first line configures the source for <VAR>host1</VAR> to place host-specific
  1061. programs in subdirectories of <TT>`/usr/gnu/H-<VAR>host1</VAR>'</TT>.
  1062. <P>
  1063. The second line builds and installs all programs for <VAR>host1</VAR>,
  1064. including both host-independent and host-specific files, as well as removing
  1065. the host-specific object files from of the build directory.
  1066. <P>
  1067. The third line reconfigures the source for <VAR>host2</VAR> to place host
  1068. specific programs in subdirectories of <TT>`/usr/gnu/H-<VAR>host2</VAR>'</TT>.
  1069. <P>
  1070. The fourth line builds and installs all programs for <VAR>host2</VAR>.  Host
  1071. specific files are installed in new directories, but the host
  1072. independent files are installed <EM>on top of</EM> the host
  1073. independent files installed for <VAR>host1</VAR>.  This results in a single
  1074. copy of the host independent files, suitable for use by both hosts.
  1075. <P>
  1076. See section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>, for
  1077. more information.
  1078. <P>
  1079. <A NAME="IDX166"></A>
  1080. <A NAME="IDX167"></A>
  1081. <A NAME="IDX168"></A>
  1082. <H3><A NAME="SEC21" HREF="CONFIGUR.HTM#SEC21">Full descriptions of all installation subdirectories</A></H3>
  1083. <P>
  1084. During any install, a number of standard directories are created.  Their names
  1085. are determined by <TT>`Makefile'</TT> variables.  Some of the defaults for
  1086. <TT>`Makefile'</TT> variables can be changed at configuration time using command
  1087. line options to <CODE>configure</CODE>.  For more information on the standard
  1088. directories or the <TT>`Makefile'</TT> variables, please refer to section `Makefile Conventions' in <CITE>GNU Coding Standards</CITE>.  See also section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>.
  1089. <P>
  1090. Note that <CODE>configure</CODE> does not create the directory indicated by the
  1091. variable <SAMP>`srcdir'</SAMP> at any time.  <CODE>$(srcdir)</CODE> is not an installation
  1092. directory.
  1093. <P>
  1094. You can override all <TT>`Makefile'</TT> variables on the command line to
  1095. <CODE>make</CODE>.  (See section `Overriding Variables' in <CITE>GNU Make</CITE>.)  If
  1096. you do so, you will need to specify the value precisely the same way for each
  1097. invocation of <CODE>make</CODE>, or you risk ending up with a broken installation.
  1098. This is because many programs have the locations of other programs or files
  1099. compiled into them.  If you find yourself overriding any of the variables
  1100. frequently, you should consider site dependent <TT>`Makefile'</TT> fragments.  See
  1101. also section <A HREF="CONFIGUR.000#SEC29">Adding site info</A>.
  1102. <P>
  1103. During <SAMP>`make install'</SAMP>, a number of standard directories are created and
  1104. populated.  The following <TT>`Makefile'</TT> variables define them.  Those whose
  1105. defaults are set by corresponding <CODE>configure</CODE> variables are marked
  1106. "<CODE>Makefile</CODE> and <CODE>configure</CODE>".
  1107. <P>
  1108. <DL COMPACT>
  1109. <A NAME="IDX169"></A>
  1110. <A NAME="IDX170"></A>
  1111. <DT><CODE>prefix (<CODE>Makefile</CODE> and <CODE>configure</CODE>)</CODE>
  1112. <DD>The root of the installation tree.  You can set its <TT>`Makefile'</TT> default
  1113. with the <SAMP>`--prefix='</SAMP> command line option to <CODE>configure</CODE>
  1114. (see section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>).  The default value
  1115. for <SAMP>`prefix'</SAMP> is <SAMP>`/usr/local'</SAMP>.
  1116.  
  1117. <A NAME="IDX171"></A>
  1118. <A NAME="IDX172"></A>
  1119. <DT><CODE>bindir</CODE>
  1120. <DD>A directory for binary programs that users can run.  The default value for
  1121. <SAMP>`bindir'</SAMP> depends on <SAMP>`prefix'</SAMP>; <SAMP>`bindir'</SAMP> is normally changed only
  1122. indirectly through <SAMP>`prefix'</SAMP>.  The default value for <SAMP>`bindir'</SAMP> is
  1123. <SAMP>`$(prefix)/bin'</SAMP>.
  1124.  
  1125. <A NAME="IDX173"></A>
  1126. <A NAME="IDX174"></A>
  1127. <DT><CODE>exec_prefix (<CODE>Makefile</CODE> and <CODE>configure</CODE>)</CODE>
  1128. <DD>A directory for host dependent files.  You can specify the <TT>`Makefile'</TT>
  1129. default value by using the <SAMP>`--exec_prefix='</SAMP> option to <CODE>configure</CODE>.
  1130. (See section <A HREF="CONFIGUR.000#SEC2">Invoking <CODE>configure</CODE></A>.)  The default value
  1131. for <SAMP>`exec_prefix'</SAMP> is <SAMP>`$(prefix)'</SAMP>.
  1132.  
  1133. <A NAME="IDX175"></A>
  1134. <A NAME="IDX176"></A>
  1135. <DT><CODE>libdir</CODE>
  1136. <DD>A directory for libraries and support programs.  The default value for
  1137. <SAMP>`libdir'</SAMP> depends on <SAMP>`prefix'</SAMP>; <SAMP>`libdir'</SAMP> is normally changed only
  1138. indirectly through <SAMP>`prefix'</SAMP>.  The default value for <SAMP>`libdir'</SAMP> is
  1139. <SAMP>`$(prefix)/lib'</SAMP>.
  1140.  
  1141. <A NAME="IDX177"></A>
  1142. <A NAME="IDX178"></A>
  1143. <DT><CODE>mandir</CODE>
  1144. <DD>A directory for <CODE>man</CODE> format documentation ("man pages").  The default
  1145. value for <SAMP>`mandir'</SAMP> depends on <SAMP>`prefix'</SAMP>; <SAMP>`mandir'</SAMP> is normally
  1146. changed only indirectly through <SAMP>`prefix'</SAMP>.  The default value for
  1147. <SAMP>`mandir'</SAMP> is <SAMP>`$(prefix)/man'</SAMP>.
  1148.  
  1149. <A NAME="IDX179"></A>
  1150. <A NAME="IDX180"></A>
  1151. <DT><CODE>man<VAR>N</VAR>dir</CODE>
  1152. <DD>These are eight variables named <SAMP>`man1dir'</SAMP>, <SAMP>`man2dir'</SAMP>, etc.  They name
  1153. the specific directories for each man page section.  For example,
  1154. <SAMP>`man1dir'</SAMP> by default holds the filename <TT>`$(mandir)/man1'</TT>; this
  1155. directory contains <TT>`emacs.1'</TT> (the man page for GNU Emacs).
  1156. Similarly, <SAMP>`man5dir'</SAMP> contains the value <TT>`$(mandir)/man5'</TT>, indicating
  1157. the directory which holds <TT>`rcsfile.5'</TT> (the man page describing the
  1158. <CODE>rcs</CODE> data file format).  The default value for any of the
  1159. <SAMP>`man<VAR>N</VAR>dir'</SAMP> variables depends indirectly on <SAMP>`prefix'</SAMP>, and is
  1160. normally changed only through <SAMP>`prefix'</SAMP>.  The default value for
  1161. <SAMP>`man<VAR>N</VAR>dir'</SAMP> is <SAMP>`$(mandir)/man<VAR>N</VAR>'</SAMP>.
  1162.  
  1163. <A NAME="IDX181"></A>
  1164. <A NAME="IDX182"></A>
  1165. <DT><CODE>man<VAR>N</VAR>ext</CODE>
  1166. <DD><EM>Not supported by Cygnus <CODE>configure</CODE></EM>.  The <CITE>GNU Coding
  1167. Standards</CITE> do not call for <SAMP>`man1ext'</SAMP>, <SAMP>`man2ext'</SAMP>, so the intended use
  1168. for <CODE>manext</CODE> is apparently not parallel to <SAMP>`mandir'</SAMP>.  Its use is not
  1169. clear.  (See also section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>.)
  1170.  
  1171. <A NAME="IDX183"></A>
  1172. <A NAME="IDX184"></A>
  1173. <DT><CODE>infodir</CODE>
  1174. <DD>A directory for <CODE>info</CODE> format documentation.  The default value for
  1175. <SAMP>`infodir'</SAMP> depends indirectly on <SAMP>`prefix'</SAMP>; <SAMP>`infodir'</SAMP> is
  1176. normally changed only through <SAMP>`prefix'</SAMP>.  The default value for
  1177. <SAMP>`infodir'</SAMP> is <SAMP>`$(prefix)/info'</SAMP>.
  1178.  
  1179. <A NAME="IDX185"></A>
  1180. <A NAME="IDX186"></A>
  1181. <DT><CODE>docdir</CODE>
  1182. <DD>A directory for any documentation that is in a format other than those used by
  1183. <CODE>info</CODE> or <CODE>man</CODE>.  The default value for <SAMP>`docdir'</SAMP> depends
  1184. indirectly on <SAMP>`prefix'</SAMP>; <SAMP>`docdir'</SAMP> is normally changed only through
  1185. <SAMP>`prefix'</SAMP>.  The default value for <SAMP>`docdir'</SAMP> is <SAMP>`$(datadir)/doc'</SAMP>.
  1186. <EM>This variable is an extension to the GNU coding standards</EM>.  (See
  1187. also section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>.)
  1188.  
  1189. <A NAME="IDX187"></A>
  1190. <A NAME="IDX188"></A>
  1191. <DT><CODE>includedir</CODE>
  1192. <DD>A directory for the header files accompanying the libraries installed in
  1193. <SAMP>`libdir'</SAMP>.  The default value for <SAMP>`includedir'</SAMP> depends on
  1194. <SAMP>`prefix'</SAMP>; <SAMP>`includedir'</SAMP> is normally changed only indirectly
  1195. through <SAMP>`prefix'</SAMP>.  The default value for <SAMP>`includedir'</SAMP> is
  1196. <SAMP>`$(prefix)/include'</SAMP>.
  1197. </DL>
  1198. <P>
  1199. <A NAME="IDX189"></A>
  1200. <H2><A NAME="SEC22" HREF="CONFIGUR.HTM#SEC22">Host</A></H2>
  1201. <P>
  1202. The arguments to <CODE>configure</CODE> are <DFN>hosttypes</DFN>.  By
  1203. <DFN>hosttype</DFN> we mean the <DFN>environment</DFN> in which the source will be
  1204. compiled.  This need not necessarily be the same as the physical machine
  1205. involved, although it usually is.
  1206. <P>
  1207. For example, if some obscure machine had the GNU <CODE>POSIX</CODE> emulation
  1208. libraries available, it would be possible to configure most GNU source for
  1209. a <CODE>POSIX</CODE> system and build it on the obscure host.
  1210. <P>
  1211. For more on this topic, see section `Host Environments' in <CITE>On Configuring Development Tools</CITE>.
  1212. <P>
  1213. <A NAME="IDX190"></A>
  1214. <H2><A NAME="SEC23" HREF="CONFIGUR.HTM#SEC23">Target</A></H2>
  1215. <P>
  1216. For building native development tools, or most of the other GNU
  1217. tools, you need not worry about the target.  The <DFN>target</DFN> of a
  1218. configuration defaults to the same as the <DFN>host</DFN>.
  1219. <P>
  1220. For building cross development tools, please see section `Building Development Environments' in <CITE>On Configuring Development Tools</CITE>.
  1221. <P>
  1222. <A NAME="IDX191"></A>
  1223. <A NAME="IDX192"></A>
  1224. <A NAME="IDX193"></A>
  1225. <A NAME="IDX194"></A>
  1226. <H2><A NAME="SEC24" HREF="CONFIGUR.HTM#SEC24">Adding information about local conventions</A></H2>
  1227. <P>
  1228. If you find that a tool does not get configured to your liking, or if
  1229. <CODE>configure</CODE>'s conventions differ from your local conventions, you should
  1230. probably consider <DFN>site-specific <TT>`Makefile'</TT> fragments</DFN>.  See also
  1231. section <A HREF="CONFIGUR.000#SEC29">Adding site info</A>.
  1232. <P>
  1233. These are probably not the right choice for options that can be set from
  1234. the <CODE>configure</CODE> command line or for differences that are host or
  1235. target dependent.
  1236. <P>
  1237. Cygnus <CODE>configure</CODE> uses three types of <TT>`Makefile'</TT> fragments.  In a
  1238. generated <TT>`Makefile'</TT> they appear in the order: <DFN>target fragment</DFN>,
  1239. <DFN>host fragment</DFN>, and <DFN>site fragment</DFN>.  This allows host fragments to
  1240. override target fragments, and site fragments to override both.
  1241. <P>
  1242. Host-specific <TT>`Makefile'</TT> fragments conventionally reside in the
  1243. <TT>`./config/'</TT> subdirectory with names of the form <TT>`mh-<VAR>hosttype</VAR>'</TT>.
  1244. They are used for hosts that require odd options to the standard compiler and
  1245. for compile time options based on the host configuration.
  1246. <P>
  1247. Target-specific <TT>`Makefile'</TT> fragments conventionally reside in the
  1248. <TT>`./config/'</TT> subdirectory with names of the form <TT>`mt-<VAR>target</VAR>'</TT>.
  1249. They are used for target dependent compile time options.
  1250. <P>
  1251. Site specific <TT>`Makefile'</TT> fragments conventionally reside in the
  1252. <TT>`./config/'</TT> subdirectory with names of the form <TT>`ms-<VAR>site</VAR>'</TT>.
  1253. They are used to override host- and target-independent compile time options.
  1254. Note that you can also override these options on the <CODE>make</CODE> invocation
  1255. line.
  1256. <P>
  1257. <A NAME="IDX195"></A>
  1258. <A NAME="IDX196"></A>
  1259. <A NAME="IDX197"></A>
  1260. <H2><A NAME="SEC25" HREF="CONFIGUR.HTM#SEC25">Extensions to the GNU coding standards</A></H2>
  1261. <P>
  1262. The following additions to the GNU coding standards are required for
  1263. Cygnus <CODE>configure</CODE> to work properly.
  1264. <P>
  1265. <UL>
  1266. <LI>
  1267. The <TT>`Makefile'</TT> must contain exactly one line starting with <SAMP>`####'</SAMP>.
  1268. This line should follow any default macro definitions but precede any rules.
  1269. Host, target, and site-specific <TT>`Makefile'</TT> fragments will be inserted
  1270. immediately after this line.  If the line is missing, the fragments will not be
  1271. inserted.
  1272.  
  1273. <LI>
  1274. Cygnus adds the following targets to each <TT>`Makefile'</TT>.  Their existence is
  1275. not required for Cygnus <CODE>configure</CODE>, but they are documented here for
  1276. completeness.
  1277.  
  1278. <A NAME="IDX198"></A>
  1279. <DL COMPACT>
  1280. <DT><CODE>info</CODE>
  1281. <DD>Build all info files from texinfo source.
  1282.  
  1283. <A NAME="IDX199"></A>
  1284. <DT><CODE>install-info</CODE>
  1285. <DD>Install all info files.
  1286.  
  1287. <A NAME="IDX200"></A>
  1288. <DT><CODE>clean-info</CODE>
  1289. <DD>Remove all info files and any intermediate files that can be generated
  1290. from texinfo source.
  1291.  
  1292. <A NAME="IDX201"></A>
  1293. <DT><CODE>Makefile</CODE>
  1294. <DD>Calls <CODE>./config.status</CODE> to rebuild the <TT>`Makefile'</TT> in this directory.
  1295. </DL>
  1296.  
  1297. <LI>
  1298. The following <TT>`Makefile'</TT> targets have revised semantics:
  1299.  
  1300. <A NAME="IDX202"></A>
  1301. <DL COMPACT>
  1302. <DT><CODE>install</CODE>
  1303. <DD>Should <EM>not</EM> depend on the target <SAMP>`all'</SAMP>.  If the program is not
  1304. already built, <SAMP>`make install'</SAMP> should fail.  This allows you to install
  1305. programs even when <CODE>make</CODE> would otherwise determine them to be out of
  1306. date.  This can happen, for example, when the result of a <SAMP>`make all'</SAMP> is
  1307. transported via tape to another machine for installation.
  1308.  
  1309. <A NAME="IDX203"></A>
  1310. <DT><CODE>clean</CODE>
  1311. <DD>Should remove any file that can be regenerated by the <TT>`Makefile'</TT>,
  1312. excepting only the <TT>`Makefile'</TT> itself, and any links created by
  1313. <CODE>configure</CODE>.  That is, <CODE>make all clean</CODE> should return all directories
  1314. to their original condition.  If this is not done, then the command sequence
  1315.  
  1316. <A NAME="IDX204"></A>
  1317. <PRE>
  1318. configure <VAR>host1</VAR> ; make all install clean ; 
  1319. configure <VAR>host2</VAR> ; make all install
  1320. </PRE>
  1321.  
  1322. will fail because of intermediate files intended for <VAR>host1</VAR>.
  1323. </DL>
  1324.  
  1325. <LI>
  1326. Cygnus adds the following macros to all <TT>`Makefile.in'</TT> files, but
  1327. you are not required to use them to run Cygnus <CODE>configure</CODE>.
  1328.  
  1329. <A NAME="IDX205"></A>
  1330. <DL COMPACT>
  1331. <DT><CODE>docdir</CODE>
  1332. <DD>The directory in which to install any documentation that is not either a
  1333. <CODE>man</CODE> page or an <CODE>info</CODE> file.  For <CODE>man</CODE> pages, see
  1334. <SAMP>`mandir'</SAMP>; for <CODE>info</CODE>, see <SAMP>`infodir'</SAMP>.
  1335.  
  1336. <A NAME="IDX206"></A>
  1337. <DT><CODE>includedir</CODE>
  1338. <DD>The directory in which to install any header files that should be made
  1339. available to users.  This is distinct from the <CODE>gcc</CODE> include directory,
  1340. which is intended for <CODE>gcc</CODE> only.  Files in <SAMP>`includedir'</SAMP> may be used
  1341. by <CODE>cc</CODE> as well.
  1342. </DL>
  1343.  
  1344. <LI>
  1345. The following macros have revised semantics.  Most of them describe
  1346. installation directories; see also section <A HREF="CONFIGUR.000#SEC21">Full descriptions of all installation subdirectories</A>.
  1347.  
  1348. <A NAME="IDX207"></A>
  1349. <DL COMPACT>
  1350. <DT><CODE>datadir</CODE>
  1351. <DD>is used for host independent data files.
  1352.  
  1353. <A NAME="IDX208"></A>
  1354. <DT><CODE>mandir</CODE>
  1355. <DD>The default path for <SAMP>`mandir'</SAMP> depends on <SAMP>`prefix'</SAMP>.
  1356.  
  1357. <A NAME="IDX209"></A>
  1358. <DT><CODE>infodir</CODE>
  1359. <DD>The default path for <SAMP>`infodir'</SAMP> depends on <SAMP>`prefix'</SAMP>.
  1360.  
  1361. <A NAME="IDX210"></A>
  1362. <DT><CODE>BISON</CODE>
  1363. <DD>is assumed to have a <CODE>yacc</CODE> calling convention.  To use GNU
  1364. <CODE>bison</CODE>, use <SAMP>`BISON=bison -y'</SAMP>.
  1365. </DL>
  1366.  
  1367. <LI>
  1368. Each Cygnus <TT>`Makefile'</TT> also conforms to one additional restriction:
  1369.  
  1370. When libraries are installed, the line containing the call to
  1371. <SAMP>`INSTALL_DATA'</SAMP> should always be followed by a line containing a call to
  1372. <SAMP>`RANLIB'</SAMP> on the installed library.  This is to accommodate systems that
  1373. use <CODE>ranlib</CODE>.  Systems that do not use <CODE>ranlib</CODE> can set <SAMP>`RANLIB'</SAMP>
  1374. to "<CODE>echo</CODE>" in a host specific <TT>`Makefile'</TT> fragment.
  1375. </UL>
  1376. <P>
  1377. <A NAME="IDX211"></A>
  1378. <H1><A NAME="SEC26" HREF="CONFIGUR.HTM#SEC26">Porting with <CODE>configure</CODE></A></H1>
  1379. <P>
  1380. This section explains how to add programs, host and target configuration
  1381. names, and site-specific information to Cygnus <CODE>configure</CODE>.
  1382. <P>
  1383. <A NAME="IDX212"></A>
  1384. <H2><A NAME="SEC27" HREF="CONFIGUR.HTM#SEC27">Adding <CODE>configure</CODE> to new programs</A></H2>
  1385. <P>
  1386. If you are writing a new program, you probably shouldn't worry about porting or
  1387. configuration issues until it is running reasonably on some host.  Then refer
  1388. back to this section.
  1389. <P>
  1390. If your program currently has a <CODE>configure</CODE> script that meets the GNU
  1391. standards (see section `How Configuration Should Work' in <CITE>GNU Coding Standards</CITE>, please do not add Cygnus <CODE>configure</CODE>.  It should be
  1392. possible to add this program without change to a Cygnus <CODE>configure</CODE> style
  1393. source tree.
  1394. <A NAME="IDX213"></A>
  1395. <P>
  1396. If the program is not target dependent, please consider using <CODE>autoconf</CODE>
  1397. instead of Cygnus <CODE>configure</CODE>.  <CODE>autoconf</CODE> is available from the Free
  1398. Software Foundation; it is a program which generates an executable shell script
  1399. called <TT>`configure'</TT> by automatically finding information on the system to
  1400. be configured on and embedding this information in the shell script.
  1401. <TT>`configure'</TT> scripts generated by <CODE>autoconf</CODE> require no arguments, and
  1402. accept the same options as Cygnus <CODE>configure</CODE>.  For detailed instructions
  1403. on using <CODE>autoconf</CODE>, see section `How to organize and produce Autoconf scripts' in <CITE>Autoconf</CITE>.
  1404. <P>
  1405. To add Cygnus <CODE>configure</CODE> to an existing program, do the following:
  1406. <P>
  1407. <DL COMPACT>
  1408. <DT>@bullet{Make sure the <TT>`Makefile'</TT> conforms to the GNU standard}
  1409. <DD>The coding standard for writing a GNU <TT>`Makefile'</TT> is described in
  1410. section `Makefile Conventions' in <CITE>GNU Coding Standards</CITE>.  For
  1411. technical information on writing a <TT>`Makefile'</TT>, see section `Writing Makefiles' in <CITE>GNU Make</CITE>.
  1412.  
  1413. <DT>@bullet{Add Cygnus extensions to the <TT>`Makefile'</TT>}
  1414. <DD>These are described in section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>.
  1415.  
  1416. <DT>@bullet{Collect package specific definitions in a single file}
  1417. <DD>Many packages are best configured using a common <TT>`Makefile'</TT> fragment which
  1418. is included by all of the makefiles in the different directories of the
  1419. package.  In order to accomplish this, set the variable
  1420. <SAMP>`package_makefile_fragment'</SAMP> to the name of the file.  It will be inserted
  1421. into the final <TT>`Makefile'</TT> before the target-specific fragment.
  1422.  
  1423. <DT>@bullet{Move host support from <TT>`Makefile'</TT> to fragments}
  1424. <DD>This usually involves finding sections of the <TT>`Makefile'</TT> that say things
  1425. like "uncomment these lines for host <VAR>hosttype</VAR>" and moving them to a new
  1426. file called <TT>`./config/mh-<VAR>hosttype</VAR>'</TT>. For more information, see section <A HREF="CONFIGUR.000#SEC28">Adding hosts and targets</A>.
  1427.  
  1428. <DT>@bullet{Choose defaults}
  1429. <DD>If the program has compile-time options that determine the way the program
  1430. should behave, choose reasonable defaults and make these <TT>`Makefile'</TT>
  1431. variables.  Be sure the variables are assigned their default values before the
  1432. <SAMP>`####'</SAMP> line so that site-specific <TT>`Makefile'</TT> fragments can override
  1433. them (see section <A HREF="CONFIGUR.000#SEC25">Extensions to the GNU coding standards</A>).
  1434.  
  1435. <DT>@bullet{Locate configuration files}
  1436. <DD>If there is configuration information in header files or source files, separate
  1437. it in such a way that the files have generic names.  Then move the specific
  1438. instances of those files into the <TT>`./config/'</TT> subdirectory.
  1439.  
  1440. <DT>@bullet{Separate host and target information}
  1441. <DD>Some programs already have this information separated.  If yours does not, you
  1442. will need to separate these two kinds of configuration information.  <DFN>Host
  1443. specific</DFN> information is the information needed to compile the program.
  1444. <DFN>Target specific</DFN> information is information on the format of data files
  1445. that the program will read or write.  This information should live in separate
  1446. files in the <TT>`./config/'</TT> subdirectory with names that reflect the
  1447. configuration for which they are intended.
  1448.  
  1449. At this point you might skip this step and simply move on.  If you do, you
  1450. should end up with a program that can be configured only to build <DFN>native</DFN>
  1451. tools, that is, tools for which the host system is also the target system.
  1452. Later, you could attempt to build a cross tool and separate out the
  1453. target-specific information by figuring out what went wrong.  This is often
  1454. simpler than combing through all of the source code.
  1455.  
  1456. <DT>@bullet{Write <CODE>configure.in</CODE>}
  1457. <DD>Usually this involves writing shell script fragments to map from canonical
  1458. configuration names into the names of the configuration files.  These files
  1459. will then be linked at configure time from the specific instances of those
  1460. files in <TT>`./config'</TT> to files in the build directory with more generic
  1461. names.  (See also section <A HREF="CONFIGUR.000#SEC6">Build directories</A>.)  The format of
  1462. <TT>`configure.in'</TT> is described in section <A HREF="CONFIGUR.000#SEC10">The <CODE>configure.in</CODE> input file</A>.
  1463.  
  1464. <DT>@bullet{Rename <TT>`Makefile'</TT> to <TT>`Makefile.in'</TT>}
  1465. <DD></DL>
  1466. <P>
  1467. At this point you should have a program that can be configured using
  1468. Cygnus <CODE>configure</CODE>.
  1469. <P>
  1470. <A NAME="IDX214"></A>
  1471. <A NAME="IDX215"></A>
  1472. <H2><A NAME="SEC28" HREF="CONFIGUR.HTM#SEC28">Adding hosts and targets</A></H2>
  1473. <P>
  1474. To add a host or target to a program that already uses Cygnus <CODE>configure</CODE>,
  1475. do the following.
  1476. <P>
  1477. <UL>
  1478.  
  1479. <LI>
  1480. Make sure the new configuration name is represented in <TT>`config.sub'</TT>.  If
  1481. not, add it.  For more details, see the comments in the shell script
  1482. <TT>`config.sub'</TT>.
  1483.  
  1484. <LI>
  1485. If you are adding a host configuration, look in <TT>`configure.in'</TT>, in the
  1486. <DFN>per-host</DFN> section.  Make sure that your configuration name is represented
  1487. in the mapping from host configuration names to configuration files.  If not,
  1488. add it.  Also see section <A HREF="CONFIGUR.000#SEC10">The <CODE>configure.in</CODE> input file</A>.
  1489.  
  1490. <LI>
  1491. If you are adding a target configuration, look in <TT>`configure.in'</TT>, in the
  1492. <DFN>per-target</DFN> section.  Make sure that your configuration name is
  1493. represented in the mapping from target configuration names to configuration
  1494. files.  If not, add it.  Also see section <A HREF="CONFIGUR.000#SEC10">The <CODE>configure.in</CODE> input file</A>.
  1495.  
  1496. <LI>
  1497. Look in <TT>`configure.in'</TT> for the variables <SAMP>`files'</SAMP>, <SAMP>`links'</SAMP>,
  1498. <SAMP>`host_makefile_frag'</SAMP>, and <SAMP>`target_makefile_frag'</SAMP>.  The values
  1499. assigned to these variables are the names of the configuration files, (relative
  1500. to <SAMP>`srcdir'</SAMP>) that the program uses.  Make sure that copies of the files
  1501. exist for your host.  If not, create them.  See also section <A HREF="CONFIGUR.000#SEC11">Variables available to <CODE>configure.in</CODE></A>.
  1502. </UL>
  1503. <P>
  1504. This should be enough to <CODE>configure</CODE> for a new host or target
  1505. configuration name.  Getting the program to compile and run properly represents
  1506. the hardest work of any port.
  1507. <P>
  1508. <A NAME="IDX216"></A>
  1509. <A NAME="IDX217"></A>
  1510. <H2><A NAME="SEC29" HREF="CONFIGUR.HTM#SEC29">Adding site info</A></H2>
  1511. <P>
  1512. If some of the <TT>`Makefile'</TT> defaults are not right for your site, you can
  1513. build site-specific <TT>`Makefile'</TT> fragments.  To do this, do the following.
  1514. <P>
  1515. <UL>
  1516.  
  1517. <LI>
  1518. Choose a name for your site.  It must currently be less than eleven characters.
  1519.  
  1520. <LI>
  1521. If the program source does not have a <TT>`./config/'</TT> subdirectory, create it.
  1522.  
  1523. <LI>
  1524. Create a file called <TT>`./config/ms-<VAR>site</VAR>'</TT> where <VAR>site</VAR> is the name
  1525. of your site.  In it, set whatever <TT>`Makefile'</TT> variables you need to
  1526. override to match your site's conventions.
  1527.  
  1528. <LI>
  1529. Configure the program with:
  1530.  
  1531. <A NAME="IDX218"></A>
  1532. <PRE>
  1533. configure ... --site=<VAR>site</VAR>
  1534. </PRE>
  1535.  
  1536. </UL>
  1537. <P>
  1538. <H1><A NAME="SEC30" HREF="CONFIGUR.HTM#SEC30">Variable Index</A></H1>
  1539. <P>
  1540. <H2>b</H2>
  1541. <DIR>
  1542. <LI><A HREF="CONFIGUR.000#IDX172">bindir</A>
  1543. </DIR>
  1544. <H2>c</H2>
  1545. <DIR>
  1546. <LI><A HREF="CONFIGUR.000#IDX108">configdirs</A>
  1547. </DIR>
  1548. <H2>d</H2>
  1549. <DIR>
  1550. <LI><A HREF="CONFIGUR.000#IDX186">docdir</A>
  1551. </DIR>
  1552. <H2>e</H2>
  1553. <DIR>
  1554. <LI><A HREF="CONFIGUR.000#IDX34">exec-prefix</A>
  1555. <LI><A HREF="CONFIGUR.000#IDX174">exec_prefix</A>
  1556. </DIR>
  1557. <H2>f</H2>
  1558. <DIR>
  1559. <LI><A HREF="CONFIGUR.000#IDX138">files</A>
  1560. <LI><A HREF="CONFIGUR.000#IDX125">floating_point</A>
  1561. </DIR>
  1562. <H2>g</H2>
  1563. <DIR>
  1564. <LI><A HREF="CONFIGUR.000#IDX127">gas</A>
  1565. </DIR>
  1566. <H2>h</H2>
  1567. <DIR>
  1568. <LI><A HREF="CONFIGUR.000#IDX113">host</A>
  1569. <LI><A HREF="CONFIGUR.000#IDX114">host_cpu</A>
  1570. <LI><A HREF="CONFIGUR.000#IDX131">host_makefile_frag</A>
  1571. <LI><A HREF="CONFIGUR.000#IDX116">host_os</A>
  1572. <LI><A HREF="CONFIGUR.000#IDX115">host_vendor</A>
  1573. </DIR>
  1574. <H2>i</H2>
  1575. <DIR>
  1576. <LI><A HREF="CONFIGUR.000#IDX188">includedir</A>
  1577. <LI><A HREF="CONFIGUR.000#IDX184">infodir</A>
  1578. </DIR>
  1579. <H2>l</H2>
  1580. <DIR>
  1581. <LI><A HREF="CONFIGUR.000#IDX176">libdir</A>
  1582. <LI><A HREF="CONFIGUR.000#IDX140">links</A>
  1583. </DIR>
  1584. <H2>m</H2>
  1585. <DIR>
  1586. <LI><A HREF="CONFIGUR.000#IDX134">Makefile</A>
  1587. <LI><A HREF="CONFIGUR.000#IDX178">mandir</A>
  1588. <LI><A HREF="CONFIGUR.000#IDX180">man<VAR>N</VAR>dir</A>
  1589. <LI><A HREF="CONFIGUR.000#IDX182">man<VAR>N</VAR>ext</A>
  1590. </DIR>
  1591. <H2>n</H2>
  1592. <DIR>
  1593. <LI><A HREF="CONFIGUR.000#IDX50">nfp</A>
  1594. <LI><A HREF="CONFIGUR.000#IDX47">norecursion</A>
  1595. </DIR>
  1596. <H2>p</H2>
  1597. <DIR>
  1598. <LI><A HREF="CONFIGUR.000#IDX130">package_makefile_frag</A>
  1599. <LI><A HREF="CONFIGUR.000#IDX170">prefix</A>
  1600. <LI><A HREF="CONFIGUR.000#IDX37">program-prefix</A>
  1601. </DIR>
  1602. <H2>r</H2>
  1603. <DIR>
  1604. <LI><A HREF="CONFIGUR.000#IDX136">removing</A>
  1605. <LI><A HREF="CONFIGUR.000#IDX25">rm</A>
  1606. </DIR>
  1607. <H2>s</H2>
  1608. <DIR>
  1609. <LI><A HREF="CONFIGUR.000#IDX28">site</A>
  1610. <LI><A HREF="CONFIGUR.000#IDX133">site_makefile_frag</A>
  1611. <LI><A HREF="CONFIGUR.000#IDX129">srcdir</A>
  1612. <LI><A HREF="CONFIGUR.000#IDX106">srcname</A>
  1613. <LI><A HREF="CONFIGUR.000#IDX104">srctrigger</A>
  1614. <LI><A HREF="CONFIGUR.000#IDX110">subdirs</A>
  1615. </DIR>
  1616. <H2>t</H2>
  1617. <DIR>
  1618. <LI><A HREF="CONFIGUR.000#IDX119">target</A>
  1619. <LI><A HREF="CONFIGUR.000#IDX120">target_cpu</A>
  1620. <LI><A HREF="CONFIGUR.000#IDX132">target_makefile_frag</A>
  1621. <LI><A HREF="CONFIGUR.000#IDX122">target_os</A>
  1622. <LI><A HREF="CONFIGUR.000#IDX121">target_vendor</A>
  1623. <LI><A HREF="CONFIGUR.000#IDX40">tmpdir</A>
  1624. </DIR>
  1625. <H2>v</H2>
  1626. <DIR>
  1627. <LI><A HREF="CONFIGUR.000#IDX58">verbose</A>
  1628. </DIR>
  1629. <H2>w</H2>
  1630. <DIR>
  1631. <LI><A HREF="CONFIGUR.000#IDX43">with-<VAR>package</VAR></A>
  1632. </DIR>
  1633. <P>
  1634. <H1><A NAME="SEC31" HREF="CONFIGUR.HTM#SEC31">Concept Index</A></H1>
  1635. <P>
  1636. <H2>-</H2>
  1637. <DIR>
  1638. <LI><A HREF="CONFIGUR.000#IDX32"><CODE>--exec-prefix</CODE></A>
  1639. <LI><A HREF="CONFIGUR.000#IDX63"><CODE>--help</CODE></A>
  1640. <LI><A HREF="CONFIGUR.000#IDX48"><CODE>--nfp</CODE></A>
  1641. <LI><A HREF="CONFIGUR.000#IDX45"><CODE>--norecursion</CODE></A>
  1642. <LI><A HREF="CONFIGUR.000#IDX29"><CODE>--prefix</CODE></A>
  1643. <LI><A HREF="CONFIGUR.000#IDX35"><CODE>--program-prefix</CODE></A>
  1644. <LI><A HREF="CONFIGUR.000#IDX23"><CODE>--rm</CODE></A>
  1645. <LI><A HREF="CONFIGUR.000#IDX26"><CODE>--site</CODE></A>
  1646. <LI><A HREF="CONFIGUR.000#IDX20"><CODE>--srcdir</CODE></A>
  1647. <LI><A HREF="CONFIGUR.000#IDX17"><CODE>--target</CODE></A>
  1648. <LI><A HREF="CONFIGUR.000#IDX38"><CODE>--tmpdir</CODE></A>
  1649. <LI><A HREF="CONFIGUR.000#IDX54"><CODE>--verbose</CODE></A>
  1650. <LI><A HREF="CONFIGUR.000#IDX60"><CODE>--version</CODE></A>
  1651. <LI><A HREF="CONFIGUR.000#IDX41"><CODE>--with-<VAR>package</VAR></CODE></A>
  1652. <LI><A HREF="CONFIGUR.000#IDX51"><CODE>-s</CODE></A>
  1653. <LI><A HREF="CONFIGUR.000#IDX53"><CODE>-v</CODE></A>
  1654. </DIR>
  1655. <H2>.</H2>
  1656. <DIR>
  1657. <LI><A HREF="CONFIGUR.000#IDX10"><CODE>.gdbinit</CODE></A>
  1658. </DIR>
  1659. <H2>a</H2>
  1660. <DIR>
  1661. <LI><A HREF="CONFIGUR.000#IDX65">Abbreviating option names</A>
  1662. <LI><A HREF="CONFIGUR.000#IDX212">Adding <CODE>configure</CODE> to new programs</A>
  1663. <LI><A HREF="CONFIGUR.000#IDX214">Adding hosts and targets</A>
  1664. <LI><A HREF="CONFIGUR.000#IDX193">Adding local info</A>
  1665. <LI><A HREF="CONFIGUR.000#IDX217">Adding site info</A>
  1666. <LI><A HREF="CONFIGUR.000#IDX213"><CODE>autoconf</CODE></A>
  1667. </DIR>
  1668. <H2>b</H2>
  1669. <DIR>
  1670. <LI><A HREF="CONFIGUR.000#IDX71">Behind the scenes</A>
  1671. <LI><A HREF="CONFIGUR.000#IDX171"><CODE>bindir</CODE></A>
  1672. <LI><A HREF="CONFIGUR.000#IDX210">BISON</A>
  1673. <LI><A HREF="CONFIGUR.000#IDX86">Build directories</A>
  1674. <LI><A HREF="CONFIGUR.000#IDX82">Build variables</A>
  1675. <LI><A HREF="CONFIGUR.000#IDX88">Building for multiple hosts</A>
  1676. <LI><A HREF="CONFIGUR.000#IDX89">Building for multiple targets</A>
  1677. </DIR>
  1678. <H2>c</H2>
  1679. <DIR>
  1680. <LI><A HREF="CONFIGUR.000#IDX118">Canonical "triple"</A>
  1681. <LI><A HREF="CONFIGUR.000#IDX157">Changing the install directory</A>
  1682. <LI><A HREF="CONFIGUR.000#IDX203">clean</A>
  1683. <LI><A HREF="CONFIGUR.000#IDX200">clean-info</A>
  1684. <LI><A HREF="CONFIGUR.000#IDX197">Coding standards extensions</A>
  1685. <LI><A HREF="CONFIGUR.000#IDX94"><CODE>config.guess</CODE></A>
  1686. <LI><A HREF="CONFIGUR.000#IDX79"><CODE>config.guess</CODE> definition</A>
  1687. <LI><A HREF="CONFIGUR.000#IDX95"><CODE>config.status</CODE></A>
  1688. <LI><A HREF="CONFIGUR.000#IDX80"><CODE>config.status</CODE> definition</A>
  1689. <LI><A HREF="CONFIGUR.000#IDX77"><CODE>config.sub</CODE> definition</A>
  1690. <LI><A HREF="CONFIGUR.000#IDX81"><CODE>config/</CODE> subdirectory</A>
  1691. <LI><A HREF="CONFIGUR.000#IDX107"><CODE>configdirs</CODE></A>
  1692. <LI><A HREF="CONFIGUR.000#IDX72"><CODE>configure</CODE> back end</A>
  1693. <LI><A HREF="CONFIGUR.000#IDX73"><CODE>configure</CODE> details</A>
  1694. <LI><A HREF="CONFIGUR.000#IDX102">configure variables</A>
  1695. <LI><A HREF="CONFIGUR.000#IDX96"><CODE>configure.in</CODE></A>
  1696. <LI><A HREF="CONFIGUR.000#IDX75"><CODE>configure.in</CODE> definition</A>
  1697. <LI><A HREF="CONFIGUR.000#IDX101"><TT>`configure.in'</TT> interface</A>
  1698. <LI><A HREF="CONFIGUR.000#IDX160">Configuring for multiple hosts</A>
  1699. <LI><A HREF="CONFIGUR.000#IDX1">copyleft</A>
  1700. <LI><A HREF="CONFIGUR.000#IDX196">Cygnus extensions</A>
  1701. <LI><A HREF="CONFIGUR.000#IDX83">Cygnus Support Developer's Kit</A>
  1702. </DIR>
  1703. <H2>d</H2>
  1704. <DIR>
  1705. <LI><A HREF="CONFIGUR.000#IDX207">datadir</A>
  1706. <LI><A HREF="CONFIGUR.000#IDX143">Declarations section</A>
  1707. <LI><A HREF="CONFIGUR.000#IDX93">Default configuration</A>
  1708. <LI><A HREF="CONFIGUR.000#IDX68">Detailed usage</A>
  1709. <LI><A HREF="CONFIGUR.000#IDX205">docdir</A>
  1710. <LI><A HREF="CONFIGUR.000#IDX185"><CODE>docdir</CODE></A>
  1711. </DIR>
  1712. <H2>e</H2>
  1713. <DIR>
  1714. <LI><A HREF="CONFIGUR.000#IDX153">Example <TT>`configure.in'</TT></A>
  1715. <LI><A HREF="CONFIGUR.000#IDX218">Example session</A>
  1716. <LI><A HREF="CONFIGUR.000#IDX33"><CODE>exec-prefix</CODE> option</A>
  1717. <LI><A HREF="CONFIGUR.000#IDX173"><CODE>exec_prefix</CODE></A>
  1718. </DIR>
  1719. <H2>f</H2>
  1720. <DIR>
  1721. <LI><A HREF="CONFIGUR.000#IDX123"><CODE>floating_point</CODE></A>
  1722. <LI><A HREF="CONFIGUR.000#IDX142">For each invocation</A>
  1723. </DIR>
  1724. <H2>h</H2>
  1725. <DIR>
  1726. <LI><A HREF="CONFIGUR.000#IDX64"><CODE>help</CODE> option</A>
  1727. <LI><A HREF="CONFIGUR.000#IDX111"><CODE>host</CODE></A>
  1728. <LI><A HREF="CONFIGUR.000#IDX189">Host</A>
  1729. <LI><A HREF="CONFIGUR.000#IDX146"><I>host</I> shell-script fragment</A>
  1730. <LI><A HREF="CONFIGUR.000#IDX145">Host-specific instructions</A>
  1731. <LI><A HREF="CONFIGUR.000#IDX215">Hosts and targets</A>
  1732. </DIR>
  1733. <H2>i</H2>
  1734. <DIR>
  1735. <LI><A HREF="CONFIGUR.000#IDX206">includedir</A>
  1736. <LI><A HREF="CONFIGUR.000#IDX187"><CODE>includedir</CODE></A>
  1737. <LI><A HREF="CONFIGUR.000#IDX198">info</A>
  1738. <LI><A HREF="CONFIGUR.000#IDX209">infodir</A>
  1739. <LI><A HREF="CONFIGUR.000#IDX183"><CODE>infodir</CODE></A>
  1740. <LI><A HREF="CONFIGUR.000#IDX202">install</A>
  1741. <LI><A HREF="CONFIGUR.000#IDX166">Install details</A>
  1742. <LI><A HREF="CONFIGUR.000#IDX156">Install locations</A>
  1743. <LI><A HREF="CONFIGUR.000#IDX199">install-info</A>
  1744. <LI><A HREF="CONFIGUR.000#IDX167">Installation subdirectories</A>
  1745. <LI><A HREF="CONFIGUR.000#IDX162">Installing host-independent files</A>
  1746. <LI><A HREF="CONFIGUR.000#IDX2">Introduction</A>
  1747. <LI><A HREF="CONFIGUR.000#IDX14">Invoking <CODE>configure</CODE></A>
  1748. </DIR>
  1749. <H2>l</H2>
  1750. <DIR>
  1751. <LI><A HREF="CONFIGUR.000#IDX175"><CODE>libdir</CODE></A>
  1752. <LI><A HREF="CONFIGUR.000#IDX192">Local conventions</A>
  1753. </DIR>
  1754. <H2>m</H2>
  1755. <DIR>
  1756. <LI><A HREF="CONFIGUR.000#IDX201">Makefile</A>
  1757. <LI><A HREF="CONFIGUR.000#IDX195"><CODE>Makefile</CODE> extensions</A>
  1758. <LI><A HREF="CONFIGUR.000#IDX191"><CODE>Makefile</CODE> fragments</A>
  1759. <LI><A HREF="CONFIGUR.000#IDX92"><CODE>Makefile</CODE> generation</A>
  1760. <LI><A HREF="CONFIGUR.000#IDX76"><CODE>Makefile.in</CODE> definition</A>
  1761. <LI><A HREF="CONFIGUR.000#IDX208">mandir</A>
  1762. <LI><A HREF="CONFIGUR.000#IDX177"><CODE>mandir</CODE></A>
  1763. <LI><A HREF="CONFIGUR.000#IDX179"><CODE>man<VAR>N</VAR>dir</CODE></A>
  1764. <LI><A HREF="CONFIGUR.000#IDX181"><CODE>man<VAR>N</VAR>ext</CODE></A>
  1765. <LI><A HREF="CONFIGUR.000#IDX141">Minimal <TT>`configure.in'</TT> example</A>
  1766. </DIR>
  1767. <H2>n</H2>
  1768. <DIR>
  1769. <LI><A HREF="CONFIGUR.000#IDX124"><CODE>nfp</CODE> option</A>
  1770. <LI><A HREF="CONFIGUR.000#IDX46"><CODE>norecursion</CODE> option</A>
  1771. </DIR>
  1772. <H2>o</H2>
  1773. <DIR>
  1774. <LI><A HREF="CONFIGUR.000#IDX87">Object directories</A>
  1775. <LI><A HREF="CONFIGUR.000#IDX74">Other files</A>
  1776. <LI><A HREF="CONFIGUR.000#IDX3">Overview</A>
  1777. </DIR>
  1778. <H2>p</H2>
  1779. <DIR>
  1780. <LI><A HREF="CONFIGUR.000#IDX147"><I>per-host</I> section</A>
  1781. <LI><A HREF="CONFIGUR.000#IDX144"><I>per-invocation</I> section</A>
  1782. <LI><A HREF="CONFIGUR.000#IDX150"><I>per-target</I> section</A>
  1783. <LI><A HREF="CONFIGUR.000#IDX211">Porting with <CODE>configure</CODE></A>
  1784. <LI><A HREF="CONFIGUR.000#IDX152"><I>post-target</I> section</A>
  1785. <LI><A HREF="CONFIGUR.000#IDX151">Post-target shell-script fragment</A>
  1786. <LI><A HREF="CONFIGUR.000#IDX169"><CODE>prefix</CODE></A>
  1787. <LI><A HREF="CONFIGUR.000#IDX158"><CODE>prefix</CODE> option</A>
  1788. <LI><A HREF="CONFIGUR.000#IDX36"><CODE>program-prefix</CODE> option</A>
  1789. </DIR>
  1790. <H2>r</H2>
  1791. <DIR>
  1792. <LI><A HREF="CONFIGUR.000#IDX13">Recursion</A>
  1793. <LI><A HREF="CONFIGUR.000#IDX135"><CODE>rm</CODE> option</A>
  1794. </DIR>
  1795. <H2>s</H2>
  1796. <DIR>
  1797. <LI><A HREF="CONFIGUR.000#IDX52"><CODE>s</CODE> option</A>
  1798. <LI><A HREF="CONFIGUR.000#IDX154">Sample <TT>`configure.in'</TT></A>
  1799. <LI><A HREF="CONFIGUR.000#IDX161">Sharing host-independent files</A>
  1800. <LI><A HREF="CONFIGUR.000#IDX27"><CODE>site</CODE> option</A>
  1801. <LI><A HREF="CONFIGUR.000#IDX216">Sites</A>
  1802. <LI><A HREF="CONFIGUR.000#IDX128"><CODE>srcdir</CODE></A>
  1803. <LI><A HREF="CONFIGUR.000#IDX21"><CODE>srcdir</CODE> option</A>
  1804. <LI><A HREF="CONFIGUR.000#IDX105"><CODE>srcname</CODE></A>
  1805. <LI><A HREF="CONFIGUR.000#IDX103"><CODE>srctrigger</CODE></A>
  1806. <LI><A HREF="CONFIGUR.000#IDX168">Subdirectories</A>
  1807. <LI><A HREF="CONFIGUR.000#IDX109"><CODE>subdirs</CODE></A>
  1808. <LI><A HREF="CONFIGUR.000#IDX139">Symbolic links</A>
  1809. </DIR>
  1810. <H2>t</H2>
  1811. <DIR>
  1812. <LI><A HREF="CONFIGUR.000#IDX190">Target</A>
  1813. <LI><A HREF="CONFIGUR.000#IDX117"><CODE>target</CODE></A>
  1814. <LI><A HREF="CONFIGUR.000#IDX18"><CODE>target</CODE> option</A>
  1815. <LI><A HREF="CONFIGUR.000#IDX149">target shell-script fragment</A>
  1816. <LI><A HREF="CONFIGUR.000#IDX148">Target-specific instructions</A>
  1817. <LI><A HREF="CONFIGUR.000#IDX163">The <CODE>exec_prefix</CODE> directory</A>
  1818. <LI><A HREF="CONFIGUR.000#IDX39"><CODE>tmpdir</CODE> option</A>
  1819. <LI><A HREF="CONFIGUR.000#IDX66">Truncating option names</A>
  1820. </DIR>
  1821. <H2>u</H2>
  1822. <DIR>
  1823. <LI><A HREF="CONFIGUR.000#IDX62">Usage</A>
  1824. <LI><A HREF="CONFIGUR.000#IDX69">Usage: detailed</A>
  1825. <LI><A HREF="CONFIGUR.000#IDX67">Using <CODE>configure</CODE></A>
  1826. </DIR>
  1827. <H2>v</H2>
  1828. <DIR>
  1829. <LI><A HREF="CONFIGUR.000#IDX55"><CODE>v</CODE> option</A>
  1830. <LI><A HREF="CONFIGUR.000#IDX84">Variables</A>
  1831. <LI><A HREF="CONFIGUR.000#IDX56"><CODE>verbose</CODE> option</A>
  1832. <LI><A HREF="CONFIGUR.000#IDX57">Verbose Output</A>
  1833. <LI><A HREF="CONFIGUR.000#IDX61">version</A>
  1834. </DIR>
  1835. <H2>w</H2>
  1836. <DIR>
  1837. <LI><A HREF="CONFIGUR.000#IDX4">What <CODE>configure</CODE> does</A>
  1838. <LI><A HREF="CONFIGUR.000#IDX70">What <CODE>configure</CODE> really does</A>
  1839. <LI><A HREF="CONFIGUR.000#IDX155">Where to install</A>
  1840. <LI><A HREF="CONFIGUR.000#IDX126"><CODE>with-gnu-as</CODE> option</A>
  1841. <LI><A HREF="CONFIGUR.000#IDX42"><CODE>with-<VAR>package</VAR></CODE> option</A>
  1842. </DIR>
  1843. </BODY>
  1844. </HTML>
  1845.