1 This is configure.info, produced by makeinfo version 4.0 from
4 INFO-DIR-SECTION GNU admin
6 * configure: (configure). The GNU configure and build system
9 This file documents the GNU configure and build system.
11 Copyright (C) 1998 Cygnus Solutions.
13 Permission is granted to make and distribute verbatim copies of this
14 manual provided the copyright notice and this permission notice are
15 preserved on all copies.
17 Permission is granted to copy and distribute modified versions of
18 this manual under the conditions for verbatim copying, provided that
19 the entire resulting derived work is distributed under the terms of a
20 permission notice identical to this one.
22 Permission is granted to copy and distribute translations of this
23 manual into another language, under the above conditions for modified
24 versions, except that this permission notice may be stated in a
25 translation approved by the Foundation.
28 File: configure.info, Node: Multilibs in Target Libraries, Prev: Multilibs in gcc, Up: Multilibs
30 Multilibs in Target Libraries
31 =============================
33 The target libraries in the Cygnus tree are automatically built with
34 multilibs. That means that each library is built multiple times.
36 This default is set in the top level `configure.in' file, by adding
37 `--enable-multilib' to the list of arguments passed to configure when
38 it is run for the target libraries (*note Host and Target Libraries::).
40 Each target library uses the shell script `config-ml.in', written by
41 Doug Evans, to prepare to build target libraries. This shell script is
42 invoked after the `Makefile' has been created by the `configure'
43 script. If multilibs are not enabled, it does nothing, otherwise it
44 modifies the `Makefile' to support multilibs.
46 The `config-ml.in' script makes one copy of the `Makefile' for each
47 multilib in the appropriate subdirectory. When configuring in the
48 source directory (which is not recommended), it will build a symlink
49 tree of the sources in each subdirectory.
51 The `config-ml.in' script sets several variables in the various
52 `Makefile's. The `Makefile.in' must have definitions for these
53 variables already; `config-ml.in' simply changes the existing values.
54 The `Makefile' should use default values for these variables which will
55 do the right thing in the subdirectories.
58 `config-ml.in' will set this to a sequence of `../' strings, where
59 the number of strings is the number of multilib levels in the
60 source tree. The default value should be the empty string.
63 `config-ml.in' will set this to a sequence of `../' strings, where
64 the number of strings is number of multilib levels in the object
65 directory. The default value should be the empty string. This
66 will differ from `MULTISRCTOP' when configuring in the source tree
67 (which is not recommended).
70 In the top level `Makefile' only, `config-ml.in' will set this to
71 the list of multilib subdirectories. The default value should be
75 `config-ml.in' will set this to the installed subdirectory name to
76 use for this subdirectory, with a leading `/'. The default value
77 shold be the empty string.
81 In the top level `Makefile' only, `config-ml.in' will set these
82 variables to commands to use when doing a recursive make. These
83 variables should both default to the string `true', so that by
84 default nothing happens.
86 All references to the parent of the source directory should use the
87 variable `MULTISRCTOP'. Instead of writing `$(srcdir)/..', you must
88 write `$(srcdir)/$(MULTISRCTOP)..'.
90 Similarly, references to the parent of the object directory should
91 use the variable `MULTIBUILDTOP'.
93 In the installation target, the libraries should be installed in the
94 subdirectory `MULTISUBDIR'. Instead of installing
95 `$(libdir)/libfoo.a', install `$(libdir)$(MULTISUBDIR)/libfoo.a'.
97 The `config-ml.in' script also modifies the top level `Makefile' to
98 add `multi-do' and `multi-clean' targets which are used when building
101 The default target of the `Makefile' should include the following
103 @$(MULTIDO) $(FLAGS_TO_PASS) DO=all multi-do
105 This assumes that `$(FLAGS_TO_PASS)' is defined as a set of variables
106 to pass to a recursive invocation of `make'. This will build all the
107 multilibs. Note that the default value of `MULTIDO' is `true', so by
108 default this command will do nothing. It will only do something in the
109 top level `Makefile' if multilibs were enabled.
111 The `install' target of the `Makefile' should include the following
113 @$(MULTIDO) $(FLAGS_TO_PASS) DO=install multi-do
115 In general, any operation, other than clean, which should be
116 performed on all the multilibs should use a `$(MULTIDO)' line, setting
117 the variable `DO' to the target of each recursive call to `make'.
119 The `clean' targets (`clean', `mostlyclean', etc.) should use
120 `$(MULTICLEAN)'. For example, the `clean' target should do this:
121 @$(MULTICLEAN) DO=clean multi-clean
124 File: configure.info, Node: FAQ, Next: Index, Prev: Multilibs, Up: Top
126 Frequently Asked Questions
127 **************************
129 Which do I run first, `autoconf' or `automake'?
130 Except when you first add autoconf or automake support to a
131 package, you shouldn't run either by hand. Instead, configure
132 with the `--enable-maintainer-mode' option, and let `make' take
135 `autoconf' says something about undefined macros.
136 This means that you have macros in your `configure.in' which are
137 not defined by `autoconf'. You may be using an old version of
138 `autoconf'; try building and installing a newer one. Make sure the
139 newly installled `autoconf' is first on your `PATH'. Also, see
142 My `configure' script has stuff like `CY_GNU_GETTEXT' in it.
143 This means that you have macros in your `configure.in' which should
144 be defined in your `aclocal.m4' file, but aren't. This usually
145 means that `aclocal' was not able to appropriate definitions of the
146 macros. Make sure that you have installed all the packages you
147 need. In particular, make sure that you have installed libtool
148 (this is where `AM_PROG_LIBTOOL' is defined) and gettext (this is
149 where `CY_GNU_GETTEXT' is defined, at least in the Cygnus version
152 My `Makefile' has `@' characters in it.
153 This may mean that you tried to use an autoconf substitution in
154 your `Makefile.in' without adding the appropriate `AC_SUBST' call
155 to your `configure' script. Or it may just mean that you need to
156 rebuild `Makefile' in your build directory. To rebuild `Makefile'
157 from `Makefile.in', run the shell script `config.status' with no
158 arguments. If you need to force `configure' to run again, first
159 run `config.status --recheck'. These runs are normally done
160 automatically by `Makefile' targets, but if your `Makefile' has
161 gotten messed up you'll need to help them along.
163 Why do I have to run both `config.status --recheck' and `config.status'?
164 Normally, you don't; they will be run automatically by `Makefile'
165 targets. If you do need to run them, use `config.status --recheck'
166 to run the `configure' script again with the same arguments as the
167 first time you ran it. Use `config.status' (with no arguments) to
168 regenerate all files (`Makefile', `config.h', etc.) based on the
169 results of the configure script. The two cases are separate
170 because it isn't always necessary to regenerate all the files
171 after running `config.status --recheck'. The `Makefile' targets
172 generated by automake will use the environment variables
173 `CONFIG_FILES' and `CONFIG_HEADERS' to only regenerate files as
176 What is the Cygnus tree?
177 The Cygnus tree is used for various packages including gdb, the GNU
178 binutils, and egcs. It is also, of course, used for Cygnus
179 releases. It is the build system which was developed at Cygnus,
180 using the Cygnus configure script. It permits building many
181 different packages with a single configure and make. The
182 configure scripts in the tree are being converted to autoconf, but
183 the general build structure remains intact.
185 Why do I have to keep rebuilding and reinstalling the tools?
186 I know, it's a pain. Unfortunately, there are bugs in the tools
187 themselves which need to be fixed, and each time that happens
188 everybody who uses the tools need to reinstall new versions of
189 them. I don't know if there is going to be a clever fix until the
192 Why not just have a Cygnus tree `make' target to update the tools?
193 The tools unfortunately need to be installed before they can be
194 used. That means that they must be built using an appropriate
195 prefix, and it seems unwise to assume that every configuration
196 uses an appropriate prefix. It might be possible to make them
197 work in place, or it might be possible to install them in some
198 subdirectory; so far these approaches have not been implemented.
201 File: configure.info, Node: Index, Prev: FAQ, Up: Top
208 * --build option: Build and Host Options.
209 * --host option: Build and Host Options.
210 * --target option: Specifying the Target.
211 * _GNU_SOURCE: Write configure.in.
212 * AC_CANONICAL_HOST: Using the Host Type.
213 * AC_CANONICAL_SYSTEM: Using the Target Type.
214 * AC_CONFIG_HEADER: Write configure.in.
215 * AC_EXEEXT: Write configure.in.
216 * AC_INIT: Write configure.in.
217 * AC_OUTPUT: Write configure.in.
218 * AC_PREREQ: Write configure.in.
219 * AC_PROG_CC: Write configure.in.
220 * AC_PROG_CXX: Write configure.in.
221 * acconfig.h: Written Developer Files.
222 * acconfig.h, writing: Write acconfig.h.
223 * acinclude.m4: Written Developer Files.
224 * aclocal.m4: Generated Developer Files.
225 * AM_CONFIG_HEADER: Write configure.in.
226 * AM_DISABLE_SHARED: Write configure.in.
227 * AM_EXEEXT: Write configure.in.
228 * AM_INIT_AUTOMAKE: Write configure.in.
229 * AM_MAINTAINER_MODE: Write configure.in.
230 * AM_PROG_LIBTOOL: Write configure.in.
231 * AM_PROG_LIBTOOL in configure: FAQ.
232 * build option: Build and Host Options.
233 * building with a cross compiler: Canadian Cross.
234 * canadian cross: Canadian Cross.
235 * canadian cross in configure: CCross in Configure.
236 * canadian cross in cygnus tree: CCross in Cygnus Tree.
237 * canadian cross in makefile: CCross in Make.
238 * canadian cross, configuring: Build and Host Options.
239 * canonical system names: Configuration Names.
240 * config.cache: Build Files Description.
241 * config.h: Build Files Description.
242 * config.h.in: Generated Developer Files.
243 * config.in: Generated Developer Files.
244 * config.status: Build Files Description.
245 * config.status --recheck: FAQ.
246 * configuration names: Configuration Names.
247 * configuration triplets: Configuration Names.
248 * configure: Generated Developer Files.
249 * configure build system: Build and Host Options.
250 * configure host: Build and Host Options.
251 * configure target: Specifying the Target.
252 * configure.in: Written Developer Files.
253 * configure.in, writing: Write configure.in.
254 * configuring a canadian cross: Build and Host Options.
255 * cross compiler: Cross Compilation Concepts.
256 * cross compiler, building with: Canadian Cross.
257 * cross tools: Cross Compilation Tools.
258 * CY_GNU_GETTEXT in configure: FAQ.
259 * cygnus configure: Cygnus Configure.
262 * host names: Configuration Names.
263 * host option: Build and Host Options.
264 * host system: Host and Target.
265 * host triplets: Configuration Names.
266 * HOST_CC: CCross in Make.
267 * libg++ configure: Cygnus Configure in C++ Libraries.
268 * libio configure: Cygnus Configure in C++ Libraries.
269 * libstdc++ configure: Cygnus Configure in C++ Libraries.
270 * Makefile: Build Files Description.
271 * Makefile, garbage characters: FAQ.
272 * Makefile.am: Written Developer Files.
273 * Makefile.am, writing: Write Makefile.am.
274 * Makefile.in: Generated Developer Files.
275 * multilibs: Multilibs.
276 * stamp-h: Build Files Description.
277 * stamp-h.in: Generated Developer Files.
278 * system names: Configuration Names.
279 * system types: Configuration Names.
280 * target option: Specifying the Target.
281 * target system: Host and Target.
282 * triplets: Configuration Names.
283 * undefined macros: FAQ.