Index: autoconf.texi =================================================================== RCS file: /cvs/autoconf/doc/autoconf.texi,v retrieving revision 1.437 diff -u -r1.437 autoconf.texi --- autoconf.texi 2001/03/30 12:50:29 1.437 +++ autoconf.texi 2001/03/31 15:56:24 @@ -35,17 +35,17 @@ @dircategory Individual utilities @direntry * autoscan: (autoconf)autoscan Invocation. - Semi-automatic @file{configure.ac} writing + Semi-automatic @file{configure.ac} writing * ifnames: (autoconf)ifnames Invocation. - Listing the conditionals in source code + Listing the conditionals in source code * autoconf: (autoconf)autoconf Invocation. - How to create configuration scripts + How to create configuration scripts * autoreconf: (autoconf)autoreconf Invocation. - Remaking multiple @code{configure} scripts + Remaking multiple @code{configure} scripts * configure: (autoconf)configure Invocation. - Configuring a package + Configuring a package * config.status: (autoconf)config.status Invocation. - Recreating a configuration + Recreating a configuration @end direntry @ifinfo @@ -568,9 +568,9 @@ @group configure.ac --. - | .------> autoconf* -----> configure + | .------> autoconf* -----> configure [aclocal.m4] --+---+ - | `-----> [autoheader*] --> [config.h.in] + | `-----> [autoheader*] --> [config.h.in] [acsite.m4] ---' @end group @@ -581,11 +581,11 @@ Files used in configuring a software package: @example @group - .-------------> [config.cache] + .-------------> [config.cache] configure* ------------+-------------> config.log - | + | [config.h.in] -. v .-> [config.h] -. - +--> config.status* -+ +--> make* + +--> config.status* -+ +--> make* Makefile.in ---' `-> Makefile ---' @end group @end example @@ -693,8 +693,8 @@ @example AC_CHECK_HEADER([stdio.h], - [AC_DEFINE([HAVE_STDIO_H])], - [AC_MSG_ERROR([Sorry, can't do anything for you])]) + [AC_DEFINE([HAVE_STDIO_H])], + [AC_MSG_ERROR([Sorry, can't do anything for you])]) @end example @noindent @@ -702,8 +702,8 @@ @example AC_CHECK_HEADER(stdio.h, - [AC_DEFINE(HAVE_STDIO_H)], - [AC_MSG_ERROR([Sorry, can't do anything for you])]) + [AC_DEFINE(HAVE_STDIO_H)], + [AC_MSG_ERROR([Sorry, can't do anything for you])]) @end example @noindent @@ -714,8 +714,8 @@ @example AC_CHECK_HEADER(stdio.h, - AC_DEFINE(HAVE_STDIO_H), - AC_MSG_ERROR([Sorry, can't do anything for you])) + AC_DEFINE(HAVE_STDIO_H), + AC_MSG_ERROR([Sorry, can't do anything for you])) @end example You may have to use text that also resembles a macro call. In this @@ -1637,7 +1637,7 @@ @example AC_CONFIG_FILES(Makefile:boiler/top.mk:boiler/bot.mk - lib/Makefile:boiler/lib.mk) + lib/Makefile:boiler/lib.mk) @end example @noindent @@ -1939,10 +1939,10 @@ @example .sh: - rm -f $@@ $@@.tmp - sed 's,@@datadir\@@,$(pkgdatadir),g' $< >$@@.tmp - chmod +x $@@.tmp - mv $@@.tmp $@@ + rm -f $@@ $@@.tmp + sed 's,@@datadir\@@,$(pkgdatadir),g' $< >$@@.tmp + chmod +x $@@.tmp + mv $@@.tmp $@@ @end example Three things are noteworthy: @@ -2003,7 +2003,7 @@ @example time.info: time.texinfo - $(MAKEINFO) $(srcdir)/time.texinfo + $(MAKEINFO) $(srcdir)/time.texinfo @end example @node Automatic Remaking, , Build Directories, Makefile Substitutions @@ -2032,23 +2032,23 @@ @example @group $(srcdir)/configure: configure.ac aclocal.m4 - cd $(srcdir) && autoconf + cd $(srcdir) && autoconf # autoheader might not change config.h.in, so touch a stamp file. $(srcdir)/config.h.in: stamp-h.in $(srcdir)/stamp-h.in: configure.ac aclocal.m4 - cd $(srcdir) && autoheader - echo timestamp > $(srcdir)/stamp-h.in + cd $(srcdir) && autoheader + echo timestamp > $(srcdir)/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status - ./config.status + ./config.status Makefile: Makefile.in config.status - ./config.status + ./config.status config.status: configure - ./config.status --recheck + ./config.status --recheck @end group @end example @@ -2325,10 +2325,10 @@ @example AH_TEMPLATE([CRAY_STACKSEG_END], - [Define to one of _getb67, GETB67, getb67 - for Cray-2 and Cray-YMP systems. This - function is required for alloca.c support - on those systems.]) + [Define to one of _getb67, GETB67, getb67 + for Cray-2 and Cray-YMP systems. This + function is required for alloca.c support + on those systems.]) @end example @noindent @@ -2380,8 +2380,8 @@ @example fubar=42 AC_CONFIG_COMMANDS(fubar, - [echo this is extra $fubar, and so on.], - [fubar=$fubar]) + [echo this is extra $fubar, and so on.], + [fubar=$fubar]) @end example Here is a better one: @@ -2433,7 +2433,7 @@ @example AC_CONFIG_LINKS(host.h:config/$machine.h - object.h:config/$obj_format.h) + object.h:config/$obj_format.h) @end example @noindent @@ -3926,8 +3926,8 @@ @example AC_CHECK_MEMBER(struct passwd.pw_gecos,, - [AC_MSG_ERROR([We need `passwd.pw_gecos'!])], - [#include ]) + [AC_MSG_ERROR([We need `passwd.pw_gecos'!])], + [#include ]) @end example You can use this macro for sub members: @@ -6179,11 +6179,11 @@ @example $ gawk 'function die () @{ print "Aaaaarg!" @} - BEGIN @{ die () @}' + BEGIN @{ die () @}' gawk: cmd. line:2: BEGIN @{ die () @} gawk: cmd. line:2: ^ parse error $ gawk 'function die () @{ print "Aaaaarg!" @} - BEGIN @{ die() @}' + BEGIN @{ die() @}' Aaaaarg! @end example @@ -6259,7 +6259,7 @@ @example dir=`expr "x$file" : 'x\(.*\)/[^/]*' \| - '.' : '.' + '.' : '.' @end example @noindent @@ -6617,16 +6617,16 @@ # The order of these tests is important. AC_TRY_CPP([#include #include ], - [AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4]) + [AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4]) if test $fstype = no; then AC_TRY_CPP([#include #include ], - [AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3]) + [AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3]) fi if test $fstype = no; then AC_TRY_CPP([#include #include ], - [AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX]) + [AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX]) fi # (more cases omitted here) AC_MSG_RESULT([$fstype]) @@ -6911,7 +6911,7 @@ true && ac_cv_shell_true_works=yes if test $ac_cv_shell_true_works = yes; then AC_DEFINE([TRUE_WORKS], 1 - [Define if `true(1)' works properly.]) + [Define if `true(1)' works properly.]) fi[]dnl ])]) @end group @@ -6930,7 +6930,7 @@ true && ac_cv_shell_true_works=yes]) if test $ac_cv_shell_true_works = yes; then AC_DEFINE([TRUE_WORKS], 1 - [Define if `true(1)' works properly.]) + [Define if `true(1)' works properly.]) fi[]dnl ]) @end group @@ -7610,9 +7610,9 @@ #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif], - [atoi (*tzname);], - [ac_cv_var_tzname=yes], - [ac_cv_var_tzname=no]) + [atoi (*tzname);], + [ac_cv_var_tzname=yes], + [ac_cv_var_tzname=no]) @end example @noindent @@ -7646,9 +7646,9 @@ #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif]], - [atoi (*tzname);])], - [ac_cv_var_tzname=yes], - [ac_cv_var_tzname=no]) + [atoi (*tzname);])], + [ac_cv_var_tzname=yes], + [ac_cv_var_tzname=no]) @end example @c FIXME: Quadrigraphs and hopeless cases. @@ -7946,8 +7946,8 @@ @example AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])], - [ac_cv_emxos2=yes], - [ac_cv_emxos2=no])]) + [ac_cv_emxos2=yes], + [ac_cv_emxos2=no])]) @end example @noindent @@ -7955,11 +7955,11 @@ @example AC_CACHE_CHECK([for EMX OS/2 environment], - [ac_cv_emxos2], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], - [return __EMX__;])], - [ac_cv_emxos2=yes], - [ac_cv_emxos2=no])]) + [ac_cv_emxos2], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], + [return __EMX__;])], + [ac_cv_emxos2=yes], + [ac_cv_emxos2=no])]) @end example When using @code{AC_TRY_RUN} or any macro that cannot work when @@ -8082,8 +8082,8 @@ define([_AC_EMXOS2], [AC_CACHE_CHECK([for EMX OS/2 environment], [ac_cv_emxos2], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [return __EMX__;])], - [ac_cv_emxos2=yes], - [ac_cv_emxos2=no])]) + [ac_cv_emxos2=yes], + [ac_cv_emxos2=no])]) test "$ac_cv_emxos2" = yes && EMXOS2=yes[]dnl ])# _AC_EMXOS2 @end example @@ -8283,7 +8283,7 @@ @example case "$target" in i386-*-mach* | i386-*-gnu*) - obj_format=aout emulation=mach bfd_gas=yes ;; + obj_format=aout emulation=mach bfd_gas=yes ;; i960-*-bout) obj_format=bout ;; esac @end example @@ -8293,7 +8293,7 @@ @example AC_CONFIG_LINKS(host.h:config/$machine.h - object.h:config/$obj_format.h) + object.h:config/$obj_format.h) @end example You can also use the host system type to find cross-compilation tools. @@ -8487,11 +8487,11 @@ @example AC_DEFUN(TEST_MACRO, [AC_ARG_WITH(foo, - AC_HELP_STRING([--with-foo], - [use foo (default is NO)]), - ac_cv_use_foo=$withval, ac_cv_use_foo=no), + AC_HELP_STRING([--with-foo], + [use foo (default is NO)]), + ac_cv_use_foo=$withval, ac_cv_use_foo=no), AC_CACHE_CHECK(whether to use foo, - ac_cv_use_foo, ac_cv_use_foo=no)]) + ac_cv_use_foo, ac_cv_use_foo=no)]) @end example Please note that the call to @code{AC_HELP_STRING} is @strong{unquoted}. @@ -8510,8 +8510,8 @@ @example AC_DEFUN(MY_ARG_WITH, [AC_ARG_WITH([$1], - AC_HELP_STRING([--with-$1], [use $1 (default is $2)]), - ac_cv_use_$1=$withval, ac_cv_use_$1=no), + AC_HELP_STRING([--with-$1], [use $1 (default is $2)]), + ac_cv_use_$1=$withval, ac_cv_use_$1=no), AC_CACHE_CHECK(whether to use $1, ac_cv_use_$1, ac_cv_use_$1=$2)]) @end example @end defmac @@ -8627,11 +8627,11 @@ @example transform = @@program_transform_name@@ install: all - $(INSTALL_PROGRAM) myprog $(bindir)/`echo myprog | \ - sed '$(transform)'` + $(INSTALL_PROGRAM) myprog $(bindir)/`echo myprog | \ + sed '$(transform)'` uninstall: - rm -f $(bindir)/`echo myprog | sed '$(transform)'` + rm -f $(bindir)/`echo myprog | sed '$(transform)'` @end example @noindent @@ -8640,15 +8640,15 @@ @example PROGRAMS = cp ls rm install: - for p in $(PROGRAMS); do \ - $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | \ - sed '$(transform)'`; \ - done + for p in $(PROGRAMS); do \ + $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p | \ + sed '$(transform)'`; \ + done uninstall: - for p in $(PROGRAMS); do \ - rm -f $(bindir)/`echo $$p | sed '$(transform)'`; \ - done + for p in $(PROGRAMS); do \ + rm -f $(bindir)/`echo $$p | sed '$(transform)'`; \ + done @end example Whether to do the transformations on documentation files (Texinfo or @@ -8875,11 +8875,11 @@ @group config.h: stamp-h stamp-h: config.h.in config.status - ./config.status config.h - echo > stamp-h + ./config.status config.h + echo > stamp-h Makefile: Makefile.in config.status - ./config.status Makefile + ./config.status Makefile @end group @end example @@ -8950,13 +8950,13 @@ @group config.h: stamp-h stamp-h: config.h.in config.status - CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES= \ - CONFIG_HEADERS=config.h ./config.status - echo > stamp-h + CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_FILES= \ + CONFIG_HEADERS=config.h ./config.status + echo > stamp-h Makefile: Makefile.in config.status - CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_HEADERS= \ - CONFIG_FILES=Makefile ./config.status + CONFIG_COMMANDS= CONFIG_LINKS= CONFIG_HEADERS= \ + CONFIG_FILES=Makefile ./config.status @end group @end example @@ -9002,12 +9002,12 @@ @example @group configure.ac --. .------> autoconf* -----> configure - +---+ + +---+ [aclocal.m4] --+ `---. [acsite.m4] ---' | - +--> [autoheader*] -> [config.h.in] + +--> [autoheader*] -> [config.h.in] [acconfig.h] ----. | - +-----' + +-----' [config.h.top] --+ [config.h.bot] --' @end group @@ -9142,9 +9142,9 @@ @example AC_CHECK_TYPE(address@hidden, - [AC_DEFINE(address@hidden, address@hidden, - [Define to address@hidden' if - does not define.])]) + [AC_DEFINE(address@hidden, address@hidden, + [Define to address@hidden' if + does not define.])]) @end example In order to keep backward compatibility, the two versions of @@ -9216,7 +9216,7 @@ AC_REQUIRE([AC_CANONICAL_HOST])[]dnl case $host_os in *cygwin* ) CYGWIN=yes;; - * ) CYGWIN=no;; + * ) CYGWIN=no;; esac @end example @@ -9424,7 +9424,7 @@ @example AC_LINK_FILES(config/$machine.h config/$obj_format.h, - host.h object.h) + host.h object.h) @end example @noindent @@ -9432,7 +9432,7 @@ @example AC_CONFIG_LINKS(host.h:config/$machine.h - object.h:config/$obj_format.h) + object.h:config/$obj_format.h) @end example @end defmac @@ -9536,7 +9536,7 @@ @group AC_CONFIG_FILES(@address@hidden) AC_CONFIG_COMMANDS([default], - @var{extra-cmds}, @var{init-cmds}) + @var{extra-cmds}, @var{init-cmds}) AC_OUTPUT @end group @end example @@ -9554,9 +9554,9 @@ @example fubar=27 AC_OUTPUT_COMMANDS([echo this is extra $fubar, and so on.], - fubar=$fubar) + fubar=$fubar) AC_OUTPUT_COMMANDS([echo this is another, extra, bit], - [echo init bit]) + [echo init bit]) @end example Aside from the fact that @code{AC_CONFIG_COMMANDS} requires an @@ -9803,8 +9803,8 @@ [#if defined M_XENIX && !defined M_UNIX yes #endif], - [AC_MSG_RESULT([yes]); XENIX=yes], - [AC_MSG_RESULT([no]); XENIX=]) + [AC_MSG_RESULT([yes]); XENIX=yes], + [AC_MSG_RESULT([no]); XENIX=]) @end example @end defmac