Lines Matching full:autoconf

1 This is autoconf.info, produced by makeinfo version 4.13 from
2 autoconf.texi.
4 This manual (24 April 2012) is for GNU Autoconf (version 2.69), a
19 * Autoconf: (autoconf). Create source code configuration scripts.
24 * autoscan: (autoconf)autoscan Invocation.
26 * ifnames: (autoconf)ifnames Invocation. Listing conditionals in source.
27 * autoconf-invocation: (autoconf)autoconf Invocation.
29 * autoreconf: (autoconf)autoreconf Invocation.
31 * autoheader: (autoconf)autoheader Invocation.
33 * autom4te: (autoconf)autom4te Invocation.
34 The Autoconf executables backbone
35 * configure: (autoconf)configure Invocation. Configuring a package.
36 * autoupdate: (autoconf)autoupdate Invocation.
38 * config.status: (autoconf)config.status Invocation. Recreating configurations.
39 * testsuite: (autoconf)testsuite Invocation. Running an Autotest test suite.
43 File: autoconf.info, Node: Top, Next: Introduction, Up: (dir)
45 Autoconf
48 This manual (24 April 2012) is for GNU Autoconf (version 2.69), a
63 * Introduction:: Autoconf's purpose, strengths, and weaknesses
65 * Making configure Scripts:: How to organize and produce Autoconf scripts
70 * Programming in M4:: Layers on top of which Autoconf is written
72 * Writing Autoconf Macros:: Adding new macros to Autoconf
78 * Running configure Scripts:: How to use the Autoconf output
82 * FAQ:: Frequent Autoconf Questions, with answers
83 * History:: History of Autoconf
98 * Writing Autoconf Input:: What to put in an Autoconf input file
101 * autoconf Invocation:: How to create configuration scripts
106 * Shell Script Compiler:: Autoconf as solution of a problem
107 * Autoconf Language:: Programming in Autoconf
108 * Autoconf Input Layout:: Standard organization of `configure.ac'
113 * Versioning:: Dealing with Autoconf versions
115 * Input:: Where Autoconf should find files
239 * Using autom4te:: The Autoconf executables backbone
257 * Customizing autom4te:: Customizing the Autoconf package
279 Writing Autoconf Macros
281 * Macro Definitions:: Basic format of an Autoconf macro
283 * Reporting Messages:: Notifying `autoconf' users
286 * Coding Style:: Writing Autoconf macros a` la Autoconf
405 * Autoconf 1:: Tips for upgrading your files
406 * Autoconf 2.13:: Some fresher tips
436 Frequent Autoconf Questions, with answers
440 * Bootstrapping:: Autoconf and GNU M4 require each other?
448 History of Autoconf
462 * Autoconf Macro Index:: Index of Autoconf macros
469 File: autoconf.info, Node: Introduction, Next: The GNU Build System, Prev: Top, Up: Top
486 Autoconf is a tool for producing shell scripts that automatically
488 Posix-like systems. The configuration scripts produced by Autoconf are
489 independent of Autoconf when they are run, so their users do not need
490 to have Autoconf.
492 The configuration scripts produced by Autoconf require no manual user
503 For each software package that Autoconf is used with, it creates a
506 and respond to a system feature has been written, Autoconf allows it to
513 Those who do not understand Autoconf are condemned to reinvent it,
514 poorly. The primary goal of Autoconf is making the _user's_ life
519 Autoconf); rather, the goal is to make `configure' painless, portable,
521 And to this degree, Autoconf is highly successful at its goal -- most
522 complaints to the Autoconf list are about difficulties in writing
523 Autoconf input, and not in the behavior of the resulting `configure'.
524 Even packages that don't use Autoconf will generally provide a
529 Autoconf-generated `configure' scripts.
531 The Metaconfig package is similar in purpose to Autoconf, but the
534 scripts, Autoconf scripts can support cross-compiling, if some care is
537 Autoconf does not solve all problems related to making portable
544 Autoconf imposes some restrictions on the names of macros used with
547 Autoconf requires GNU M4 version 1.4.6 or later in order to generate
549 M4 1.3, do not have. Autoconf works better with GNU M4 version 1.4.14
552 *Note Autoconf 1::, for information about upgrading from version 1.
553 *Note History::, for the story of Autoconf's development. *Note FAQ::,
554 for answers to some common questions about Autoconf.
556 See the Autoconf web page (http://www.gnu.org/software/autoconf/)
560 Mail suggestions to the Autoconf mailing list <autoconf@gnu.org>.
562 (http://lists.gnu.org/archive/html/autoconf/).
564 Mail bug reports to the Autoconf Bugs mailing list
565 <bug-autoconf@gnu.org>. Past bug reports are archived
566 (http://lists.gnu.org/archive/html/bug-autoconf/).
573 Autoconf's development tree is accessible via `git'; see the
574 Autoconf Summary (http://savannah.gnu.org/projects/autoconf/) for
576 (http://git.sv.gnu.org/gitweb/?p=autoconf.git). Anonymous CVS access
578 the current `git' version can be sent for review to the Autoconf
579 Patches mailing list <autoconf-patches@gnu.org>, with discussion on
581 (http://lists.gnu.org/archive/html/autoconf-patches/); and all commits
582 are posted in the read-only Autoconf Commit mailing list
583 <autoconf-commit@gnu.org>, which is also archived
584 (http://lists.gnu.org/archive/html/autoconf-commit/).
586 Because of its mission, the Autoconf package itself includes only a
589 existing ones, see the Autoconf Macro Archive
590 (http://www.gnu.org/software/autoconf-archive/), which is kindly run by
594 File: autoconf.info, Node: The GNU Build System, Next: Making configure Scripts, Prev: Introduct…
599 Autoconf solves an important problem--reliable discovery of
603 finish the job Autoconf started: the GNU build system, whose most
604 important components are Autoconf, Automake, and Libtool. In this
617 File: autoconf.info, Node: Automake, Next: Gnulib, Up: The GNU Build System
632 Since you are, of course, using Autoconf, you also have to insert
640 Autoconf. For example, the `Makefile.am' to build and install a simple
647 standard targets, the substitutions provided by Autoconf, automatic
657 File: autoconf.info, Node: Gnulib, Next: Libtool, Prev: Automake, Up: The GNU Build System
676 Gnulib modules typically contain C source code along with Autoconf
681 Autoconf macro that arranges to use the replacement header on
685 File: autoconf.info, Node: Libtool, Next: Pointers, Prev: Gnulib, Up: The GNU Build System
708 Autoconf, can be used without Automake, it is most simply utilized in
713 File: autoconf.info, Node: Pointers, Prev: Libtool, Up: The GNU Build System
720 Automake and Autoconf. As your software is distributed to more and
724 (Besides, since you're already learning Autoconf, Automake is a piece
732 The project home pages for Autoconf
733 (http://www.gnu.org/software/autoconf/), Automake
744 The book `GNU Autoconf, Automake and Libtool'(1) describes the
751 (1) `GNU Autoconf, Automake and Libtool', by G. V. Vaughan, B.
756 File: autoconf.info, Node: Making configure Scripts, Next: Setup, Prev: The GNU Build System, U…
761 The configuration scripts that Autoconf produces are by convention
782 To create a `configure' script with Autoconf, you need to write an
783 Autoconf input file `configure.ac' (or `configure.in') and run
784 `autoconf' on it. If you write your own feature tests to supplement
785 those that come with Autoconf, you might also write files called
793 `autoconf' and `autoheader' also read the installed Autoconf macro
794 files (by reading `autoconf.m4').
797 just Autoconf:
801 | .------> autoconf* -----> configure
831 * Writing Autoconf Input:: What to put in an Autoconf input file
834 * autoconf Invocation:: How to create configuration scripts
838 File: autoconf.info, Node: Writing Autoconf Input, Next: autoscan Invocation, Up: Making configu…
844 called `configure.ac' that contains invocations of the Autoconf macros
845 that test the system features your package needs or can use. Autoconf
848 Autoconf template macros to produce custom checks; see *note Writing
856 Previous versions of Autoconf promoted the name `configure.in',
864 * Shell Script Compiler:: Autoconf as solution of a problem
865 * Autoconf Language:: Programming in Autoconf
866 * Autoconf Input Layout:: Standard organization of `configure.ac'
869 File: autoconf.info, Node: Shell Script Compiler, Next: Autoconf Language, Up: Writing Autoconf
875 `configure.ac' in Autoconf you must understand _what_ problem the
878 The problem Autoconf addresses is that the world is a mess. After
879 all, you are using Autoconf in order to have your package compile
881 hostile. Autoconf itself bears the price for these differences:
886 `autoconf'? A set of properly written shell functions is enough to
894 So, what is really needed is some kind of compiler, `autoconf', that
895 takes an Autoconf program, `configure.ac', and transforms it into a
898 How does `autoconf' perform this task?
903 rigorous checks could be performed on the Autoconf program (e.g.,
907 Autoconf does the latter: it is a layer on top of `sh'. It was
908 therefore most convenient to implement `autoconf' as a macro expander:
911 script in the end. Instead of implementing a dedicated Autoconf macro
917 File: autoconf.info, Node: Autoconf Language, Next: Autoconf Input Layout, Prev: Shell Script Co…
919 3.1.2 The Autoconf Language
922 The Autoconf language differs from many other computer languages
925 Autoconf their status is rigorously the same. Therefore, we need a
964 need quoting. Cautious Autoconf users would keep the quotes, but many
965 Autoconf users find such precautions annoying, and would rewrite the
990 your script in case autoconf ever adds a macro `AC_DC':
1010 unexpanded macro when running `autoconf', because it collides with the
1011 namespace of macros reserved for the Autoconf language. To be really
1018 You are now able to understand one of the constructs of Autoconf that
1029 `AC_COMPILE_IFELSE'. (There was an idiom common in Autoconf's past to
1070 # Process this file with autoconf to produce a configure script.
1073 File: autoconf.info, Node: Autoconf Input Layout, Prev: Autoconf Language, Up: Writing Autoconf
1078 The order in which `configure.ac' calls the Autoconf macros is not
1088 Autoconf macros. Generally speaking, the things near the end of this
1092 Autoconf requirements
1107 File: autoconf.info, Node: autoscan Invocation, Next: ifnames Invocation, Prev: Writing Autoconf
1123 macro in the wrong order relative to another macro, so that `autoconf'
1128 order to make it work with Autoconf (*note ifnames Invocation::, for
1135 `autoscan' uses several data files (installed along with Autoconf)
1138 each line consists of a symbol, one or more blanks, and the Autoconf
1150 Print the version number of Autoconf and exit.
1171 File: autoconf.info, Node: ifnames Invocation, Next: autoconf Invocation, Prev: autoscan Invocat…
1198 Print the version number of Autoconf and exit.
1201 File: autoconf.info, Node: autoconf Invocation, Next: autoreconf Invocation, Prev: ifnames Invoc…
1203 3.4 Using `autoconf' to Create `configure'
1206 To create `configure' from `configure.ac', run the `autoconf' program
1207 with no arguments. `autoconf' processes `configure.ac' with the M4
1208 macro processor, using the Autoconf macros. If you give `autoconf' an
1211 If you give `autoconf' the argument `-', it reads from the standard
1215 The Autoconf macros are defined in several files. Some of the files
1216 are distributed with Autoconf; `autoconf' reads them first. Then it
1218 the distributed Autoconf macro files, and for the optional file
1220 site's or the package's own Autoconf macro definitions (*note Writing
1221 Autoconf Macros::, for more information). If a macro is defined in
1222 more than one of the files that `autoconf' reads, the last definition
1225 `autoconf' accepts the following options:
1233 Print the version number of Autoconf and exit.
1286 Because `autoconf' uses `autom4te' behind the scenes, it displays
1306 Autoconf macros (typically the `AC_DEFUN' definitions). This
1315 $ autoconf -t AC_SUBST
1327 $ autoconf -t 'AC_DEFINE:@: $@
1338 $ autoconf -t 'AC_SUBST:$$ac_subst{"$1"} = "$f:$l";'
1348 $ autoconf -t 'AM_MISSING_PROG:${|:::::|}*'
1350 AUTOCONF|:::::|autoconf|:::::|$missing_dir
1355 File: autoconf.info, Node: autoreconf Invocation, Prev: autoconf Invocation, Up: Making configur…
1367 `autoreconf' runs `autoconf', `autoheader', `aclocal', `automake',
1372 variables `AUTOM4TE', `AUTOCONF', `AUTOHEADER', `AUTOMAKE', `ACLOCAL',
1382 does not pass `--autoconf-dir=DIR' or `--localdir=DIR'.
1398 Print the version number of Autoconf and exit.
1442 Passed on to `aclocal', `autoconf' and `autoheader' internally.
1447 Passed on to `autoconf' and `autoheader' internally.
1487 limitation in the Autoconf implementation these flags currently must be
1491 File: autoconf.info, Node: Setup, Next: Existing Tests, Prev: Making configure Scripts, Up: Top
1496 Autoconf-generated `configure' scripts need some information about how
1504 * Versioning:: Dealing with Autoconf versions
1506 * Input:: Where Autoconf should find files
1518 File: autoconf.info, Node: Initializing configure, Next: Versioning, Up: Setup
1539 Autoconf'), while the former is meant for distribution tar ball
1540 names (e.g., `autoconf'). It defaults to PACKAGE with `GNU '
1553 every commit to a version control system (in fact, Autoconf does
1585 Autoconf macros liberally use the `set' command to process strings, and
1592 File: autoconf.info, Node: Versioning, Next: Notices, Prev: Initializing configure, Up: Setup
1594 4.2 Dealing with Autoconf versions
1598 version of Autoconf that can successfully compile a given
1602 Ensure that a recent enough version of Autoconf is being used. If
1603 the version of Autoconf being used to create `configure' is
1612 This macro was introduced in Autoconf 2.62. It identifies the
1613 version of Autoconf that is currently parsing the input file, in a
1616 Autoconf, its value is `2.69'. One potential use of this macro is
1618 added to Autoconf, rather than using `AC_PREREQ' to require the
1619 newer version of Autoconf. However, remember that the Autoconf
1624 users might have a beta version of Autoconf installed, with
1632 File: autoconf.info, Node: Notices, Next: Input, Prev: Versioning, Up: Setup
1642 copyright on the Autoconf macros, parts of your `configure' are
1666 File: autoconf.info, Node: Input, Next: Output, Prev: Notices, Up: Setup
1703 Autoconf proper, this macro does nothing: its sole purpose is to be
1713 Specify DIR as the location of additional local Autoconf macros.
1721 top-level `Makefile.am'. Due to a limitation in the Autoconf
1727 File: autoconf.info, Node: Output, Next: Configuration Actions, Prev: Input, Up: Setup
1732 Every Autoconf script, e.g., `configure.ac', should finish by calling
1782 File: autoconf.info, Node: Configuration Actions, Next: Configuration Files, Prev: Output, Up: …
1912 File: autoconf.info, Node: Configuration Files, Next: Makefile Substitutions, Prev: Configuratio…
1933 AC_CONFIG_FILES([autoconf], [chmod +x autoconf])
1945 File: autoconf.info, Node: Makefile Substitutions, Next: Configuration Headers, Prev: Configurat…
1981 File: autoconf.info, Node: Preset Output Variables, Next: Installation Directory Variables, Up: …
1986 Some output variables are preset by the Autoconf macros. Some of the
1987 Autoconf macros set additional output variables, which are mentioned in
2135 but some Autoconf macros may prepend extra libraries to this
2189 File: autoconf.info, Node: Installation Directory Variables, Next: Changed Directory Variables, …
2313 let `make' manage their replacement. For instance Autoconf ships
2372 autoconf autoheader: Makefile
2401 File: autoconf.info, Node: Changed Directory Variables, Next: Build Directories, Prev: Installat…
2406 In Autoconf 2.60, the set of directory variables has changed, and the
2410 of `datarootdir'. If you are upgrading from an earlier Autoconf
2421 To help with the transition, Autoconf warns about files that seem to
2433 $ autoconf
2444 newer Autoconf releases:
2471 File: autoconf.info, Node: Build Directories, Next: Automatic Remaking, Prev: Changed Directory …
2490 `Makefile.am'. But if you are using Autoconf in isolation, then
2515 File: autoconf.info, Node: Automatic Remaking, Prev: Build Directories, Up: Makefile Substitutio…
2540 cd '$(srcdir)' && autoconf
2572 File: autoconf.info, Node: Configuration Headers, Next: Configuration Commands, Prev: Makefile S…
2644 File: autoconf.info, Node: Header Templates, Next: autoheader Invocation, Up: Configuration Head…
2686 of Autoconf.
2705 File: autoconf.info, Node: autoheader Invocation, Next: Autoheader Macros, Prev: Header Template…
2729 subsequent configuration header file. Symbols defined by Autoconf's
2763 Print the version number of Autoconf and exit.
2807 File: autoconf.info, Node: Autoheader Macros, Prev: autoheader Invocation, Up: Configuration Hea…
2866 File: autoconf.info, Node: Configuration Commands, Next: Configuration Links, Prev: Configuratio…
2909 File: autoconf.info, Node: Configuration Links, Next: Subdirectories, Prev: Configuration Comman…
2944 File: autoconf.info, Node: Subdirectories, Next: Default Prefix, Prev: Configuration Links, Up:…
2980 `configure'. This is for packages that might use a non-Autoconf
3006 File: autoconf.info, Node: Default Prefix, Prev: Subdirectories, Up: Setup
3040 File: autoconf.info, Node: Existing Tests, Next: Writing Tests, Prev: Setup, Up: Top
3078 File: autoconf.info, Node: Common Behavior, Next: Alternative Programs, Up: Existing Tests
3083 Much effort has been expended to make Autoconf easy to learn. The most
3087 in Autoconf; nevertheless, this section describes some of the common
3096 File: autoconf.info, Node: Standard Symbols, Next: Default Includes, Up: Common Behavior
3114 File: autoconf.info, Node: Default Includes, Prev: Standard Symbols, Up: Common Behavior
3188 File: autoconf.info, Node: Alternative Programs, Next: Files, Prev: Common Behavior, Up: Existi…
3206 File: autoconf.info, Node: Particular Programs, Next: Generic Programs, Up: Alternative Programs
3267 Autoconf comes with a copy of `install-sh' that you can use. If
3294 `AC_PROG_INSTALL'. An `install-sh' file that predates Autoconf
3342 in this case only, it is suggested that you use this Autoconf
3412 File: autoconf.info, Node: Generic Programs, Prev: Particular Programs, Up: Alternative Programs
3534 This macro was introduced in Autoconf 2.62. If VARIABLE is not
3555 Here is an example, similar to what Autoconf uses in its own
3583 File: autoconf.info, Node: Files, Next: Libraries, Prev: Alternative Programs, Up: Existing Tes…
3590 solution. Be aware that, like most Autoconf macros, they test a feature
3610 File: autoconf.info, Node: Libraries, Next: Library Functions, Prev: Files, Up: Existing Tests
3683 File: autoconf.info, Node: Library Functions, Next: Header Files, Prev: Libraries, Up: Existing…
3700 File: autoconf.info, Node: Function Portability, Next: Particular Functions, Up: Library Functio…
3915 File: autoconf.info, Node: Particular Functions, Next: Generic Functions, Prev: Function Portabi…
4041 versions of `autoconf'. This macro checks for several known
4049 with previous versions of `autoconf' you're encouraged to define it
4385 File: autoconf.info, Node: Generic Functions, Prev: Particular Functions, Up: Library Functions
4430 Autoconf follows a philosophy that was formed over the years by those
4509 File: autoconf.info, Node: Header Files, Next: Declarations, Prev: Library Functions, Up: Exist…
4526 File: autoconf.info, Node: Header Portability, Next: Particular Headers, Up: Header Files
4625 File: autoconf.info, Node: Particular Headers, Next: Generic Headers, Prev: Header Portability, …
4909 File: autoconf.info, Node: Generic Headers, Prev: Particular Headers, Up: Header Files
4970 Previous versions of Autoconf merely checked whether the header was
5006 File: autoconf.info, Node: Declarations, Next: Structures, Prev: Header Files, Up: Existing Tes…
5023 File: autoconf.info, Node: Particular Declarations, Next: Generic Declarations, Up: Declarations
5031 File: autoconf.info, Node: Generic Declarations, Prev: Particular Declarations, Up: Declarations
5118 File: autoconf.info, Node: Structures, Next: Types, Prev: Declarations, Up: Existing Tests
5135 File: autoconf.info, Node: Particular Structures, Next: Generic Structures, Up: Structures
5184 File: autoconf.info, Node: Generic Structures, Prev: Particular Structures, Up: Structures
5228 File: autoconf.info, Node: Types, Next: Compilers and Preprocessors, Prev: Structures, Up: Exis…
5244 File: autoconf.info, Node: Particular Types, Next: Generic Types, Up: Types
5410 File: autoconf.info, Node: Generic Types, Prev: Particular Types, Up: Types
5451 Autoconf, up to 2.13, used to provide to another version of
5458 File: autoconf.info, Node: Compilers and Preprocessors, Next: System Services, Prev: Types, Up:…
5490 File: autoconf.info, Node: Specific Compiler Characteristics, Next: Generic Compiler Characterist…
5498 Autoconf relies on a trick to extract one bit of information from
5510 `sizeof (int)', not from the `? 1 : -1', and Autoconf works around
5515 File: autoconf.info, Node: Generic Compiler Characteristics, Next: C Compiler, Prev: Specific Co…
5568 Normally Autoconf ignores warnings generated by the compiler,
5619 File: autoconf.info, Node: C Compiler, Next: C++ Compiler, Prev: Generic Compiler Characteristic…
5668 word size' in Autoconf tests. In ordinary source code, `#error' is
5675 Nothing in Posix makes this invalid. That is why Autoconf stopped
5710 Many Autoconf macros use a compiler, and thus call
5853 If `autoconf' detects this situation, it leaves `const' alone, as
5988 File: autoconf.info, Node: C++ Compiler, Next: Objective C Compiler, Prev: C Compiler, Up: Comp…
6040 File: autoconf.info, Node: Objective C Compiler, Next: Objective C++ Compiler, Prev: C++ Compile…
6069 File: autoconf.info, Node: Objective C++ Compiler, Next: Erlang Compiler and Interpreter, Prev: …
6100 File: autoconf.info, Node: Erlang Compiler and Interpreter, Next: Fortran Compiler, Prev: Object…
6105 Autoconf defines the following macros for determining paths to the
6145 File: autoconf.info, Node: Fortran Compiler, Next: Go Compiler, Prev: Erlang Compiler and Interp…
6150 The Autoconf Fortran support is divided into two categories: legacy
6384 Although Autoconf tries to be intelligent about detecting the
6667 File: autoconf.info, Node: Go Compiler, Prev: Fortran Compiler, Up: Compilers and Preprocessors
6672 Autoconf provides basic support for the Go programming language when
6694 File: autoconf.info, Node: System Services, Next: Posix Variants, Prev: Compilers and Preprocess…
6774 File: autoconf.info, Node: Posix Variants, Next: Erlang Libraries, Prev: System Services, Up: E…
6783 This macro was introduced in Autoconf 2.60. If possible, enable
6814 Autoconf.
6817 File: autoconf.info, Node: Erlang Libraries, Prev: Posix Variants, Up: Existing Tests
6918 File: autoconf.info, Node: Writing Tests, Next: Results, Prev: Existing Tests, Up: Top
6930 lot about how to write Autoconf tests by looking at the existing ones.
6931 If something goes wrong in one or more of the Autoconf tests, this
6946 macro. *Note Writing Autoconf Macros::, for how to do that.
6960 File: autoconf.info, Node: Language Choice, Next: Writing Test Programs, Up: Writing Tests
6965 Autoconf-generated `configure' scripts check for the C compiler and its
7030 case...), since Autoconf detects inconsistencies.
7042 This macro runs only at `autoconf' time, and incurs no cost at
7043 `configure' time. Sadly enough and because Autoconf is a two
7065 File: autoconf.info, Node: Writing Test Programs, Next: Running the Preprocessor, Prev: Language…
7070 Autoconf tests follow a common scheme: feed some program with some
7081 File: autoconf.info, Node: Guidelines, Next: Test Functions, Up: Writing Test Programs
7133 File: autoconf.info, Node: Test Functions, Next: Generating Sources, Prev: Guidelines, Up: Writ…
7166 File: autoconf.info, Node: Generating Sources, Prev: Test Functions, Up: Writing Test Programs
7171 Autoconf provides a set of macros that can be used to generate test
7179 language. As of Autoconf 2.63b, the source file also contains the
7183 Autoconf macro arguments, and therefore (i) you may pass a macro
7186 This macro issues a warning during `autoconf' processing if SOURCE
7331 File: autoconf.info, Node: Running the Preprocessor, Next: Running the Compiler, Prev: Writing T…
7411 File: autoconf.info, Node: Running the Compiler, Next: Running the Linker, Prev: Running the Pre…
7447 File: autoconf.info, Node: Running the Linker, Next: Runtime, Prev: Running the Compiler, Up: W…
7452 To check for a library, a function, or a global variable, Autoconf
7488 File: autoconf.info, Node: Runtime, Next: Systemology, Prev: Running the Linker, Up: Writing Te…
7544 `autoconf' prints a warning message when creating `configure' each
7548 ignore the warning. A few of the macros distributed with Autoconf
7559 in other macros, including a few of the ones that come with Autoconf,
7590 of Autoconf's `AC_ERLANG_SUBST_LIB_DIR' macro is:
7603 File: autoconf.info, Node: Systemology, Next: Multiple Cases, Prev: Runtime, Up: Writing Tests
7659 File: autoconf.info, Node: Multiple Cases, Prev: Systemology, Up: Writing Tests
7666 statement". Autoconf does not directly provide one; however, it is
7701 File: autoconf.info, Node: Results, Next: Programming in M4, Prev: Writing Tests, Up: Top
7721 File: autoconf.info, Node: Defining Symbols, Next: Setting Output Variables, Up: Results
7732 `-DSYMBOL=VALUE' for each symbol defined. Unlike in Autoconf version
7734 To check whether Autoconf macros have already defined a certain C
7782 compatibility with older versions of Autoconf, but this usage is
7783 obsolescent and may be withdrawn in future versions of Autoconf.
7829 File: autoconf.info, Node: Setting Output Variables, Next: Special Chars in Variables, Prev: Def…
7952 File: autoconf.info, Node: Special Chars in Variables, Next: Caching Results, Prev: Setting Outp…
7981 File: autoconf.info, Node: Caching Results, Next: Printing Messages, Prev: Special Chars in Vari…
8060 File: autoconf.info, Node: Cache Variable Names, Next: Cache Files, Up: Caching Results
8074 you begin local Autoconf macros with, except lowercase by
8075 convention. For cache values used by the distributed Autoconf
8085 naming system. The values used in Autoconf are listed in *note
8105 File: autoconf.info, Node: Cache Files, Next: Cache Checkpointing, Prev: Cache Variable Names, …
8151 File: autoconf.info, Node: Cache Checkpointing, Prev: Cache Files, Up: Caching Results
8192 File: autoconf.info, Node: Printing Messages, Prev: Caching Results, Up: Results
8211 To diagnose static issues, i.e., when `autoconf' is run, see *note
8271 File: autoconf.info, Node: Programming in M4, Next: Programming in M4sh, Prev: Results, Up: Top
8276 Autoconf is written on top of two layers: "M4sugar", which provides
8280 As of this version of Autoconf, these two layers still contain
8287 * Using autom4te:: The Autoconf executables backbone
8292 File: autoconf.info, Node: M4 Quotation, Next: Using autom4te, Up: Programming in M4
8298 This section, which users of Autoconf can skip, but which macro writers
8300 Autoconf and then ends with a rule of thumb. Understanding the former
8315 File: autoconf.info, Node: Active Characters, Next: One Macro Call, Up: M4 Quotation
8321 to know what the special characters are in Autoconf: `#' introduces a
8364 File: autoconf.info, Node: One Macro Call, Next: Quoting and Parameters, Prev: Active Characters…
8382 quotes, it is bad practice for Autoconf macros which must both be more
8430 File: autoconf.info, Node: Quoting and Parameters, Next: Quotation and Nested Macros, Prev: One …
8460 On the other hand, since autoconf generates shell code, you often
8479 definition. Autoconf reserves the longer sequence `${{' for use with
8497 File: autoconf.info, Node: Quotation and Nested Macros, Next: Changequote is Evil, Prev: Quoting…
8555 As the author of the Autoconf macro `car', you then consider it to
8595 exception that should be avoided in Autoconf.
8598 File: autoconf.info, Node: Changequote is Evil, Next: Quadrigraphs, Prev: Quotation and Nested M…
8604 when it's late at night. Then, many experienced Autoconf hackers
8619 quotes. M4sugar, M4sh, Autoconf, and Autotest all have chosen to use
8648 File: autoconf.info, Node: Quadrigraphs, Next: Balancing Parentheses, Prev: Changequote is Evil,…
8653 When writing an Autoconf macro you may occasionally need to generate
8655 Autoconf quoting rules. For example, you may need to output the regular
8735 File: autoconf.info, Node: Balancing Parentheses, Next: Quotation Rule Of Thumb, Prev: Quadrigra…
8782 is still unbalanced as an Autoconf argument, since `#(' is an M4
8791 and can be used as a balanced Autoconf argument. Unfortunately,
8802 Autoconf argument. As written, this is not balanced to an editor,
8813 using this as an Autoconf argument; and since the double-quoting
8832 File: autoconf.info, Node: Quotation Rule Of Thumb, Prev: Balancing Parentheses, Up: M4 Quotation
8846 It is common to read Autoconf programs with snippets like:
8909 macros. The `autoconf' program checks for this problem by looking for
8915 File: autoconf.info, Node: Using autom4te, Next: Programming in M4sugar, Prev: M4 Quotation, Up…
8920 The Autoconf suite, including M4sugar, M4sh, and Autotest, in addition
8921 to Autoconf per se, heavily rely on M4. All these different uses
8925 extensions designed for use in tools like Autoconf.
8930 * Customizing autom4te:: Customizing the Autoconf package
8937 File: autoconf.info, Node: autom4te Invocation, Next: Customizing autom4te, Up: Using autom4te
8962 Of course, it supports the Autoconf common subset of options:
8970 Print the version number of Autoconf and exit.
9149 *Note autoconf Invocation::, for examples of trace uses.
9155 instance, when invoked, `autoconf' preselects all the macros that
9178 `Autoconf-without-aclocal-m4'
9179 create Autoconf executable configure scripts without reading
9182 `Autoconf'
9183 create Autoconf executable configure scripts. This language
9185 `Autoconf-without-aclocal-m4' and additionally reads
9194 As an example, if Autoconf is installed in its default location,
9198 autom4te --prepend-include /usr/local/share/autoconf \
9205 autom4te --prepend-include /usr/local/share/autoconf \
9211 File: autoconf.info, Node: Customizing autom4te, Prev: autom4te Invocation, Up: Using autom4te
9232 As an example, to disable Autoconf caches (`autom4te.cache')
9239 begin-language: "Autoconf-without-aclocal-m4"
9241 end-language: "Autoconf-without-aclocal-m4"
9244 File: autoconf.info, Node: Programming in M4sugar, Next: Debugging via autom4te, Prev: Using aut…
9272 File: autoconf.info, Node: Redefined M4 Macros, Next: Diagnostic Macros, Up: Programming in M4su…
9489 File: autoconf.info, Node: Diagnostic Macros, Next: Diversion support, Prev: Redefined M4 Macros…
9537 File: autoconf.info, Node: Diversion support, Next: Conditional constructs, Prev: Diagnostic Mac…
9553 provided by the Autoconf package to work until you have restored the
9634 Autoconf inherits diversions from M4sh, and adds the following named
9640 any autoconf macros into this diversion.
9655 For now, the remaining named diversions of Autoconf, Autoheader, and
9658 release of Autoconf.
9711 File: autoconf.info, Node: Conditional constructs, Next: Looping constructs, Prev: Diversion sup…
9752 This macro was introduced in Autoconf 2.62. Similar to `m4_if',
9868 File: autoconf.info, Node: Looping constructs, Next: Evaluation Macros, Prev: Conditional constr…
10070 Autoconf 2.62, and are more efficient for two and three shifts,
10107 File: autoconf.info, Node: Evaluation Macros, Next: Text processing Macros, Prev: Looping constr…
10235 This macro was introduced in Autoconf 2.62. Expands to nothing,
10244 Note that for earlier versions of Autoconf, the macro `__gnu__' can
10282 This macro was introduced in Autoconf 2.62. Expand each argument,
10328 File: autoconf.info, Node: Text processing Macros, Next: Number processing Macros, Prev: Evaluat…
10346 of Autoconf 2.62, neither STRING nor SEPARATOR are expanded during
10351 `m4_append_uniq' takes two optional parameters as of Autoconf 2.62;
10396 This macro was introduced in Autoconf 2.62. It is similar to
10461 This macro was introduced in Autoconf 2.62, and expands to a
10544 File: autoconf.info, Node: Number processing Macros, Next: Set manipulation Macros, Prev: Text p…
10581 This macro was introduced in Autoconf 2.62. Expand to the decimal
10585 This macro was introduced in Autoconf 2.62. Expand to the decimal
10593 This macro was introduced in Autoconf 2.53, but had a number of
10594 usability limitations that were not lifted until Autoconf 2.62.
10608 development snapshot of autoconf claimed to be at version
10633 Compares VERSION against the version of Autoconf currently
10639 Remember that the autoconf philosophy favors feature checks over
10643 File: autoconf.info, Node: Set manipulation Macros, Next: Forbidden Patterns, Prev: Number proce…
10853 File: autoconf.info, Node: Forbidden Patterns, Prev: Set manipulation Macros, Up: Programming in…
10860 instance, if an Autoconf `configure' script includes tokens such as
10865 Additional layers, such as M4sh and Autoconf, add additional forbidden
10872 consensus is currently found in the Autoconf community, as some
10886 File: autoconf.info, Node: Debugging via autom4te, Prev: Programming in M4sugar, Up: Programming…
10900 programs that wrap `autom4te', such as `autoconf'), in order to inspect
10902 this paragraph was written, the autoconf version could be found by:
10904 $ autoconf --trace=AC_INIT
10905 configure.ac:23:AC_INIT:GNU Autoconf:2.63b.95-3963:bug-autoconf@gnu.org
10906 $ autoconf --trace='AC_INIT:version is $2'
10914 the expansion of an autoconf primitive or of one of your autoconf
10923 $ autoconf
10928 File: autoconf.info, Node: Programming in M4sh, Next: Writing Autoconf Macros, Prev: Programming…
10961 File: autoconf.info, Node: Common Shell Constructs, Next: Polymorphic Variables, Up: Programming…
11133 File: autoconf.info, Node: Polymorphic Variables, Next: Initialization Macros, Prev: Common Shel…
11324 File: autoconf.info, Node: Initialization Macros, Next: File Descriptor Macros, Prev: Polymorphi…
11432 File: autoconf.info, Node: File Descriptor Macros, Prev: Initialization Macros, Up: Programming …
11444 However doing so is seldom needed, because Autoconf provides higher
11488 File: autoconf.info, Node: Writing Autoconf Macros, Next: Portable Shell, Prev: Programming in M…
11490 10 Writing Autoconf Macros
11495 Here are some instructions and guidelines for writing Autoconf macros.
11499 * Macro Definitions:: Basic format of an Autoconf macro
11501 * Reporting Messages:: Notifying `autoconf' users
11504 * Coding Style:: Writing Autoconf macros a` la Autoconf
11507 File: autoconf.info, Node: Macro Definitions, Next: Macro Names, Up: Writing Autoconf Macros
11513 Autoconf macros are defined using the `AC_DEFUN' macro, which is
11520 An Autoconf macro definition looks like this:
11585 File: autoconf.info, Node: Macro Names, Next: Reporting Messages, Prev: Macro Definitions, Up: …
11590 All of the public Autoconf macros have all-uppercase names in the
11592 other text; Autoconf also reserves the namespace `^_AC_' for internal
11594 mostly-lowercase names starting with `ac_'. Autoconf also uses
11596 `configure', files produced by Autoconf make heavy use of the file
11599 Since Autoconf is built on top of M4sugar (*note Programming in
11608 Autoconf macros, you should prefix your own macro names and any shell
11620 Most of the Autoconf macros' names follow a structured naming
11629 are the categories used in Autoconf for specific test macros, the kind
11673 Autoconf internals should therefore start with `_AC_'. Additionally, a
11681 File: autoconf.info, Node: Reporting Messages, Next: Dependencies Between Macros, Prev: Macro Na…
11687 is possible to make `autoconf' detect the problem, and refuse to create
11714 Report a severe error MESSAGE, and have `autoconf' die. This
11719 When the user runs `autoconf -W error', warnings from `m4_warn'
11721 reported as errors, see *note autoconf Invocation::.
11724 File: autoconf.info, Node: Dependencies Between Macros, Next: Obsoleting Macros, Prev: Reporting…
11729 Some Autoconf macros depend on other macros having been called first in
11730 order to work correctly. Autoconf provides a way to ensure that certain
11741 File: autoconf.info, Node: Prerequisite Macros, Next: Suggested Ordering, Up: Dependencies Betwe…
11834 Prior to Autoconf 2.64, the implementation of `AC_REQUIRE' recognized
11846 Newer Autoconf is smart enough to recognize this situation, and hoists
11860 The bug is not in Autoconf, but in the macro definitions. If you
11864 only helps in Autoconf 2.64 or newer), or all uses of that macro should
11888 syntax warnings, whether the script is built with old or new Autoconf
11904 File: autoconf.info, Node: Suggested Ordering, Next: One-Shot Macros, Prev: Prerequisite Macros,…
11915 Autoconf provides the `AC_BEFORE' macro to warn users when macros
11938 File: autoconf.info, Node: One-Shot Macros, Prev: Suggested Ordering, Up: Dependencies Between M…
11945 Autoconf ensures that `AC_CANONICAL_BUILD' and cousins (*note
11960 Prior to Autoconf 2.64, a macro defined by `AC_DEFUN_ONCE' would
11967 File: autoconf.info, Node: Obsoleting Macros, Next: Coding Style, Prev: Dependencies Between Mac…
11975 parts of Autoconf. One result is that some of the macros are now
11981 Autoconf provides a simple means to obsolete a macro.
11993 The details of this macro are hairy: if `autoconf' encounters an
12005 File: autoconf.info, Node: Coding Style, Prev: Obsoleting Macros, Up: Writing Autoconf Macros
12010 The Autoconf macros follow a strict coding style. You are encouraged to
12012 either by contributing it to Autoconf itself or the Autoconf Macro
12013 Archive (http://www.gnu.org/software/autoconf-archive/), or by other
12017 For more details, see *note Autoconf Language::, and *note M4
12021 macro in Autoconf that resembles the macro you are defining: try to
12040 No Autoconf macro should ever enter the user-variable name space;
12106 `"[$]@"', and you'll prefer do something better than hacking Autoconf
12193 File: autoconf.info, Node: Portable Shell, Next: Portable Make, Prev: Writing Autoconf Macros, …
12281 File: autoconf.info, Node: Shellology, Next: Invoking the Shell, Up: Portable Shell
12377 File: autoconf.info, Node: Invoking the Shell, Next: Here-Documents, Prev: Shellology, Up: Port…
12412 File: autoconf.info, Node: Here-Documents, Next: File Descriptors, Prev: Invoking the Shell, Up…
12493 Autoconf. In fact, it's even not recommended, because M4 macros can't
12515 File: autoconf.info, Node: File Descriptors, Next: Signal Handling, Prev: Here-Documents, Up: P…
12694 File: autoconf.info, Node: Signal Handling, Next: File System Conventions, Prev: File Descriptor…
12830 File: autoconf.info, Node: File System Conventions, Next: Shell Pattern Matching, Prev: Signal H…
12835 Autoconf uses shell-script processing extensively, so the file names
12862 While `autoconf' and friends are usually run on some Posix variety,
12898 Posixy enough to run `autoconf' (such as DJGPP) are usually able to
12912 configure script, as `autoconf' uses a .in suffix for template
12931 usually not important for `autoconf'.
12969 File: autoconf.info, Node: Shell Pattern Matching, Next: Shell Substitutions, Prev: File System …
12983 File: autoconf.info, Node: Shell Substitutions, Next: Assignments, Prev: Shell Pattern Matching,…
13098 Autoconf macros often use the `set' command to update `$@', so if
13483 File: autoconf.info, Node: Assignments, Next: Parentheses, Prev: Shell Substitutions, Up: Porta…
13543 File: autoconf.info, Node: Parentheses, Next: Slashes, Prev: Assignments, Up: Portable Shell
13567 File: autoconf.info, Node: Slashes, Next: Special Shell Variables, Prev: Parentheses, Up: Porta…
13599 File: autoconf.info, Node: Special Shell Variables, Next: Shell Functions, Prev: Slashes, Up: P…
13673 case-insensitive unless `DUALCASE' is nonzero. Autoconf-generated
13731 beginning of a script, and many macros within autoconf rely on this
13782 command. M4sh, and hence Autoconf, attempts to execute
13931 Autoconf does not directly manipulate this variable, but `bash'
13965 File: autoconf.info, Node: Shell Functions, Next: Limitations of Builtins, Prev: Special Shell V…
13987 this triggers bugs in zsh 4.x; while Autoconf tries to find a shell
14021 For this reason, Autoconf (actually M4sh, *note Programming in M4sh::)
14054 File: autoconf.info, Node: Limitations of Builtins, Next: Limitations of Usual Tools, Prev: Shel…
14186 statement as an underquoted argument to an Autoconf macro. *Note
14267 Autoconf-generated scripts check for this problem when computing
14421 Some shell scripts, such as those generated by `autoconf', use a
14778 `/bin/sh' takes extremely long to parse large scripts. Autoconf
14799 that name in Autoconf code is asking for trouble since it is an M4
15029 File: autoconf.info, Node: Limitations of Usual Tools, Prev: Limitations of Builtins, Up: Portab…
15634 recent enough; the copy shipped with Autoconf 2.60 and Automake
16088 File: autoconf.info, Node: Portable Make, Next: Portable C and C++, Prev: Portable Shell, Up: T…
16121 File: autoconf.info, Node: $< in Ordinary Make Rules, Next: Failure in Make Rules, Up: Portable …
16133 File: autoconf.info, Node: Failure in Make Rules, Next: Special Chars in Names, Prev: $< in Ordi…
16152 File: autoconf.info, Node: Special Chars in Names, Next: Backslash-Newline-Empty, Prev: Failure …
16182 File: autoconf.info, Node: Backslash-Newline-Empty, Next: Backslash-Newline Comments, Prev: Spec…
16220 File: autoconf.info, Node: Backslash-Newline Comments, Next: Long Lines in Makefiles, Prev: Back…
16254 File: autoconf.info, Node: Long Lines in Makefiles, Next: Macros and Submakes, Prev: Backslash-N…
16264 File: autoconf.info, Node: Macros and Submakes, Next: The Make Macro MAKEFLAGS, Prev: Long Lines…
16341 File: autoconf.info, Node: The Make Macro MAKEFLAGS, Next: The Make Macro SHELL, Prev: Macros an…
16364 File: autoconf.info, Node: The Make Macro SHELL, Next: Parallel Make, Prev: The Make Macro MAKEF…
16377 use Autoconf, do
16432 File: autoconf.info, Node: Parallel Make, Next: Comments in Make Rules, Prev: The Make Macro SHE…
16550 File: autoconf.info, Node: Comments in Make Rules, Next: Newlines in Make Rules, Prev: Parallel …
16585 File: autoconf.info, Node: Newlines in Make Rules, Next: Comments in Make Macros, Prev: Comments…
16609 File: autoconf.info, Node: Comments in Make Macros, Next: Trailing whitespace in Make Macros, Pr…
16640 File: autoconf.info, Node: Trailing whitespace in Make Macros, Next: Command-line Macros and whit…
16664 File: autoconf.info, Node: Command-line Macros and whitespace, Next: obj/ and Make, Prev: Traili…
16681 File: autoconf.info, Node: obj/ and Make, Next: make -k Status, Prev: Command-line Macros and wh…
16706 File: autoconf.info, Node: make -k Status, Next: VPATH and Make, Prev: obj/ and Make, Up: Porta…
16728 File: autoconf.info, Node: VPATH and Make, Next: Single Suffix Rules, Prev: make -k Status, Up:…
16736 Autoconf and Automake support makefiles whose usages of `VPATH' are
16744 Autoconf users.
16758 File: autoconf.info, Node: Variables listed in VPATH, Next: VPATH and Double-colon, Up: VPATH an…
16774 File: autoconf.info, Node: VPATH and Double-colon, Next: $< in Explicit Rules, Prev: Variables l…
16784 File: autoconf.info, Node: $< in Explicit Rules, Next: Automatic Rule Rewriting, Prev: VPATH and…
16795 File: autoconf.info, Node: Automatic Rule Rewriting, Next: Tru64 Directory Magic, Prev: $< in Ex…
16993 File: autoconf.info, Node: Tru64 Directory Magic, Next: Make Target Lookup, Prev: Automatic Rule…
17022 File: autoconf.info, Node: Make Target Lookup, Prev: Tru64 Directory Magic, Up: VPATH and Make
17157 File: autoconf.info, Node: Single Suffix Rules, Next: Timestamps and Make, Prev: VPATH and Make,…
17211 File: autoconf.info, Node: Timestamps and Make, Prev: Single Suffix Rules, Up: Portable Make
17252 File: autoconf.info, Node: Portable C and C++, Next: Manual Configuration, Prev: Portable Make, …
17289 File: autoconf.info, Node: Varieties of Unportability, Next: Integer Overflow, Up: Portable C an…
17294 Autoconf tests and ordinary programs often need to test what is allowed
17311 since Autoconf tests cannot read the documentation they cannot
17313 behavior. It is common for Autoconf tests to probe implementations to
17324 the standards are so limiting. A major goal of Autoconf is to support
17330 File: autoconf.info, Node: Integer Overflow, Next: Preprocessor Arithmetic, Prev: Varieties of U…
17352 File: autoconf.info, Node: Integer Overflow Basics, Next: Signed Overflow Examples, Up: Integer …
17369 Autoconf tests assume that signed integer overflow silently wraps
17387 File: autoconf.info, Node: Signed Overflow Examples, Next: Optimization and Wraparound, Prev: In…
17469 File: autoconf.info, Node: Optimization and Wraparound, Next: Signed Overflow Advice, Prev: Sign…
17545 File: autoconf.info, Node: Signed Overflow Advice, Next: Signed Integer Division, Prev: Optimiza…
17606 File: autoconf.info, Node: Signed Integer Division, Prev: Signed Overflow Advice, Up: Integer Ov…
17619 File: autoconf.info, Node: Preprocessor Arithmetic, Next: Null Pointers, Prev: Integer Overflow,…
17635 File: autoconf.info, Node: Null Pointers, Next: Buffer Overruns, Prev: Preprocessor Arithmetic, …
17652 File: autoconf.info, Node: Buffer Overruns, Next: Volatile Objects, Prev: Null Pointers, Up: Po…
17706 File: autoconf.info, Node: Volatile Objects, Next: Floating Point Portability, Prev: Buffer Over…
17815 File: autoconf.info, Node: Floating Point Portability, Next: Exiting Portably, Prev: Volatile Ob…
17827 File: autoconf.info, Node: Exiting Portably, Prev: Floating Point Portability, Up: Portable C an…
17857 File: autoconf.info, Node: Manual Configuration, Next: Site Configuration, Prev: Portable C and …
17867 libraries that are unique to particular systems. However, Autoconf
17877 File: autoconf.info, Node: Specifying Target Triplets, Next: Canonicalizing, Up: Manual Configur…
17882 Autoconf-generated `configure' scripts can make decisions based on a
17944 File: autoconf.info, Node: Canonicalizing, Next: Using System Type, Prev: Specifying Target Trip…
17995 File: autoconf.info, Node: Using System Type, Prev: Canonicalizing, Up: Manual Configuration
18062 File: autoconf.info, Node: Site Configuration, Next: Running configure Scripts, Prev: Manual Con…
18084 File: autoconf.info, Node: Help Formatting, Next: External Software, Up: Site Configuration
18114 File: autoconf.info, Node: External Software, Next: Package Options, Prev: Help Formatting, Up:…
18247 File: autoconf.info, Node: Package Options, Next: Pretty Help Strings, Prev: External Software, …
18304 File: autoconf.info, Node: Pretty Help Strings, Next: Option Checking, Prev: Package Options, U…
18313 just like the standard Autoconf `help strings' do. This is the purpose
18338 double quoted. *Note Autoconf Language::, for a more detailed
18360 Autoconf 2.62. Generally, they should not be specified; they exist
18369 File: autoconf.info, Node: Option Checking, Next: Site Details, Prev: Pretty Help Strings, Up: …
18405 File: autoconf.info, Node: Site Details, Next: Transforming Names, Prev: Option Checking, Up: S…
18414 wonder how to get that information in Autoconf-generated configuration
18429 File: autoconf.info, Node: Transforming Names, Next: Site Defaults, Prev: Site Details, Up: Sit…
18434 Autoconf supports changing the names of programs when installing them.
18455 File: autoconf.info, Node: Transformation Options, Next: Transformation Examples, Up: Transformi…
18473 File: autoconf.info, Node: Transformation Examples, Next: Transformation Rules, Prev: Transforma…
18501 if you want to keep Autoconf version 1 around for awhile, you can
18502 configure Autoconf version 2 using `--program-suffix=2' to install the
18509 File: autoconf.info, Node: Transformation Rules, Prev: Transformation Examples, Up: Transforming…
18548 File: autoconf.info, Node: Site Defaults, Prev: Transforming Names, Up: Site Configuration
18553 Autoconf-generated `configure' scripts allow your site to provide
18567 a default cache file to be shared between all Autoconf-generated
18597 you need to set, see the documentation of the respective Autoconf
18600 affected `configure' scripts, or in the Autoconf M4 source code for
18602 future Autoconf version.
18622 # Give Autoconf 2.x generated configure scripts a shared default
18653 File: autoconf.info, Node: Running configure Scripts, Next: config.status Invocation, Prev: Site…
18661 with Autoconf.
18677 File: autoconf.info, Node: Basic Installation, Next: Compilers and Options, Up: Running configur…
18712 `configure' by a program called `autoconf'. You need `configure.ac' if
18714 of `autoconf'.
18762 File: autoconf.info, Node: Compilers and Options, Next: Multiple Architectures, Prev: Basic Inst…
18780 File: autoconf.info, Node: Multiple Architectures, Next: Installation Names, Prev: Compilers and…
18813 File: autoconf.info, Node: Installation Names, Next: Optional Features, Prev: Multiple Architect…
18867 File: autoconf.info, Node: Optional Features, Next: Particular Systems, Prev: Installation Names…
18896 File: autoconf.info, Node: Particular Systems, Next: System Type, Prev: Optional Features, Up: …
18936 File: autoconf.info, Node: System Type, Next: Sharing Defaults, Prev: Particular Systems, Up: R…
18970 File: autoconf.info, Node: Sharing Defaults, Next: Defining Variables, Prev: System Type, Up: R…
18984 File: autoconf.info, Node: Defining Variables, Next: configure Invocation, Prev: Sharing Default…
19001 an Autoconf limitation. Until the limitation is lifted, you can use
19007 File: autoconf.info, Node: configure Invocation, Prev: Defining Variables, Up: Running configure…
19027 Print the version of Autoconf used to generate the `configure'
19064 File: autoconf.info, Node: config.status Invocation, Next: Obsolete Constructs, Prev: Running co…
19098 Print the version number of Autoconf and the configuration
19193 File: autoconf.info, Node: Obsolete Constructs, Next: Using Autotest, Prev: config.status Invoca…
19198 Autoconf changes, and throughout the years some constructs have been
19203 You may completely skip this chapter if you are new to Autoconf. Its
19213 * Autoconf 1:: Tips for upgrading your files
19214 * Autoconf 2.13:: Some fresher tips
19217 File: autoconf.info, Node: Obsolete config.status Use, Next: acconfig Header, Up: Obsolete Const…
19263 File: autoconf.info, Node: acconfig Header, Next: autoupdate Invocation, Prev: Obsolete config.s…
19269 find templates for each symbol. Modern releases of Autoconf use
19277 Modern releases of Autoconf also provide `AH_TOP' and `AH_BOTTOM' if
19279 versions of Autoconf had a similar feature: if `./acconfig.h' contains
19286 Autoconf is to create the files `FILE.top' (typically `config.h.top')
19291 In former versions of Autoconf, the files used in preparing a
19293 configure.ac --. .------> autoconf* -----> configure
19307 File: autoconf.info, Node: autoupdate Invocation, Next: Obsolete Macros, Prev: acconfig Header, …
19313 Autoconf macros by their old names to use the current macro names. In
19314 version 2 of Autoconf, most of the macros were renamed to use a more
19319 readable and make it easier to use the current Autoconf documentation
19336 Print the version number of Autoconf and exit.
19362 File: autoconf.info, Node: Obsolete Macros, Next: Autoconf 1, Prev: autoupdate Invocation, Up: …
19367 Several macros are obsoleted in Autoconf, for various reasons (typically
19372 During the jump from Autoconf version 1 to version 2, most of the
19415 Autoconf, up to 2.13, used to provide this version of
19644 Autoconf 2.13, it used to be
20104 File: autoconf.info, Node: Autoconf 1, Next: Autoconf 2.13, Prev: Obsolete Macros, Up: Obsolete…
20109 Autoconf version 2 is mostly backward compatible with version 1.
20117 Autoconf distribution.
20128 File: autoconf.info, Node: Changed File Names, Next: Changed Makefiles, Up: Autoconf 1
20133 If you have an `aclocal.m4' installed with Autoconf (as opposed to in a
20135 `acsite.m4'. *Note autoconf Invocation::.
20147 File: autoconf.info, Node: Changed Makefiles, Next: Changed Macros, Prev: Changed File Names, U…
20180 File: autoconf.info, Node: Changed Macros, Next: Changed Results, Prev: Changed Makefiles, Up:
20185 Many of the macros were renamed in Autoconf version 2. You can still
20194 obsolete macros while running `autoconf', you may safely ignore them,
20205 File: autoconf.info, Node: Changed Results, Next: Changed Macro Writing, Prev: Changed Macros, …
20219 For example, here is a `configure.ac' fragment written for Autoconf
20255 All of the Boolean shell variables set by Autoconf macros now use
20262 File: autoconf.info, Node: Changed Macro Writing, Prev: Changed Results, Up: Autoconf 1
20274 You probably looked at the macros that came with Autoconf as a guide
20279 If you were doing tricky things with undocumented Autoconf internals
20290 File: autoconf.info, Node: Autoconf 2.13, Prev: Autoconf 1, Up: Obsolete Constructs
20295 The introduction of the previous section (*note Autoconf 1::) perfectly
20298 Autoconf version 2.50 is mostly backward compatible with version
20306 summarized in the file `NEWS' in the Autoconf distribution.
20317 File: autoconf.info, Node: Changed Quotation, Next: New Macros, Up: Autoconf 2.13
20326 used to (miraculously) work might break starting with Autoconf 2.50.
20337 Autoconf 2.13 simply ignores it:
20339 $ autoconf-2.13; ./configure --silent
20344 while Autoconf 2.50 produces a broken `configure':
20346 $ autoconf-2.50; ./configure --silent
20360 Many many (and many more) Autoconf macros were lacking proper
20370 $ autoconf-2.13
20371 autoconf: Undefined macros:
20372 ***BUG in Autoconf--please report*** AC_FD_MSG
20373 ***BUG in Autoconf--please report*** AC_EPI
20376 $ autoconf-2.50
20380 File: autoconf.info, Node: New Macros, Next: Hosts and Cross-Compilation, Prev: Changed Quotatio…
20385 While Autoconf was relatively dormant in the late 1990s, Automake
20386 provided Autoconf-like macros for a while. Starting with Autoconf 2.50
20387 in 2001, Autoconf provided versions of these macros, integrated in the
20394 `AM_TYPE_PTRDIFF_T' is expanded, replaced with its Autoconf definition.
20396 Fortunately Autoconf catches pre-`AC_INIT' expansions, and
20403 $ autoconf
20424 $ autoconf
20428 File: autoconf.info, Node: Hosts and Cross-Compilation, Next: AC_LIBOBJ vs LIBOBJS, Prev: New Ma…
20473 In Autoconf 2.13 and before, the variables `build', `host', and
20521 File: autoconf.info, Node: AC_LIBOBJ vs LIBOBJS, Next: AC_ACT_IFELSE vs AC_TRY_ACT, Prev: Hosts …
20526 Up to Autoconf 2.13, the replacement of functions was triggered via the
20527 variable `LIBOBJS'. Since Autoconf 2.50, the macro `AC_LIBOBJ' should
20528 be used instead (*note Generic Functions::). Starting at Autoconf
20563 File: autoconf.info, Node: AC_ACT_IFELSE vs AC_TRY_ACT, Prev: AC_LIBOBJ vs LIBOBJS, Up: Autoconf
20568 Since Autoconf 2.50, internal codes uses `AC_PREPROC_IFELSE',
20584 Autoconf promotes accuracy of the testing framework at, ahem..., the
20616 File: autoconf.info, Node: Using Autotest, Next: FAQ, Prev: Obsolete Constructs, Up: Top
20624 do not depend upon Autotest without subscribing to the Autoconf mailing
20628 to run their test suite. Autoconf by itself is the paragon of this
20633 that are most likely to torture Autoconf and exhibit deficiencies.
20642 Autoconf, Autotest provides a test suite generation framework, based on
20647 Autoconf itself has been using Autotest for years, and we do attest
20665 File: autoconf.info, Node: Using an Autotest Test Suite, Next: Writing Testsuites, Up: Using Aut…
20676 File: autoconf.info, Node: testsuite Scripts, Next: Autotest Logs, Up: Using an Autotest Test Su…
20774 File: autoconf.info, Node: Autotest Logs, Prev: testsuite Scripts, Up: Using an Autotest Test Su…
20789 cannot preserve the value of `CC' for subsequent runs. Autoconf
20824 File: autoconf.info, Node: Writing Testsuites, Next: testsuite Invocation, Prev: Using an Autote…
20841 other text; Autoconf also reserves the namespace `^_AT_' for internal
20847 Since Autoconf is built on top of M4sugar (*note Programming in
21169 File: autoconf.info, Node: testsuite Invocation, Next: Making testsuite Scripts, Prev: Writing T…
21313 File: autoconf.info, Node: Making testsuite Scripts, Prev: testsuite Invocation, Up: Using Autot…
21394 because users might not have Autoconf installed, and thus would not be
21424 copy of this file resides in the Autoconf source tree.
21433 File: autoconf.info, Node: FAQ, Next: History, Prev: Using Autotest, Up: Top
21435 20 Frequent Autoconf Questions, with answers
21438 Several questions about Autoconf come up occasionally. Here some of
21445 * Bootstrapping:: Autoconf and GNU M4 require each other?
21454 File: autoconf.info, Node: Distributing, Next: Why GNU M4, Up: FAQ
21460 scripts that Autoconf generates? How does that affect my
21464 Autoconf produces may be distributed or used. In Autoconf version 1,
21467 GPL, but doing so is not required to use Autoconf.
21472 the GPL when they are used with an Autoconf-generated `configure'
21478 File: autoconf.info, Node: Why GNU M4, Next: Bootstrapping, Prev: Distributing, Up: FAQ
21483 Why does Autoconf require GNU M4?
21486 number of macros that Autoconf exceeds. They also lack several builtin
21488 sophisticated application like Autoconf, including:
21496 Autoconf requires version 1.4.6 or later of GNU M4.
21498 Since only software maintainers need to use Autoconf, and since GNU
21505 File: autoconf.info, Node: Bootstrapping, Next: Why Not Imake, Prev: Why GNU M4, Up: FAQ
21510 If Autoconf requires GNU M4 and GNU M4 has an Autoconf
21515 `configure' script produced by Autoconf, Autoconf is not required in
21516 order to run the script and install GNU M4. Autoconf is only required
21521 File: autoconf.info, Node: Why Not Imake, Next: Defining Directories, Prev: Bootstrapping, Up: …
21533 Autoconf generated scripts frequently work on machines that it has
21544 Autoconf may appear to be this kind of database, but in fact it is
21574 With Autoconf, installers need not assume that Imake itself is
21587 Autoconf, where each package comes with its own independent
21594 Autoconf, which uses the general-purpose preprocessor M4, and
21619 File: autoconf.info, Node: Defining Directories, Next: Autom4te Cache, Prev: Why Not Imake, Up:…
21663 Autoconf Macro Archive
21664 (http://www.gnu.org/software/autoconf-archive/).
21675 File: autoconf.info, Node: Autom4te Cache, Next: Present But Cannot Be Compiled, Prev: Defining …
21683 read by many tools: `autoconf' to create `configure', `autoheader' to
21693 future runs. For instance, if you run `autoconf', behind the scenes,
21706 aware that disabling the cache slows down the Autoconf test suite by
21714 File: autoconf.info, Node: Present But Cannot Be Compiled, Next: Expanded Before Required, Prev:…
21727 The transition began with Autoconf 2.56. As of Autoconf 2.64 both
21741 $ autoconf -Wall
21769 configure: WARNING: pi.h: see the Autoconf documentation
21787 $ autoconf -Wall
21805 File: autoconf.info, Node: Expanded Before Required, Next: Debugging, Prev: Present But Cannot B…
21810 Older versions of Autoconf silently built files with incorrect ordering
21812 indirectly required, an inner macro. Starting with Autoconf 2.64, this
21829 $ autoconf
21841 Macros::), although this only works in Autoconf 2.64 and newer. A more
21869 With older versions of Autoconf, the setting of `foobar=' occurs before
21870 the single compiler check, as the author intended. But with Autoconf
21879 Autoconf were broken with regards to the rules of `AC_REQUIRE', which
21881 `AC_PROG_CC' when upgrading autoconf. In other words, the author was
21887 regardless of whether Autoconf 2.63 or 2.64 is used? One idea is to
21923 File: autoconf.info, Node: Debugging, Prev: Expanded Before Required, Up: FAQ
21928 While in general, `configure' scripts generated by Autoconf strive to
21940 * When `autoconf' fails, common causes for error include:
21945 * under- or overquoted macro arguments (*note Autoconf
21950 Autoconf Language::).
21959 * Sometimes `autoconf' succeeds but the generated `configure' script
21962 the same tips apply, as if `autoconf' had failed.
22027 File: autoconf.info, Node: History, Next: GNU Free Documentation License, Prev: FAQ, Up: Top
22029 21 History of Autoconf
22034 You may be wondering, Why was Autoconf originally written? How did
22049 File: autoconf.info, Node: Genesis, Next: Exodus, Up: History
22073 File: autoconf.info, Node: Exodus, Next: Leviticus, Prev: Genesis, Up: History
22087 abundance and ease of Autoconf began.
22116 needs (I didn't realize then how much Autoconf would eventually have to
22128 File: autoconf.info, Node: Leviticus, Next: Numbers, Prev: Exodus, Up: History
22137 shortened it to Autoconf.
22144 came up with the idea of making an Autoconf shell script to run M4 and
22147 and symbols, for more accurate results; Karl Berry, who got Autoconf to
22151 Autoconf for his UUCP package. The alpha testers cheerfully adjusted
22153 Autoconf macros changed from release to release. They all contributed
22157 File: autoconf.info, Node: Numbers, Next: Deuteronomy, Prev: Leviticus, Up: History
22162 In July 1992, after months of alpha testing, I released Autoconf 1.0,
22166 part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf
22170 Autoconf turned out to be a good torture test for M4 implementations.
22172 Autoconf defined, and several bugs showed up in GNU M4 as well.
22178 More development occurred as people put Autoconf under more stresses
22186 `--autoconf-dir' option and `AC_MACRODIR' environment variable. (He
22188 to use Autoconf".) Roland and Noah improved the quoting protection in
22193 File: autoconf.info, Node: Deuteronomy, Prev: Numbers, Up: History
22201 revision of Autoconf. I added most of the features of the Cygnus
22202 `configure' that Autoconf had lacked, largely by adapting the relevant
22208 using Autoconf.
22228 source code packages to use Autoconf. With the help of Franc,ois
22233 shown that Autoconf has a pronounced tendency to regress when we change
22244 File: autoconf.info, Node: GNU Free Documentation License, Next: Indices, Prev: History, Up: Top
22730 File: autoconf.info, Node: Indices, Prev: GNU Free Documentation License, Up: Top
22741 * Autoconf Macro Index:: Index of Autoconf macros
22748 File: autoconf.info, Node: Environment Variable Index, Next: Output Variable Index, Up: Indices
22754 influence Autoconf checks.
22913 * WARNINGS: autoconf Invocation. (line 62)
22919 File: autoconf.info, Node: Output Variable Index, Next: Preprocessor Symbol Index, Prev: Environ…
22924 This is an alphabetical list of the variables that Autoconf can
23164 File: autoconf.info, Node: Preprocessor Symbol Index, Next: Cache Variable Index, Prev: Output V…
23170 Autoconf macros define. To work with Autoconf, C source code needs to
23431 File: autoconf.info, Node: Cache Variable Index, Next: Autoconf Macro Index, Prev: Preprocessor …
23437 macros defined in Autoconf. Autoconf macros may use additional cache
23590 File: autoconf.info, Node: Autoconf Macro Index, Next: M4 Macro Index, Prev: Cache Variable Inde…
23592 B.5 Autoconf Macro Index
23595 This is an alphabetical list of the Autoconf macros.
24077 File: autoconf.info, Node: M4 Macro Index, Next: Autotest Macro Index, Prev: Autoconf Macro Inde…
24380 File: autoconf.info, Node: Autotest Macro Index, Next: Program & Function Index, Prev: M4 Macro …
24422 File: autoconf.info, Node: Program & Function Index, Next: Concept Index, Prev: Autotest Macro I…
24727 File: autoconf.info, Node: Concept Index, Prev: Program & Function Index, Up: Indices
24786 * autoconf: autoconf Invocation. (line 6)
24787 * Autoconf upgrading <1>: Autoconf 2.13. (line 6)
24788 * Autoconf upgrading: Autoconf 1. (line 6)
24789 * Autoconf version: Versioning. (line 6)
24813 * Back trace: autoconf Invocation. (line 86)
24850 * Common autoconf behavior: Common Behavior. (line 6)
25001 * History of autoconf: History. (line 6)
25069 * Macro invocation stack: autoconf Invocation. (line 86)
25095 * Messages, from autoconf: Reporting Messages. (line 6)
25177 * quotation: Autoconf Language. (line 6)
25273 * Upgrading autoconf <1>: Autoconf 2.13. (line 6)
25274 * Upgrading autoconf: Autoconf 1. (line 6)
25285 * version, Autoconf: Versioning. (line 6)
25325 Node: Writing Autoconf Input38404
25327 Node: Autoconf Language42228
25328 Node: Autoconf Input Layout49397
25331 Node: autoconf Invocation54561
25522 Node: Writing Autoconf Macros490968
25642 Node: Autoconf 1834053
25648 Node: Autoconf 2.13841615
25684 Node: Autoconf Macro Index1011383