📄 configure.texi
字号:
\input texinfo @c -*-para-*-@c %**start of header@setfilename configure.info@settitle Cygnus Configure@c %**end of header@synindex ky cp@tex\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$\xdef\manvers{\$Revision: 1.1 $} % For use in headers, footers too@end tex@setchapternewpage off@ifinfo@formatSTART-INFO-DIR-ENTRY* configure: (configure). Cygnus configure.END-INFO-DIR-ENTRY@end format@end ifinfo@ifinfoThis document attempts to describe the Cygnus Support version of@code{configure}.Copyright (C) 1991, 1992 Cygnus SupportPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.@ignorePermission is granted to process this file through TeX and print theresults, provided the printed document carries copying permissionnotice identical to this one except for the removal of this paragraph(this paragraph not being relevant to the printed manual).@end ignorePermission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby Cygnus Support.@end ifinfo@titlepage@sp 10@title{Cygnus Configure}@subtitle @manvers, for Cygnus Configure version 1.84@author{K. Richard Pixley, @code{rich@@cygnus.com}}@author{Cygnus Support}@page@vskip 0pt plus 1filllCopyright @copyright{} 1991, 1992 Cygnus SupportPermission is granted to make and distribute verbatim copies ofthis manual provided the copyright notice and this permission noticeare preserved on all copies.Permission is granted to copy and distribute modified versions of thismanual under the conditions for verbatim copying, provided that the entireresulting derived work is distributed under the terms of a permissionnotice identical to this one.Permission is granted to copy and distribute translations of this manualinto another language, under the above conditions for modified versions,except that this permission notice may be stated in a translation approvedby Cygnus Support.@end titlepage@ifinfo@node top, What Configure Does, (dir), (dir)@top topThis file documents the configuration system used and distributed byCygnus Support.@menu* What Configure Does:: What Configure Does* Invoking:: Invoking* Using Configure:: Using Configure* Porting:: Porting with Configure* Reference:: Gory details described* Known Bugs:: Known Bugs* Variables Index:: Variable Index* Concept Index:: Concept Index --- The Detailed Node Listing ---Using Configure* Install Locations:: Where to install things once they are built* Build Directories:: Where to build object files* Host:: Telling @code{configure} what will source will be built* Target:: Telling @code{configure} what the source will target* Local Conventions:: Adding information about local conventionsInstall Locations* prefix:: Changing the default install directory* exec_prefix:: How to separate host independent files from host dependent files when installing for multiple hosts* Install Details:: Full descriptions of all installation subdirectoriesPorting with Configure* Programs:: Adding configure to new programs* Hosts and Targets:: Adding hosts and targets* Sites:: Adding site infoGory details described* Makefile Extensions:: Extensions to the @sc{gnu} coding standards* configure.in:: The format of the configure.in file* config.status:: config.status* Makefile Fragments:: Makefile FragmentsThe format of the @file{configure.in} file* Minimal:: A minimal configure.in* Configure Variables:: Variables available to configure.in* Declarations:: For each invocation* Per-host:: For each host* Per-target:: For each target* Post-target:: After each target* Example:: An example configure.in@end menu@end ifinfo@node What Configure Does, Invoking, top, top@chapter What Configure Does@code{configure} prepares source directories for building workingprograms. A program cannot be built until its source has beenconfigured. When configure runs, it does the following things.@table @emph@item Create build directories(see @ref{Build Directories}). When you run @code{configure} with the@code{-srcdir=} option, it uses the current directory as builddirectory, creating under it a directory tree that parallels thedirectory structure under the source directory. (See @ref{Invoking}).@item Generate makefilesA makefile template from the source directory, usually called@file{Makefile.in}, is copied to an output file in the build directory.The output file is usually named @file{Makefile}. @code{configure}places definitions for a number of standard makefile macros at thebeginning of the output file. If @code{-prefix=} or @code{-exec_prefix}were specified on the @code{configure} command line, correspondingmakefile variables are set accordingly. If host, target, or sitespecific makefile fragments exist, these are inserted into the outputfile. (See @ref{Makefiles, , , make, Makefiles}.)@item Generate @file{.gdbinit} If the source directory contains a@file{.gdbinit} file and the build directory is not the same as thesource directory, a @file{.gdbinit} file is created in the builddirectory. This @file{.gdbinit} file contains @code{dir} commands anda @code{source} command, which will cause the @file{.gdbinit} file fromthe source directory to be read by GDB, and will allow GDB to findsource files in either the source directory or the build directory.(see @ref{Command Files, , , gdb, Command Files}.)@item Make symbolic linksMost directories have some symbolic links with generic names builtpointing to specific files in the source directory. If the system where@code{configure} runs cannot support symbolic links, hard links are usedinstead.@item MiscellaneousIf the source directory has special needs, they are handled by shellscript fragments stored with the source. Usually there are no specialneeds, but sometimes they involve changes to the output makefile.@item Generate @file{config.status}@code{configure} creates a shell script named @file{config.status} inthe build directory. This shell script, when run from the builddirectory, will reconfigure the build directory (but not itssubdirectories). This is most often used to have a @code{Makefile} updateitself automatically if a new source directory is available.@item RecursionIf the source directory has subdirectories that should also beconfigured, @code{configure} is called for each.@end table@node Invoking, Using Configure, What Configure Does, top@chapter InvokingThe usual way to invoke @code{configure} is as follows:@exampleconfigure @var{host}@end exampleThis prepares the source to be compiled in a@var{host} environment with programs and files to be installed in@file{/usr/local}.@code{configure} prepares the source as you specify by selecting andusing script and Makefile fragments prepared in advance, and stored withthe source. @code{configure}'s command line options also allow you tospecify other aspects of the source configuration:@table @code@item -exec_prefix=@var{dir}Configure the source to install host dependent files in @var{dir}.This option sets the @code{configure} variable @code{exec_prefix}.Generated Makefiles will have their @code{exec_prefix} variables set tothis value. (See @ref{Install Details}.)@item -gasConfigure to use the @sc{GNU} assembler.@item -helpDisplay a quick summary of how to invoke @code{configure}.@item -host=@var{host}FIXME-soon: I don't think this option should be documented.@c Then why does it exist? /Pesch 7jan92@item -nfp@emph{No floating point} unit available on the target; configure toavoid dependencies on hardware floating point.@item -norecursionConfigure only this directory; ignore any subdirectories. This is usedby the executable shell script @file{config.status} to reconfigure thecurrent directory. (see @ref{config.status}).@item -prefix=@var{dir}Configure the source to install programs and files under directory@file{@var{dir}}.This option sets the @code{configure} variable @code{prefix}. GeneratedMakefiles will have their @code{prefix} variables set to this value.(See @ref{Install Details}.)@item -program_prefix=@var{string}Configure the source to install certain programs using @var{string} as aprefix. This applies to programs which might be used for cross-compilation,such as the compiler and the binutils, and also to programs which have the samename as a common Unix program, such as make.This option sets the @code{configure} variable @code{program_prefix}.Generated Makefiles will have their @code{program_prefix} variables set to thisvalue. (See @ref{Install Details}.)@item -program_suffix=@var{string}Configure the source to install certain programs using @var{string} as asuffix. This applies to programs which might be used for cross-compilation.@item -program_transform_name=@var{sed-pattern}Configure the source to install certain programs using the names that resultfrom passing the usual name through @code{sed} invoked with @var{sed-pattern}.This option may be given multiple times; each @var{sed-pattern} will be appliedin turn. This applies to programs which might be used for cross-compilation.This option sets the @code{configure} variable @code{program_transform_name}.Generated Makefiles will have their @code{program_transform_name} variables setto this value. (See @ref{Install Details}.)@item -recurring@c Wouldn't it make more sense to call this "-quiet"? (FIXME).This option is used internally by @code{configure} when recurring onsubdirectories. Its sole purpose is to suppress status output. You canoverride this effect with the @code{-verbose} option.@item -rm@emph{Remove} the configuration specified by @var{host} and the othercommand-line options, rather than creating it.@item -site=@var{site}Generate Makefiles using site specific Makefile fragments for@var{site}. See also @ref{Sites}.@item -srcdir=@var{_dir}Build Makefiles to use the sources located in directory @file{@var{dir}}. Thebuild directory is assumed to be @file{.}.@item -target=@var{target}Requests that the sources be configured to target the @var{target}machine. If no target is specified explicitly, the target is assumedto be the same as the host. @item -tmpdir=@var{tmpdir}Use the directory @var{tmpdir} for @code{configure}'s temporary files.The default is the value of the environment variable TMPDIR, or@file{/tmp} if the environment variable is not set.@item -verbose@itemx -vPrint status lines for each directory configured. Normally, only thestatus lines for the initial working directory are printed.@item -xUse @sc{MIT} style @sc{X11} header files and libraries on the host, evenif they are not normally available.@end table@node Using Configure, Porting, Invoking, top@chapter Using ConfigureThe choices and options available at configuration timegenerally have valid defaults, but the defaults do not cover all cases.The choices available include install locations, build directories,host, target, and local conventions.@menu* Install Locations:: Where to install things once they are built* Build Directories:: Where to build object files* Host:: Telling @code{configure} what will source will be built* Target:: Telling @code{configure} what the source will target* Local Conventions:: Adding information about local conventions@end menu@node Install Locations, Build Directories, Using Configure, Using Configure@section Install Locations@cindex Where to installUsing the default configuration, @code{make install} creates asingle tree of files, some of which are programs. The location of thistree is determined by the value of the variable @code{prefix}. Thedefault value of @code{prefix} is @file{/usr/local}. This isoften correct for native tools installed on only one host.@menu* prefix:: Changing the default install directory* exec_prefix:: How to separate host independent files from host dependent files when installing for multiple hosts* Install Details:: Full descriptions of all installation
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -