mirror of
git://git.sv.gnu.org/autoconf
synced 2025-01-06 10:25:53 +08:00
* NEWS: Use "M4" rather than "m4" when appropriate.
Problem reported by Eric Blake. * doc/autoconf.texi: Likewise. Use @acronym around BSD, GCC, and GNU when appropriate. (Why GNU M4): Renamed from "Why GNU m4". (Redefined M4 Macros): Mention that Posix m4wrap takes only 1 argument, but GNU M4 1.4.x takes more. (Buffer Overruns): Mention size_t and ptrdiff_t as alternatives to int.
This commit is contained in:
parent
472aafe0f5
commit
d88b0fa532
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
||||
2006-06-20 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* NEWS: Use "M4" rather than "m4" when appropriate.
|
||||
Problem reported by Eric Blake.
|
||||
* doc/autoconf.texi: Likewise.
|
||||
Use @acronym around BSD, GCC, and GNU when appropriate.
|
||||
(Why GNU M4): Renamed from "Why GNU m4".
|
||||
(Redefined M4 Macros): Mention that Posix
|
||||
m4wrap takes only 1 argument, but GNU M4 1.4.x takes more.
|
||||
(Buffer Overruns): Mention size_t and ptrdiff_t as alternatives
|
||||
to int.
|
||||
|
||||
2006-06-20 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* bin/autom4te.in (handle_output): Do not forbid the empty
|
||||
|
18
NEWS
18
NEWS
@ -1,7 +1,7 @@
|
||||
* Major changes in Autoconf 2.59e
|
||||
|
||||
** Autoconf no longer depends on whether m4wrap is FIFO (as Posix requires)
|
||||
or LIFO (as in GNU m4 1.4.x). GNU m4 2.0 is expected to conform to Posix
|
||||
or LIFO (as in GNU M4 1.4.x). GNU M4 2.0 is expected to conform to Posix
|
||||
here, so m4wrap/m4_wrap users should no longer depend on LIFO behavior.
|
||||
|
||||
* Major changes in Autoconf 2.59d
|
||||
@ -257,7 +257,7 @@
|
||||
especially useful for initial "bootstrapping" of fresh CVS checkouts.
|
||||
|
||||
** AC_CONFIG_MACRO_DIR
|
||||
Use this macro to declare the directory for local m4 macros for aclocal.
|
||||
Use this macro to declare the directory for local M4 macros for aclocal.
|
||||
|
||||
** AC_LIBOBJS
|
||||
No longer includes twice the same file in LIBOBJS if invoked
|
||||
@ -325,7 +325,7 @@
|
||||
Released 2002-12-03 by Paul Eggert.
|
||||
|
||||
Bug fixes for problems with AIX linker, with freestanding C compilers,
|
||||
with GNU m4 limitations, and with obsolete copies of GNU documents.
|
||||
with GNU M4 limitations, and with obsolete copies of GNU documents.
|
||||
|
||||
The Free Documentation License has been upgraded from 1.1 to 1.2.
|
||||
|
||||
@ -767,7 +767,7 @@ In particular, portability issues are better covered.
|
||||
|
||||
** Use of Automake
|
||||
All the standard GNU Makefile targets are supported. The layout has
|
||||
changed: m4/ holds the m4 extensions Autoconf needs for its
|
||||
changed: m4/ holds the M4 extensions Autoconf needs for its
|
||||
configuration, doc/ contains the documentation, and tests/ contains
|
||||
the test suite.
|
||||
|
||||
@ -1146,9 +1146,9 @@ Library, need major changes because they relied on undocumented
|
||||
internals of version 1. Future releases of those packages will have
|
||||
updated configure.in files.
|
||||
|
||||
It's best to use GNU m4 1.3 (or later) with Autoconf version 2.
|
||||
Autoconf now makes heavy use of m4 diversions, which were implemented
|
||||
inefficiently in GNU m4 releases before 1.3.
|
||||
It's best to use GNU M4 1.3 (or later) with Autoconf version 2.
|
||||
Autoconf now makes heavy use of M4 diversions, which were implemented
|
||||
inefficiently in GNU M4 releases before 1.3.
|
||||
|
||||
Major changes in Autoconf 2.0:
|
||||
|
||||
@ -1349,7 +1349,7 @@ Major changes in Autoconf 1.4:
|
||||
* New macros AC_HAVE_POUNDBANG, AC_TIME_WITH_SYS_TIME, AC_LONG_DOUBLE,
|
||||
AC_GETGROUPS_T, AC_DEFINE_UNQUOTED.
|
||||
* autoconf and autoheader use the M4 environment variable to determine the
|
||||
name of the m4 program to use.
|
||||
name of the M4 program to use.
|
||||
* The --macrodir option to autoconf and autoheader specifies the directory
|
||||
in which acspecific.m4, acgeneral.m4, etc. reside if not the default.
|
||||
* autoconf and autoheader can take `-' as their file names, which means to
|
||||
@ -1361,7 +1361,7 @@ Major changes in Autoconf 1.4:
|
||||
expansion done by the shell. If you don't want this, use
|
||||
AC_DEFINE_UNQUOTED instead.
|
||||
* Much textual processing done with external calls to tr and sed have been
|
||||
internalized with builtin m4 `patsubst' and `translit' calls.
|
||||
internalized with builtin M4 `patsubst' and `translit' calls.
|
||||
* AC_OUTPUT doesn't hardwire the file names it outputs. Instead, you can
|
||||
set the shell variables `gen_files' and `gen_config' to the list of
|
||||
file names to output.
|
||||
|
@ -589,7 +589,7 @@ Using an Autotest Test Suite
|
||||
Frequent Autoconf Questions, with answers
|
||||
|
||||
* Distributing:: Distributing @command{configure} scripts
|
||||
* Why GNU m4:: Why not use the standard M4?
|
||||
* Why GNU M4:: Why not use the standard M4?
|
||||
* Bootstrapping:: Autoconf and @acronym{GNU} M4 require each other?
|
||||
* Why Not Imake:: Why @acronym{GNU} uses @command{configure} instead of Imake
|
||||
* Defining Directories:: Passing @code{datadir} to program
|
||||
@ -733,7 +733,7 @@ Peter Simons}.
|
||||
|
||||
@node The GNU Build System
|
||||
@chapter The @acronym{GNU} Build System
|
||||
@cindex GNU build system
|
||||
@cindex @acronym{GNU} build system
|
||||
|
||||
Autoconf solves an important problem---reliable discovery of
|
||||
system-specific build and runtime information---but this is only one
|
||||
@ -1552,8 +1552,8 @@ Gettext supplies the @command{autopoint} command to add translation
|
||||
infrastructure to a source package. If you use @command{autopoint},
|
||||
your @file{configure.ac} should invoke both @code{AM_GNU_GETTEXT} and
|
||||
@code{AM_GNU_GETTEXT_VERSION(@var{gettext-version})}. @xref{autopoint
|
||||
Invocation, , Invoking the @code{autopoint} Program, gettext, GNU
|
||||
@code{gettext} utilities}, for further details.
|
||||
Invocation, , Invoking the @code{autopoint} Program, gettext,
|
||||
@acronym{GNU} @code{gettext} utilities}, for further details.
|
||||
|
||||
@noindent
|
||||
@command{autoreconf} accepts the following options:
|
||||
@ -2487,7 +2487,7 @@ The top-level directory for installing documentation in man format.
|
||||
|
||||
@defvar oldincludedir
|
||||
@ovindex oldincludedir
|
||||
The directory for installing C header files for non-GCC compilers.
|
||||
The directory for installing C header files for non-@acronym{GCC} compilers.
|
||||
@end defvar
|
||||
|
||||
@defvar pdfdir
|
||||
@ -4101,8 +4101,8 @@ longer need to be worried about.
|
||||
On various old systems, e.g., HP-UX 9, @code{sscanf} requires that its
|
||||
input string be writable (though it doesn't actually change it). This
|
||||
can be a problem when using @command{gcc} since it normally puts
|
||||
constant strings in read-only memory
|
||||
(@pxref{Incompatibilities, Incompatibilities of GCC, , gcc, Using and
|
||||
constant strings in read-only memory (@pxref{Incompatibilities,
|
||||
Incompatibilities of @acronym{GCC}, , gcc, Using and
|
||||
Porting the @acronym{GNU} Compiler Collection}). Apparently in some cases even
|
||||
having format strings read-only can be a problem.
|
||||
|
||||
@ -4950,7 +4950,8 @@ additions. Please help us keeping it as complete as possible.
|
||||
@item @file{limits.h}
|
||||
C99 says that @file{limits.h} defines @code{LLONG_MIN},
|
||||
@code{LLONG_MAX}, and @code{ULLONG_MAX}, but many almost-C99
|
||||
environments (e.g., default GCC 4.0.2 + glibc 2.4) do not define them.
|
||||
environments (e.g., default @acronym{GCC} 4.0.2 + glibc 2.4) do not
|
||||
define them.
|
||||
|
||||
@item @file{inttypes.h} vs.@: @file{stdint.h}
|
||||
@hdrindex{inttypes.h}
|
||||
@ -5538,7 +5539,7 @@ For each of the @var{symbols} (@emph{comma}-separated list), define
|
||||
execute when one of the function declarations is needed, otherwise
|
||||
@var{action-if-found} is executed.
|
||||
|
||||
This macro uses an m4 list as first argument:
|
||||
This macro uses an M4 list as first argument:
|
||||
@example
|
||||
AC_CHECK_DECLS([strdup])
|
||||
AC_CHECK_DECLS([strlen])
|
||||
@ -5730,7 +5731,7 @@ capitals, with spaces and dots replaced by underscores). If
|
||||
members. If @var{action-if-not-found} is given, it is executed for each
|
||||
of the members that could not be found.
|
||||
|
||||
This macro uses m4 lists:
|
||||
This macro uses M4 lists:
|
||||
@example
|
||||
AC_CHECK_MEMBERS([struct stat.st_rdev, struct stat.st_blksize])
|
||||
@end example
|
||||
@ -5999,7 +6000,7 @@ specified, the default includes are used (@pxref{Default Includes}). If
|
||||
when one of the types is found. If @var{action-if-not-found} is given,
|
||||
it is executed when one of the types is not found.
|
||||
|
||||
This macro uses m4 lists:
|
||||
This macro uses M4 lists:
|
||||
@example
|
||||
AC_CHECK_TYPES([ptrdiff_t])
|
||||
AC_CHECK_TYPES([unsigned long long int, uintmax_t])
|
||||
@ -6118,7 +6119,8 @@ Normally Autoconf ignores warnings generated by the compiler, linker, and
|
||||
preprocessor. If this macro is used, warnings count as fatal
|
||||
errors for the current language. This macro is useful when the
|
||||
results of configuration are used where warnings are unacceptable; for
|
||||
instance, if parts of a program are built with the GCC @option{-Werror}
|
||||
instance, if parts of a program are built with the @acronym{GCC}
|
||||
@option{-Werror}
|
||||
option. If the whole program is built using @option{-Werror} it is
|
||||
often simpler to put @option{-Werror} in the compiler flags (@code{CFLAGS},
|
||||
etc.).
|
||||
@ -6223,7 +6225,8 @@ variable
|
||||
If using the @acronym{GNU} C compiler, set shell variable @code{GCC} to
|
||||
@samp{yes}. If output variable @code{CFLAGS} was not already set, set
|
||||
it to @option{-g -O2} for the @acronym{GNU} C compiler (@option{-O2} on systems
|
||||
where GCC does not accept @option{-g}), or @option{-g} for other compilers.
|
||||
where @acronym{GCC} does not accept @option{-g}), or @option{-g} for
|
||||
other compilers.
|
||||
@end defmac
|
||||
|
||||
@defmac AC_PROG_CC_C_O
|
||||
@ -6369,7 +6372,7 @@ If @command{autoconf} detects this situation, it leaves @code{const} alone,
|
||||
as this generally yields better results in practice. However, using a
|
||||
C++ compiler to compile C code is not recommended or supported, and
|
||||
installers who run into trouble in this area should get a C compiler
|
||||
like GCC to compile their C code.
|
||||
like @acronym{GCC} to compile their C code.
|
||||
|
||||
This macro is obsolescent, as current C compilers support @code{const}.
|
||||
New programs need not use this macro.
|
||||
@ -6450,7 +6453,8 @@ stringizing operator. New programs need not use this macro.
|
||||
@acindex{C_TYPEOF}
|
||||
@cvindex HAVE_TYPEOF
|
||||
@cvindex typeof
|
||||
If the C compiler supports GCC's @code{typeof} syntax either directly or
|
||||
If the C compiler supports @acronym{GCC}'s @code{typeof} syntax either
|
||||
directly or
|
||||
through a different spelling of the keyword (e.g., @code{__typeof__}),
|
||||
define @code{HAVE_TYPEOF}. If the support is available only through a
|
||||
different spelling, define @code{typeof} to that spelling.
|
||||
@ -7472,12 +7476,14 @@ If a test program calls a function with invalid parameters (just to see
|
||||
whether it exists), organize the program to ensure that it never invokes
|
||||
that function. You can do this by calling it in another function that is
|
||||
never invoked. You can't do it by putting it after a call to
|
||||
@code{exit}, because GCC version 2 knows that @code{exit} never returns
|
||||
@code{exit}, because @acronym{GCC} version 2 knows that @code{exit}
|
||||
never returns
|
||||
and optimizes out any code that follows it in the same block.
|
||||
|
||||
If you include any header files, be sure to call the functions
|
||||
relevant to them with the correct number of arguments, even if they are
|
||||
just 0, to avoid compilation errors due to prototypes. GCC version 2
|
||||
just 0, to avoid compilation errors due to prototypes. @acronym{GCC}
|
||||
version 2
|
||||
has internal prototypes for several functions that it automatically
|
||||
inlines; for example, @code{memcpy}. To avoid errors when checking for
|
||||
them, either pass them the correct number of arguments or redeclare them
|
||||
@ -9158,7 +9164,7 @@ overquoting in @code{AC_DEFINE} descriptions.
|
||||
|
||||
The Autoconf suite, including M4sugar, M4sh, and Autotest, in addition
|
||||
to Autoconf per se, heavily rely on M4. All these different uses
|
||||
revealed common needs factored into a layer over @command{m4}:
|
||||
revealed common needs factored into a layer over M4:
|
||||
@command{autom4te}@footnote{
|
||||
@c
|
||||
Yet another great name from Lars J. Aas.
|
||||
@ -9185,7 +9191,8 @@ autom4te @var{options} @var{files}
|
||||
@noindent
|
||||
@evindex M4
|
||||
where the @var{files} are directly passed to @command{m4}. By default,
|
||||
@acronym{GNU} m4 is found during configure, but the environment variable
|
||||
@acronym{GNU} M4 is found during configuration, but the environment
|
||||
variable
|
||||
@env{M4} can be set to tell @command{autom4te} where to look. In addition
|
||||
to the regular expansion, it handles the replacement of the quadrigraphs
|
||||
(@pxref{Quadrigraphs}), and of @samp{__oline__}, the current line in the
|
||||
@ -9346,8 +9353,8 @@ output and traces at the same time. Traces are heavily used in the
|
||||
@acronym{GNU} Build System: @command{autoheader} uses them to build
|
||||
@file{config.h.in}, @command{autoreconf} to determine what
|
||||
@acronym{GNU} Build System components are used, @command{automake} to
|
||||
``parse'' @file{configure.ac} etc. To save the long runs of
|
||||
@command{m4}, traces are cached while performing regular expansion,
|
||||
``parse'' @file{configure.ac} etc. To avoid recomputation,
|
||||
traces are cached while performing regular expansion,
|
||||
and conversely. This cache is (actually, the caches are) stored in
|
||||
the directory @file{autom4te.cache}. @emph{It can safely be removed}
|
||||
at any moment (especially if for some reason @command{autom4te}
|
||||
@ -9645,6 +9652,11 @@ reprocessed at @acronym{EOF} in the same order as the original calls.
|
||||
@acronym{GNU} M4 versions through 1.4.x, however, reprocess them in
|
||||
reverse order. Your code should not depend on the order.
|
||||
|
||||
Also, Posix requires @code{m4wrap} to ignore its second and succeeding
|
||||
arguments, but @acronym{GNU} M4 versions through 1.4.x concatenate the
|
||||
arguments with intervening spaces. Your code should not pass more than
|
||||
one argument.
|
||||
|
||||
You are encouraged to end @var{text} with @samp{[]}, to avoid unexpected
|
||||
token pasting between consecutive invocations of @code{m4_wrap}, as in:
|
||||
|
||||
@ -9689,7 +9701,7 @@ order.
|
||||
|
||||
@defmac m4_foreach (@var{var}, @var{list}, @var{expression})
|
||||
@msindex{foreach}
|
||||
Loop over the comma-separated m4 list @var{list}, assigning each value
|
||||
Loop over the comma-separated M4 list @var{list}, assigning each value
|
||||
to @var{var}, and expand @var{expression}. The following example
|
||||
outputs two lines:
|
||||
|
||||
@ -10069,7 +10081,7 @@ AC_DEFUN(@var{macro-name}, @var{macro-body})
|
||||
|
||||
You can refer to any arguments passed to the macro as @samp{$1},
|
||||
@samp{$2}, etc. @xref{Definitions, , How to define new macros, m4.info,
|
||||
@acronym{GNU} m4}, for more complete information on writing M4 macros.
|
||||
@acronym{GNU} M4}, for more complete information on writing M4 macros.
|
||||
|
||||
Be sure to properly quote both the @var{macro-body} @emph{and} the
|
||||
@var{macro-name} to avoid any problems if the macro happens to have
|
||||
@ -13392,7 +13404,7 @@ In Mac OS X 10.3, @command{od} does not support the
|
||||
standard Posix options @option{-A}, @option{-j}, @option{-N}, or
|
||||
@option{-t}, or the @acronym{XSI} option @option{-s}. The only
|
||||
supported Posix option is @option{-v}, and the only supported
|
||||
@acronym{XSI} options are those in @option{-bcdox}. The BSD
|
||||
@acronym{XSI} options are those in @option{-bcdox}. The @acronym{BSD}
|
||||
@command{hexdump} program can be used instead.
|
||||
|
||||
This problem no longer exists in Mac OS X 10.4.3.
|
||||
@ -13669,10 +13681,10 @@ remove @file{U} with Posix make, but incompatible
|
||||
@command{touch} fails. One way to work around this is to reword the
|
||||
affected simple-commands so that they always succeed, e.g., @samp{touch
|
||||
T || :; rm -f U}.
|
||||
However, even this approach can run into common bugs in BSD
|
||||
However, even this approach can run into common bugs in @acronym{BSD}
|
||||
implementations of the @option{-e} option of @command{sh} and
|
||||
@command{set} (@pxref{Limitations of Builtins}), so if you are worried
|
||||
about porting to buggy BSD shells it may be simpler to migrate
|
||||
about porting to buggy @acronym{BSD} shells it may be simpler to migrate
|
||||
complicated @command{make} actions into separate scripts.
|
||||
|
||||
@node Special Chars in Names
|
||||
@ -14554,8 +14566,9 @@ platforms.
|
||||
Several standards have been developed to help make your programs more
|
||||
portable. If you write programs with these standards in mind, you can
|
||||
have greater confidence that your programs work on a wide variety
|
||||
of systems. @xref{Standards, , Language Standards Supported by GCC,
|
||||
gcc, Using the GNU Compiler Collection (GCC)}, for a list of C-related
|
||||
of systems. @xref{Standards, , Language Standards Supported by
|
||||
@acronym{GCC}, gcc, Using the @acronym{GNU} Compiler Collection
|
||||
(@acronym{GCC})}, for a list of C-related
|
||||
standards. Many programs also assume the
|
||||
@uref{http://www.opengroup.org/susv3, Posix standard}.
|
||||
|
||||
@ -14634,7 +14647,7 @@ of these two values typically yields the same signal on these CPUs,
|
||||
even though the C standard requires @code{INT_MIN % -1} to yield zero
|
||||
because the expression does not overflow.
|
||||
|
||||
GCC users might consider using the
|
||||
@acronym{GCC} users might consider using the
|
||||
@option{-ftrapv} option if they are worried about porting their code to
|
||||
the rare platforms where signed integer overflow does not wrap around
|
||||
after addition, subtraction, or multiplication.
|
||||
@ -14678,7 +14691,8 @@ reliable in general, and it is usually easy enough to avoid the
|
||||
potential portability problem, e.g., by allocating an extra unused array
|
||||
element at the start or end.
|
||||
|
||||
@uref{http://valgrind.org/, Valgrind} can catch many overruns. GCC
|
||||
@uref{http://valgrind.org/, Valgrind} can catch many overruns.
|
||||
@acronym{GCC}
|
||||
users might also consider using the @option{-fmudflap} option to catch
|
||||
overruns.
|
||||
|
||||
@ -14687,7 +14701,9 @@ more subtle ways to get them.
|
||||
|
||||
Using @code{int} values to index into an array or compute array sizes
|
||||
causes problems on typical 64-bit hosts where an array index might
|
||||
be @math{2^31} or larger.
|
||||
be @math{2^31} or larger. Index values of type @code{size_t} avoid this
|
||||
problem, but cannot be negative. Index values of type @code{ptrdiff_t}
|
||||
are signed, and are wide enough in practice.
|
||||
|
||||
If you add or multiply two numbers to calculate an array size, e.g.,
|
||||
@code{malloc (x * sizeof y + z)}, havoc ensues if the addition or
|
||||
@ -14704,7 +14720,8 @@ portable code should not use them unless the inputs are known to be
|
||||
within certain limits. The time-related functions can overflow their
|
||||
buffers if given timestamps out of range (e.g., a year less than -999
|
||||
or greater than 9999). Time-related buffer overflows cannot happen with
|
||||
recent-enough versions of the GNU C library, but are possible with other
|
||||
recent-enough versions of the @acronym{GNU} C library, but are possible
|
||||
with other
|
||||
implementations. The @code{gets} function is the worst, since it almost
|
||||
invariably overflows its buffer when presented with an input line larger
|
||||
than the buffer.
|
||||
@ -17976,7 +17993,7 @@ are addressed.
|
||||
|
||||
@menu
|
||||
* Distributing:: Distributing @command{configure} scripts
|
||||
* Why GNU m4:: Why not use the standard M4?
|
||||
* Why GNU M4:: Why not use the standard M4?
|
||||
* Bootstrapping:: Autoconf and @acronym{GNU} M4 require each other?
|
||||
* Why Not Imake:: Why @acronym{GNU} uses @command{configure} instead of Imake
|
||||
* Defining Directories:: Passing @code{datadir} to program
|
||||
@ -18008,7 +18025,7 @@ exception to the @acronym{GPL} when they are used with an Autoconf-generated
|
||||
same terms as the rest of your package. @file{install-sh} is from the X
|
||||
Consortium and is not copyrighted.
|
||||
|
||||
@node Why GNU m4
|
||||
@node Why GNU M4
|
||||
@section Why Require @acronym{GNU} M4?
|
||||
|
||||
@display
|
||||
|
Loading…
Reference in New Issue
Block a user