⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 autoconf.texi

📁 LINUX下的源码工具,可自己分析,或者直接装在系统上作为应用
💻 TEXI
📖 第 1 页 / 共 5 页
字号:
those files that are older than their sources.If you install a new version of some tool, you can make@command{autoreconf} remake @emph{all} of the files by giving it the@option{--force} option.@xref{Automatic Remaking}, for @file{Makefile} rules to automaticallyremake @command{configure} scripts when their source files change.  Thatmethod handles the timestamps of configuration header templatesproperly, but does not pass @option{--autoconf-dir=@var{dir}} or@option{--localdir=@var{dir}}.@noindent@command{autoreconf} accepts the following options:@table @option@item --help@itemx -hPrint a summary of the command line options and exit.@item --version@itemx -VPrint the version number of Autoconf and exit.@item --verbosePrint the name of each directory where @command{autoreconf} runs@command{autoconf} (and @command{autoheader}, if appropriate).@item --debug@itemx -dDon't remove the temporary files.@item --force@itemx -fRemake even @file{configure} scripts and configuration headers that arenewer than their input files (@file{configure.ac} and, if present,@file{aclocal.m4}).@item --install@itemx -iInstall the missing auxiliary files in the package.  By default, filesare copied; this can be changed with @option{--symlink}.This option triggers calls to @samp{automake --add-missing},@samp{libtoolize}, @samp{autopoint}, etc.@item --symlink@itemx -sWhen used with @option{--install}, install symbolic links to the missingauxiliary files instead of copying them.@item --make@itemx -mWhen the directories were configured, update the configuration byrunning @samp{./config.status --recheck && ./config.status}, and thenrun @samp{make}.@item --include=@var{dir}@itemx -I @var{dir}Append @var{dir} to the include path.  Multiple invocations accumulate.@item --prepend-include=@var{dir}@item -B @var{dir}Prepend @var{dir} to the include path.  Multiple invocations accumulate.@item --warnings=@var{category}@itemx -W @var{category}@evindex WARNINGSReport the warnings related to @var{category} (which can actually be acomma separated list).@table @samp@item crossrelated to cross compilation issues.@item obsoletereport the uses of obsolete constructs.@item portabilityportability issues@item syntaxdubious syntactic constructs.@item allreport all the warnings@item nonereport none@item errortreats warnings as errors@item no-@var{category}disable warnings falling into @var{category}@end tableWarnings about @samp{syntax} are enabled by default, and the environmentvariable @code{WARNINGS}, a comma separated list of categories, ishonored.  Passing @samp{-W @var{category}} will actually behave as ifyou had passed @samp{--warnings=syntax,$WARNINGS,@var{category}}.  Ifyou want to disable the defaults and @code{WARNINGS}, but (for example)enable the warnings about obsolete constructs, you would use @option{-Wnone,obsolete}.@end table@c ========================================= Initialization and Output Files.@node Setup@chapter Initialization and Output FilesAutoconf-generated @command{configure} scripts need some information abouthow to initialize, such as how to find the package's source files andabout the output files to produce.  The following sections describe theinitialization and the creation of output files.@menu* Initializing configure::      Option processing etc.* Notices::                     Copyright, version numbers in @command{configure}* Input::                       Where Autoconf should find files* Output::                      Outputting results from the configuration* Configuration Actions::       Preparing the output based on results* Configuration Files::         Creating output files* Makefile Substitutions::      Using output variables in @file{Makefile}s* Configuration Headers::       Creating a configuration header file* Configuration Commands::      Running arbitrary instantiation commands* Configuration Links::         Links depending on the configuration* Subdirectories::              Configuring independent packages together* Default Prefix::              Changing the default installation prefix@end menu@node Initializing configure@section Initializing @command{configure}Every @command{configure} script must call @code{AC_INIT} before doinganything else.  The only other required macro is @code{AC_OUTPUT}(@pxref{Output}).@defmac AC_INIT (@var{package}, @var{version}, @ovar{bug-report}, @ovar{tarname})@acindex INITProcess any command-line arguments and perform various initializationsand verifications.Set the name of the @var{package} and its @var{version}.  These aretypically used in @option{--version} support, including that of@command{configure}.  The optional argument @var{bug-report} should bethe email to which users should send bug reports.  The package@var{tarname} differs from @var{package}: the latter designates the fullpackage name (e.g., @samp{GNU Autoconf}), while the former is meant fordistribution tar ball names (e.g., @samp{autoconf}).  It defaults to@var{package} with @samp{GNU } stripped, lower-cased, and all charactersother than alphanumerics and underscores are changed to @samp{-}.It is preferable that the arguments of @code{AC_INIT} be static, i.e.,there should not be any shell computation, but they can be computed byM4.The following M4 macros (e.g., @code{AC_PACKAGE_NAME}), output variables(e.g., @code{PACKAGE_NAME}), and preprocessor symbols (e.g.,@code{PACKAGE_NAME}) are defined by @code{AC_INIT}:@table @asis@item @code{AC_PACKAGE_NAME}, @code{PACKAGE_NAME}@acindex PACKAGE_NAME@ovindex PACKAGE_NAME@cvindex PACKAGE_NAMEExactly @var{package}.@item @code{AC_PACKAGE_TARNAME}, @code{PACKAGE_TARNAME}@acindex PACKAGE_TARNAME@ovindex PACKAGE_TARNAME@cvindex PACKAGE_TARNAMEExactly @var{tarname}.@item @code{AC_PACKAGE_VERSION}, @code{PACKAGE_VERSION}@acindex PACKAGE_VERSION@ovindex PACKAGE_VERSION@cvindex PACKAGE_VERSIONExactly @var{version}.@item @code{AC_PACKAGE_STRING}, @code{PACKAGE_STRING}@acindex PACKAGE_STRING@ovindex PACKAGE_STRING@cvindex PACKAGE_STRINGExactly @samp{@var{package} @var{version}}.@item @code{AC_PACKAGE_BUGREPORT}, @code{PACKAGE_BUGREPORT}@acindex PACKAGE_BUGREPORT@ovindex PACKAGE_BUGREPORT@cvindex PACKAGE_BUGREPORTExactly @var{bug-report}.@end table@end defmac@node Notices@section Notices in @command{configure}The following macros manage version numbers for @command{configure}scripts.  Using them is optional.@c FIXME: AC_PREREQ should not be here@defmac AC_PREREQ (@var{version})@acindex PREREQ@cindex VersionEnsure that a recent enough version of Autoconf is being used.  If theversion of Autoconf being used to create @command{configure} is earlierthan @var{version}, print an error message to the standard error outputand do not create @command{configure}.  For example:@exampleAC_PREREQ(@value{VERSION})@end exampleThis macro is the only macro that may be used before @code{AC_INIT}, butfor consistency, you are invited not to do so.@end defmac@defmac AC_COPYRIGHT (@var{copyright-notice})@acindex COPYRIGHT@cindex Copyright NoticeState that, in addition to the Free Software Foundation's copyright onthe Autoconf macros, parts of your @command{configure} are covered by the@var{copyright-notice}.The @var{copyright-notice} will show up in both the head of@command{configure} and in @samp{configure --version}.@end defmac@defmac AC_REVISION (@var{revision-info})@acindex REVISION@cindex RevisionCopy revision stamp @var{revision-info} into the @command{configure}script, with any dollar signs or double-quotes removed.  This macro letsyou put a revision stamp from @file{configure.ac} into @command{configure}without @acronym{RCS} or @acronym{CVS} changing it when you check in@command{configure}.  That way, you can determine easily which revision of@file{configure.ac} a particular @command{configure} corresponds to.For example, this line in @file{configure.ac}:@c The asis prevents RCS from changing the example in the manual.@exampleAC_REVISION($@asis{Revision: 1.30 }$)@end example@noindentproduces this in @command{configure}:@example#! /bin/sh# From configure.ac Revision: 1.30@end example@end defmac@node Input@section Finding @command{configure} Input@defmac AC_CONFIG_SRCDIR (@var{unique-file-in-source-dir})@acindex CONFIG_SRCDIR@var{unique-file-in-source-dir} is some file that is in the package'ssource directory; @command{configure} checks for this file's existence tomake sure that the directory that it is told contains the source code infact does.  Occasionally people accidentally specify the wrong directorywith @option{--srcdir}; this is a safety check.  @xref{configureInvocation}, for more information.@end defmac@c FIXME: Remove definitively once --install explained.@c@c Small packages may store all their macros in @code{aclocal.m4}.  As the@c set of macros grows, or for maintenance reasons, a maintainer may prefer@c to split the macros in several files.  In this case, Autoconf must be@c told which files to load, and in which order.@c@c @defmac AC_INCLUDE (@var{file}@dots{})@c @acindex INCLUDE@c @c FIXME: There is no longer shell globbing.@c Read the macro definitions that appear in the listed files.  A list of@c space-separated filenames or shell globbing patterns is expected.  The@c files will be read in the order they're listed.@c@c Because the order of definition of macros is important (only the last@c definition of a macro is used), beware that it is @code{AC_INIT} that@c loads @file{acsite.m4} and @file{aclocal.m4}.  Note that@c @code{AC_INCLUDE}ing a file before @code{AC_INIT} or within@c @file{aclocal.m4} is different from doing so after @code{AC_INIT}: in@c the latter case, non-macro lines from included files may end up in the@c @file{configure} script, whereas in the former case, they'd be discarded@c just like any text that appear before @code{AC_INIT}.@c @end defmacPackages that do manual configuration or use the @code{install} programmight need to tell @command{configure} where to find some other shellscripts by calling @code{AC_CONFIG_AUX_DIR}, though the default placesit looks are correct for most cases.@defmac AC_CONFIG_AUX_DIR (@var{dir})@acindex CONFIG_AUX_DIRUse the auxiliary build tools (e.g., @file{install-sh},@file{config.sub}, @file{config.guess}, Cygnus @command{configure},Automake and Libtool scripts etc.) that are in directory @var{dir}.These are auxiliary files used in configuration.  @var{dir} can beeither absolute or relative to @file{@var{srcdir}}.  The default is@file{@var{srcdir}} or @file{@var{srcdir}/..} or@file{@var{srcdir}/../..}, whichever is the first that contains@file{install-sh}.  The other files are not checked for, so that using@code{AC_PROG_INSTALL} does not automatically require distributing theother auxiliary files.  It checks for @file{install.sh} also, but thatname is obsolete because some @code{make} have a rule that creates@file{install} from it if there is no @file{Makefile}.@end defmac@node Output@section Outputting FilesEvery Autoconf script, e.g., @file{configure.ac}, should finish bycalling @code{AC_OUTPUT}.  That is the macro that generates@file{config.status}, which will create the @file{Makefile}s and anyother files resulting from configuration.  This is the only requiredmacro besides @code{AC_INIT} (@pxref{Input}).@defmac AC_OUTPUT@acindex OUTPUT@cindex InstantiationGenerate @file{con

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -