* doc/autoconf.texi (all over the map): Single-quote macro arguments consistently. Index: doc/autoconf.texi =================================================================== RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v retrieving revision 1.897 diff -u -r1.897 autoconf.texi --- doc/autoconf.texi 10 May 2005 23:37:37 -0000 1.897 +++ doc/autoconf.texi 15 May 2005 03:25:37 -0000 @@ -1108,9 +1108,9 @@ three lines below are equivalent: @example -AC_CHECK_HEADERS(stdio.h, [], [], []) -AC_CHECK_HEADERS(stdio.h,,,) -AC_CHECK_HEADERS(stdio.h) +AC_CHECK_HEADERS([stdio.h], [], [], []) +AC_CHECK_HEADERS([stdio.h],,,) +AC_CHECK_HEADERS([stdio.h]) @end example It is best to put each macro call on its own line in @@ -1679,7 +1679,7 @@ error output and exit with failure (exit status is 63). For example: @example -AC_PREREQ(@value{VERSION}) +AC_PREREQ(address@hidden) @end example This macro is the only macro that may be used before @code{AC_INIT}, but @@ -1712,7 +1712,7 @@ @c The asis prevents RCS from changing the example in the manual. @example -AC_REVISION(address@hidden: 1.30 }$) +AC_REVISION(address@hidden: 1.30 }$]) @end example @noindent @@ -1915,15 +1915,15 @@ @example @dots{} && my_foos="$my_foos fooo" @dots{} && my_foos="$my_foos foooo" -AC_CONFIG_FOOS($my_foos) +AC_CONFIG_FOOS([$my_foos]) @end example @noindent and use this instead: @example address@hidden && AC_CONFIG_FOOS(fooo) address@hidden && AC_CONFIG_FOOS(foooo) address@hidden && AC_CONFIG_FOOS([fooo]) address@hidden && AC_CONFIG_FOOS([foooo]) @end example The macros @code{AC_CONFIG_FILES} and @code{AC_CONFIG_HEADERS} use @@ -1932,7 +1932,7 @@ from its templates, @var{inputs} (defaulting to @address@hidden). For instance address@hidden(Makefile:boiler/top.mk:boiler/bot.mk)} asks for address@hidden([Makefile:boiler/top.mk:boiler/bot.mk)]} asks for the creation of @file{Makefile} that will be the expansion of the output variables in the concatenation of @file{boiler/top.mk} and @file{boiler/bot.mk}. @@ -2441,7 +2441,7 @@ A corollary is that you should not use these variables except in Makefiles. For instance, instead of trying to evaluate @code{datadir} in @file{configure} and hard-coding it in Makefiles using -e.g., @samp{AC_DEFINE_UNQUOTED(DATADIR, "$datadir", [Data directory.])}, +e.g., @samp{AC_DEFINE_UNQUOTED([DATADIR], ["$datadir"], [Data directory.])}, you should add @samp{-DDATADIR="$(datadir)"} to your @code{CPPFLAGS}. @@ -2750,7 +2750,7 @@ The @command{autoheader} program can create a template file of C @samp{#define} statements for @command{configure} to use. If address@hidden invokes @code{AC_CONFIG_HEADERS(@var{file})}, address@hidden invokes @code{AC_CONFIG_HEADERS(address@hidden)}, @command{autoheader} creates @address@hidden; if multiple file arguments are given, the first one is used. Otherwise, @command{autoheader} creates @file{config.h.in}. @@ -2857,7 +2857,7 @@ templates, @command{autoheader} fails with an error message. The simplest way to create a template for a @var{symbol} is to supply -the @var{description} argument to an @samp{AC_DEFINE(@var{symbol})}; see +the @var{description} argument to an @samp{AC_DEFINE(address@hidden)}; see @ref{Defining Symbols}. You may also use one of the following macros. @defmac AH_VERBATIM (@var{key}, @var{template}) @@ -2991,8 +2991,8 @@ For example, this call: @example -AC_CONFIG_LINKS(host.h:config/$machine.h - object.h:config/$obj_format.h) +AC_CONFIG_LINKS([host.h:config/$machine.h + object.h:config/$obj_format.h]) @end example @noindent @@ -3035,7 +3035,7 @@ if test "$package_foo_enabled" = yes; then $my_subdirs="$my_subdirs foo" fi -AC_CONFIG_SUBDIRS($my_subdirs) +AC_CONFIG_SUBDIRS([$my_subdirs]) @end example @noindent @@ -3045,7 +3045,7 @@ @example if test "$package_foo_enabled" = yes; then - AC_CONFIG_SUBDIRS(foo) + AC_CONFIG_SUBDIRS([foo]) fi @end example @@ -3054,7 +3054,7 @@ @example if test -d $srcdir/foo; then - AC_CONFIG_SUBDIRS(foo) + AC_CONFIG_SUBDIRS([foo]) fi @end example @@ -3196,7 +3196,7 @@ For instance, @example -AC_CHECK_TYPES(struct $Expensive*) +AC_CHECK_TYPES([struct $Expensive*]) @end example @noindent @@ -3416,8 +3416,8 @@ AC_PROG_LEX if test "$LEX" != flex; then LEX="$SHELL $missing_dir/missing flex" - AC_SUBST(LEX_OUTPUT_ROOT, lex.yy) - AC_SUBST(LEXLIB, '') + AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) + AC_SUBST([LEXLIB], ['']) fi @end example @@ -3550,7 +3550,7 @@ For example, if the user runs @samp{configure --host=i386-gnu}, then this call: @example -AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL([RANLIB], [ranlib], [:]) @end example @noindent sets @code{RANLIB} to @file{i386-gnu-ranlib} if that program exists in @@ -3688,8 +3688,8 @@ appear the standard C library on some hosts, and in special libraries like @code{nsl} on other hosts. On some hosts the special libraries contain variant implementations that you may not want to use. These -days it is normally better to use @code{AC_SEARCH_LIBS(gethostbyname, -nsl)} instead of @code{AC_CHECK_LIB(nsl, gethostbyname)}. +days it is normally better to use @code{AC_SEARCH_LIBS([gethostbyname], +[nsl])} instead of @code{AC_CHECK_LIB([nsl], [gethostbyname])}. @end defmac @@ -4580,9 +4580,9 @@ @code{"foo"} or @code{"bar"}, you should do: @example -AC_LIBSOURCE(foo.c) -AC_LIBSOURCE(bar.c) -AC_LIBOBJ($foo_or_bar) +AC_LIBSOURCE([foo.c]) +AC_LIBSOURCE([bar.c]) +AC_LIBOBJ([$foo_or_bar]) @end example @noindent @@ -4601,7 +4601,7 @@ @example AC_LIBSOURCES([foo.c, bar.c]) -AC_LIBOBJ($foo_or_bar) +AC_LIBOBJ([$foo_or_bar]) @end example @end defmac @@ -4611,7 +4611,7 @@ @var{directory}, a name relative to the top level of the source tree. The replacement directory defaults to @file{.}, the top level directory, and the most typical value is @file{lib}, corresponding -to @samp{AC_CONFIG_LIBOBJ_DIR(lib)}. +to @samp{AC_CONFIG_LIBOBJ_DIR([lib])}. @command{configure} might need to know the replacement directory for the following reasons: (i) some checks use the replacement files, (ii) some @@ -4938,7 +4938,7 @@ @example AC_HEADER_STDC -AC_CHECK_FUNCS(strchr memcpy) +AC_CHECK_FUNCS([strchr memcpy]) @end example @noindent @@ -4969,7 +4969,7 @@ way to incorporate your implementations only when needed (since the ones in system C libraries may be hand optimized) is to, taking @code{memchr} for example, put it in @file{memchr.c} and use address@hidden(memchr)}. address@hidden([memchr])}. @end defmac @defmac AC_HEADER_SYS_WAIT @@ -5035,7 +5035,7 @@ example, @code{struct timeval} as well as @code{struct tm}. It is best used in conjunction with @code{HAVE_SYS_TIME_H}, which can be checked for using address@hidden(sys/time.h)}. address@hidden([sys/time.h])}. @example @group @@ -5189,7 +5189,7 @@ This macro uses an m4 list as first argument: @example -AC_CHECK_DECLS(strdup) +AC_CHECK_DECLS([strdup]) AC_CHECK_DECLS([strlen]) AC_CHECK_DECLS([malloc, realloc, calloc, free]) @end example @@ -5463,7 +5463,7 @@ This macro uses m4 lists: @example -AC_CHECK_TYPES(ptrdiff_t) +AC_CHECK_TYPES([ptrdiff_t]) AC_CHECK_TYPES([unsigned long long int, uintmax_t]) @end example @@ -5559,7 +5559,7 @@ For example, the call @example -AC_CHECK_SIZEOF(int *) +AC_CHECK_SIZEOF([int *]) @end example @noindent @@ -5667,7 +5667,7 @@ this: @example -AC_PROG_CC(cl egcs gcc cc) +AC_PROG_CC([cl egcs gcc cc]) @end example If the C compiler is not in @acronym{ANSI} mode by default, try to add an @@ -5975,7 +5975,7 @@ like this: @example -AC_PROG_CXX(cl KCC CC cxx cc++ xlC aCC c++ g++ egcs gcc) +AC_PROG_CXX([cl KCC CC cxx cc++ xlC aCC c++ g++ egcs gcc]) @end example If using the @acronym{GNU} C++ compiler, set shell variable @code{GXX} to @@ -6038,7 +6038,7 @@ @code{AC_PROG_F77} like this: @example -AC_PROG_F77(fl32 f77 fort77 xlf g77 f90 xlf90) +AC_PROG_F77([fl32 f77 fort77 xlf g77 f90 xlf90]) @end example If using @code{g77} (the @acronym{GNU} Fortran 77 compiler), then @@ -6094,7 +6094,7 @@ To check for characteristics not listed here, use @code{AC_COMPILE_IFELSE} (@pxref{Running the Compiler}) or @code{AC_RUN_IFELSE} (@pxref{Run Time}), making sure to first set the -current language to Fortran 77 or Fortran via @code{AC_LANG(Fortran 77)} +current language to Fortran 77 or Fortran via @code{AC_LANG([Fortran 77])} or @code{AC_LANG(Fortran)} (@pxref{Language Choice}). @@ -6600,10 +6600,10 @@ address@hidden), since Autoconf will detect inconsistencies. @example -AC_LANG_PUSH(Fortran 77) +AC_LANG_PUSH([Fortran 77]) # Perform some tests on Fortran 77. # @dots{} -AC_LANG_POP(Fortran 77) +AC_LANG_POP([Fortran 77]) @end example @end defmac @@ -6768,7 +6768,7 @@ For instance executing (observe the double quotation!): @example -AC_INIT(Autoconf Documentation, @value{VERSION}, bug-autoconf@@gnu.org) +AC_INIT([Autoconf Documentation], address@hidden, [bug-autoconf@@gnu.org]) AC_DEFINE([HELLO_WORLD], ["Hello, World\n"], [Greetings string.]) AC_LANG_CONFTEST( @@ -6807,7 +6807,7 @@ For instance: @example -AC_INIT(Autoconf Documentation, @value{VERSION}, bug-autoconf@@gnu.org) +AC_INIT([Autoconf Documentation], address@hidden, [bug-autoconf@@gnu.org]) AC_DEFINE([HELLO_WORLD], ["Hello, World\n"], [Greetings string.]) AC_LANG_CONFTEST( @@ -6900,7 +6900,7 @@ For instance: @example -AC_INIT(Autoconf Documentation, @value{VERSION}, bug-autoconf@@gnu.org) +AC_INIT([Autoconf Documentation], address@hidden, [bug-autoconf@@gnu.org]) AC_DEFINE([HELLO_WORLD], ["Hello, World\n"], [Greetings string.]) AC_PREPROC_IFELSE( @@ -7159,20 +7159,20 @@ # The order of these tests is important. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]])], - [AC_DEFINE(FSTYPE_STATVFS, 1, + [AC_DEFINE([FSTYPE_STATVFS], [1], [Define if statvfs exists.]) fstype=SVR4]) if test $fstype = no; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]])], - [AC_DEFINE(FSTYPE_USG_STATFS, 1, + [AC_DEFINE([FSTYPE_USG_STATFS], [1], [Define if USG statfs.]) fstype=SVR3]) fi if test $fstype = no; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include ]])]), - [AC_DEFINE(FSTYPE_AIX_STATFS, 1, + [AC_DEFINE([FSTYPE_AIX_STATFS], [1], [Define if AIX statfs.]) fstype=AIX]) fi @@ -7215,10 +7215,10 @@ appropriate cache variable, as in this example: @example -AC_CHECK_FUNC(vprintf, [AC_DEFINE(HAVE_VPRINTF, 1, +AC_CHECK_FUNC([vprintf], [AC_DEFINE([HAVE_VPRINTF], [1], [Define if vprintf exists.])]) if test "$ac_cv_func_vprintf" != yes; then - AC_CHECK_FUNC(_doprnt, [AC_DEFINE(HAVE_DOPRNT, 1, + AC_CHECK_FUNC([_doprnt], [AC_DEFINE([HAVE_DOPRNT], [1], [Define if _doprnt exists.])]) fi @end example @@ -7244,7 +7244,7 @@ @code{EQUATION} to be the string constant @samp{"$a > $b"}: @example -AC_DEFINE(EQUATION, "$a > $b", +AC_DEFINE([EQUATION], ["$a > $b"], [Equation string.]) @end example @@ -7265,11 +7265,11 @@ @var{variable} or @var{value} is a shell variable. Examples: @example -AC_DEFINE_UNQUOTED(config_machfile, "$machfile", +AC_DEFINE_UNQUOTED([config_machfile], ["$machfile"], [Configuration machine file.]) -AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups, +AC_DEFINE_UNQUOTED([GETGROUPS_T], [$ac_cv_type_getgroups], [getgroups return type.]) -AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, +AC_DEFINE_UNQUOTED([$ac_tr_hdr], [1], [Translated header name.]) @end example @end defmac @@ -7281,16 +7281,16 @@ newlines. That is, do this: @example -AC_CHECK_HEADER(elf.h, - [AC_DEFINE(SVR4, 1, [System V Release 4]) LIBS="$LIBS -lelf"]) +AC_CHECK_HEADER([elf.h], + [AC_DEFINE([SVR4], [1], [System V Release 4]) LIBS="$LIBS -lelf"]) @end example @noindent or this: @example -AC_CHECK_HEADER(elf.h, - [AC_DEFINE(SVR4, 1, [System V Release 4]) +AC_CHECK_HEADER([elf.h], + [AC_DEFINE([SVR4], [1], [System V Release 4]) LIBS="$LIBS -lelf"]) @end example @@ -7298,8 +7298,8 @@ instead of this: @example -AC_CHECK_HEADER(elf.h, - [AC_DEFINE(SVR4, 1, [System V Release 4]); LIBS="$LIBS -lelf"]) +AC_CHECK_HEADER([elf.h], + [AC_DEFINE([SVR4], [1], [System V Release 4]); LIBS="$LIBS -lelf"]) @end example @node Setting Output Variables @@ -7489,7 +7489,7 @@ [ac_cv_shell_true_works=no true && ac_cv_shell_true_works=yes if test $ac_cv_shell_true_works = yes; then - AC_DEFINE([TRUE_WORKS], 1 + AC_DEFINE([TRUE_WORKS], [1], [Define if `true(1)' works properly.]) fi]) ]) @@ -7508,7 +7508,7 @@ [ac_cv_shell_true_works=no true && ac_cv_shell_true_works=yes]) if test $ac_cv_shell_true_works = yes; then - AC_DEFINE([TRUE_WORKS], 1 + AC_DEFINE([TRUE_WORKS], [1], [Define if `true(1)' works properly.]) fi ]) @@ -7648,8 +7648,8 @@ @group # Checks for libraries. -AC_CHECK_LIB(nsl, gethostbyname) -AC_CHECK_LIB(socket, connect) +AC_CHECK_LIB([nsl], [gethostbyname]) +AC_CHECK_LIB([socket], [connect]) @r{ @dots{} more lib checks @dots{}} AC_CACHE_SAVE @end group @@ -9041,7 +9041,7 @@ # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1]) # -------------------------------------- m4_define([AC_MSG_ERROR], address@hidden _AC_ECHO([configure: error: $1], 2); exit m4_default([$2], 1); @}]) address@hidden _AC_ECHO([configure: error: $1], [2]); exit m4_default([$2], [1]); @}]) @end example Comments about the macro should be left in the header comment. Most @@ -13189,7 +13190,7 @@ i?86-*-*) CYCLE_OBJ=rdtsc.o ;; *) CYCLE_OBJ= ;; esac -AC_SUBST(CYCLE_OBJ) +AC_SUBST([CYCLE_OBJ]) @end example @code{AC_CONFIG_LINKS} (@pxref{Configuration Links}) is another good way @@ -13199,9 +13200,9 @@ @example case $host in - alpha*-*-*) AC_CONFIG_LINKS(dither.c:alpha/dither.c) ;; - powerpc*-*-*) AC_CONFIG_LINKS(dither.c:powerpc/dither.c) ;; - *-*-*) AC_CONFIG_LINKS(dither.c:generic/dither.c) ;; + alpha*-*-*) AC_CONFIG_LINKS([dither.c:alpha/dither.c]) ;; + powerpc*-*-*) AC_CONFIG_LINKS([dither.c:powerpc/dither.c]) ;; + *-*-*) AC_CONFIG_LINKS([dither.c:generic/dither.c]) ;; esac @end example @@ -13515,8 +13522,8 @@ Options}). The following example will make this clearer. @example -AC_ARG_WITH(foo, - [AS_HELP_STRING(--with-foo, +AC_ARG_WITH([foo], + [AS_HELP_STRING([--with-foo], [use foo (default is no)])], [ac_cv_use_foo=$withval], [ac_cv_use_foo=no]) @@ -14507,8 +14514,8 @@ is: @example -AC_CONFIG_LINKS(host.h:config/$machine.h - object.h:config/$obj_format.h) +AC_CONFIG_LINKS([host.h:config/$machine.h + object.h:config/$obj_format.h]) @end example @end defmac @@ -15105,11 +15112,11 @@ Here is a way to write it for version 2: @example -AC_CHECK_FUNCS(syslog) +AC_CHECK_FUNCS([syslog]) if test $ac_cv_func_syslog = no; then # syslog is not in the default libraries. See if it's in some other. for lib in bsd socket inet; do - AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG) + AC_CHECK_LIB([$lib], [syslog], [AC_DEFINE([HAVE_SYSLOG]) LIBS="$LIBS -l$lib"; break]) done fi @@ -15475,7 +15482,7 @@ # the ANSI2KNR-filtering rules. LIBOBJS=`echo "$LIBOBJS" | sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/\.lo/g'` -AC_SUBST(LTLIBOBJS) +AC_SUBST([LTLIBOBJS]) @end example @noindent @@ -15493,7 +15500,7 @@ sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` LTLIBOBJS=`echo "$LIB@@&t@@OBJS" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` -AC_SUBST(LTLIBOBJS) +AC_SUBST([LTLIBOBJS]) @end example @sp 1 @@ -16464,7 +16471,7 @@ const number pi = 3; $ @kbd{cat configure.ac} AC_INIT -AC_CHECK_HEADERS(pi.h) +AC_CHECK_HEADERS([pi.h]) $ @kbd{autoconf -Wall} $ @kbd{./configure} checking for gcc... gcc