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

📄 autobook_283.html

📁 Autoconf使用手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<HTML><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><!-- Created on September, 12  2004 by texi2html 1.64 --><!-- Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)            Karl Berry  <karl@freefriends.org>            Olaf Bachmann <obachman@mathematik.uni-kl.de>            and many others.Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>Send bugs and suggestions to <texi2html@mathematik.uni-kl.de> --><HEAD><TITLE>Autoconf, Automake, and Libtool: Autoconf Macro Reference</TITLE><META NAME="description" CONTENT="Autoconf, Automake, and Libtool: Autoconf Macro Reference"><META NAME="keywords" CONTENT="Autoconf, Automake, and Libtool: Autoconf Macro Reference"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META NAME="Generator" CONTENT="texi2html 1.64"><script language="Javascript"><!--    // Check the browser version.    function checkVersion() {      if (navigator.appVersion.charAt(0)>=3) return true;      if (navigator.appVersion.charAt(0)>=4) return true;      else return false;    }      if (checkVersion()) {             homeon = new Image();             homeon.src = "homeon.png";             homeoff = new Image();             homeoff.src = "home.png";             tocon = new Image();             tocon.src = "tocon.png";             tocoff = new Image();             tocoff.src = "toc.png";             indexon = new Image();             indexon.src = "indexon.png";             indexoff = new Image();             indexoff.src = "index.png";             helpon = new Image();             helpon.src = "helpon.png";             helpoff = new Image();             helpoff.src = "help.png";             backon = new Image();             backon.src = "backon.png";             backoff = new Image();             backoff.src = "back.png";             forwardon = new Image();             forwardon.src = "forwardon.png";             forwardoff = new Image();             forwardoff.src = "forward.png";             prevon = new Image();             prevon.src = "prevon.png";             prevoff = new Image();             prevoff.src = "prev.png";             nexton = new Image();             nexton.src = "nexton.png";             nextoff = new Image();             nextoff.src = "next.png";             upon = new Image();             upon.src = "upon.png";             upoff = new Image();             upoff.src = "up.png";         }     function img_act(imgName) {             if (checkVersion()) {             imgOn = eval(imgName + "on.src");             document [imgName].src = imgOn;             }     }     function img_inact(imgName) {             if (checkVersion()) {             imgOff = eval(imgName + "off.src");             document [imgName].src = imgOff;             }     }// --></SCRIPT></HEAD><BODY LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#6688AA" VLINK="#336688" ALINK="#808080"><A NAME="SEC283"></A><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10><TR VALIGN="TOP"><TD ALIGN="MIDDLE" WIDTH=50 BGCOLOR="#e6e6e6"><TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_282.html#SEC282" onMouseover="img_act('prev')" onMouseout="img_inact('prev')"><IMG SRC="prev.png" BORDER="0" ALT="Back: make process" ALIGN="MIDDLE" NAME="prev"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_284.html#SEC284" onMouseover="img_act('next')" onMouseout="img_inact('next')"><IMG SRC="next.png" BORDER="0" ALT="Forward: OPL" ALIGN="MIDDLE" NAME="next"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_284.html#SEC284" onMouseover="img_act('back')" onMouseout="img_inact('back')"><IMG SRC="back.png" BORDER="0" ALT="FastBack: OPL" ALIGN="MIDDLE" NAME="back"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook.html#SEC_Top" onMouseover="img_act('up')" onMouseout="img_inact('up')"><IMG SRC="up.png" BORDER="0" ALT="Up: Top" ALIGN="MIDDLE" NAME="up"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_284.html#SEC284" onMouseover="img_act('forward')" onMouseout="img_inact('forward')"><IMG SRC="forward.png" BORDER="0" ALT="FastForward: OPL" ALIGN="MIDDLE" NAME="forward"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook.html#SEC_Top" onMouseover="img_act('home')" onMouseout="img_inact('home')"><IMG SRC="home.png" BORDER="0" ALT="Top: Autoconf, Automake, and Libtool" ALIGN="MIDDLE" NAME="home"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_toc.html#SEC_Contents" onMouseover="img_act('toc')" onMouseout="img_inact('toc')"><IMG SRC="toc.png" BORDER="0" ALT="Contents: Table of Contents" ALIGN="MIDDLE" NAME="toc"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_285.html#SEC285" onMouseover="img_act('index')" onMouseout="img_inact('index')"><IMG SRC="index.png" BORDER="0" ALT="Index: Index" ALIGN="MIDDLE" NAME="index"></A></TD></TR><TR VALIGN="TOP" ALIGN="LEFT"><TD VALIGN="MIDDLE" ALIGN="LEFT"><A HREF="autobook_abt.html#SEC_About" onMouseover="img_act('help')" onMouseout="img_inact('help')"><IMG SRC="help.png" BORDER="0" ALT="About: About this document" ALIGN="MIDDLE" NAME="help"></A></TD></TR></TABLE></TD><TD ALIGN="LEFT"><H1> D. Autoconf Macro Reference </H1><!--docid::SEC283::--><P>This is an alphabetical list of each Autoconf macro used in this book,along with a description of what each does.  They are provided for yourreference while reading this book.  The descriptions are only brief; seethe appropriate reference manual for a complete description.</P><P><DL COMPACT><DT><CODE>AC_ARG_ENABLE(<VAR>feature</VAR>, <VAR>help-text</VAR>, [<VAR>if-given</VAR>], [<VAR>if-not-given</VAR>])</CODE><DD>This macro allows the maintainer to specify additional package optionsaccepted by <TT>`configure'</TT>--for example, <SAMP>`--enable-zlib'</SAMP>.  Theaction shell code may access any arguments to the option in the shellvariable <CODE>enableval</CODE>.  For example, <SAMP>`--enable-buffers=128'</SAMP>would cause <TT>`configure'</TT> to set <CODE>enableval</CODE> to <SAMP>`128'</SAMP>.<P><DT><CODE>AC_ARG_PROGRAM</CODE><DD>This macro places a <CODE>sed</CODE> transformation program into the outputvariable <CODE>program_transform_name</CODE> that can be used to transform thefilenames of installed programs.  If the <SAMP>`--program-prefix'</SAMP>,<SAMP>`--program-suffix'</SAMP> or<BR> <SAMP>`--program-transform-name'</SAMP> optionsare passed to <TT>`configure'</TT>, an appropriate transformation programwill be generated.  If no options are given, but the type of the hostsystem differs from the type of the target system, program names aretransformed by prefixing them with the type of the target(eg. <CODE>arm-elf-gcc</CODE>).<P><DT><CODE>AC_ARG_WITH(<VAR>package</VAR>, <VAR>help-text</VAR>, [<VAR>if-given</VAR>], [<VAR>if-not-given</VAR>])</CODE><DD>This macro allows the maintainer to specify additional packages thatthis package should work with (for example, a library to manipulateshadow passwords).  The user indicates this preference by invoking<TT>`configure'</TT> with an option such as <SAMP>`--with-shadow'</SAMP>.  If anoptional argument is given, this value is available to shell code in theshell variable <CODE>withval</CODE>.<P><DT><CODE>AC_CACHE_CHECK(<VAR>message</VAR>, <VAR>cache-variable</VAR>, <VAR>commands</VAR>)</CODE><DD>This macro is a convenient front-end to the <CODE>AC_CACHE_VAL</CODE> macrothat takes care of printing messages to the user, including whether ornot the result was found in the cache.  It should be used in preferenceto <CODE>AC_CACHE_VAL</CODE>.<P><DT><CODE>AC_CACHE_VAL(<VAR>cache-variable</VAR>, <VAR>commands</VAR>)</CODE><DD>This is a low-level macro which implements the Autoconf cache feature.If the named variable is set at runtime (for instance, if it was readfrom <TT>`config.cache'</TT>), then this macro does nothing.  Otherwise, itruns the shell code in <VAR>commands</VAR>, which is assumed to set the cachevariable.<P><DT><CODE>AC_CANONICAL_HOST</CODE><DD>This macro determines the type of the host system and sets the outputvariable <SAMP>`host'</SAMP>, as well as other more obscure variables.<P><DT><CODE>AC_CANONICAL_SYSTEM</CODE><DD>This macro determines the type of the build, host and target systems andsets the output variables <SAMP>`build'</SAMP>, <SAMP>`host'</SAMP> and <SAMP>`target'</SAMP>,amongst other more obscure variables.<P><DT><CODE>AC_CHECK_FILE(<VAR>file</VAR>, [<VAR>if-found</VAR>], [<VAR>if-not-found</VAR>])</CODE><DD>This macro tests for the existence of a file in the file system of thebuild system, and runs the appropriate shell code depending on whetheror not the file is found.<P><DT><CODE>AC_CHECK_FUNCS(<VAR>function-list</VAR>, [<VAR>if-found</VAR>], [<VAR>if-not-found</VAR>])</CODE><DD>This looks for a series of functions.  If the function <CODE>quux</CODE> isfound, the C preprocessor macro <CODE>HAVE_QUUX</CODE> will be defined.  Inaddition, if the <VAR>if-found</VAR> argument is given, it will be run (asshell code) when a function is found -- this code can use the <CODE>sh</CODE><CODE>break</CODE> command to prevent <CODE>AC_CHECK_FUNCS</CODE> from looking forthe remaining functions in the list.  The shell code in<VAR>if-not-found</VAR> is run if a function is not found.<P><DT><CODE>AC_CHECK_HEADER(<VAR>header</VAR>, [<VAR>if-found</VAR>], [<VAR>if-not-found</VAR>])</CODE><DD>This macro executes some specified shell code if a header file exists.If it is not present, alternative shell code is executed instead.<P><DT><CODE>AC_CHECK_HEADERS(<VAR>header-list</VAR>, [<VAR>if-found</VAR>], [<VAR>if-not-found</VAR>])</CODE><DD>This looks for a series of headers.  If the header <CODE>quux.h</CODE> isfound, the C preprocessor macro <CODE>HAVE_QUUX_H</CODE> will be defined.  Inaddition, if the <VAR>if-found</VAR> argument is given, it will be run (asshell code) when a header is found -- this code can use the <CODE>sh</CODE><CODE>break</CODE> command to prevent <CODE>AC_CHECK_HEADERS</CODE> from looking forthe remaining headers in the list.  The shell code in <VAR>if-not-found</VAR>is run if a header is not found.<P><DT><CODE>AC_CHECK_LIB(<VAR>library</VAR>, <VAR>function</VAR>, [<VAR>if-found</VAR>], [<VAR>if-not-found</VAR>], [<VAR>other-libraries</VAR>])</CODE><DD>This looks for the named function in the named library specified by itsbase name.  For instance the math library, <TT>`libm.a'</TT>, would be namedsimply <SAMP>`m'</SAMP>.  If the function is found in the library <SAMP>`foo'</SAMP>,then the C preprocessor macro <CODE>HAVE_LIBFOO</CODE> is defined.

⌨️ 快捷键说明

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