various little cleanups

This commit is contained in:
David MacKenzie 1994-09-27 22:05:22 +00:00
parent 265bbc6855
commit 7185c6faea
18 changed files with 242 additions and 277 deletions

View File

@ -74,29 +74,16 @@ editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
all: ${PROGS}
autoconf: autoconf.sh
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
.SUFFIXES:
.SUFFIXES: .sh .pl
autoheader: autoheader.sh
.sh:
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoheader.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
$(editsh) $< > $@.tmp && mv $@.tmp $@ && chmod +x $@
autoreconf: autoreconf.sh
.pl:
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoreconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
autoupdate: autoupdate.sh
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoupdate.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
ifnames: ifnames.sh
rm -f $@ $@.tmp
$(editsh) $(srcdir)/ifnames.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
autoscan: autoscan.pl
rm -f $@ $@.tmp
$(editpl) $(srcdir)/autoscan.pl > $@.tmp && mv $@.tmp $@ && chmod +x $@
$(editpl) $< > $@.tmp && mv $@.tmp $@ && chmod +x $@
info: autoconf.info @standards_info@ INSTALL

43
NEWS
View File

@ -16,6 +16,29 @@ inefficiently in GNU m4 releases before 1.3.
Major changes in release 2.0:
** New copyright terms:
* There are no restrictions on distribution or use of configure scripts.
** Documentation:
* Autoconf manual is reorganized to make information easier to find
and has several new indexes.
* INSTALL is reorganized and clearer and is now made from Texinfo source.
** New utilities:
* autoscan to generate a preliminary configure.in for a package by
scanning its source code for commonly used nonportable functions,
programs, and header files.
* autoupdate to update a configure.in to use the new macro names.
* ifnames to list the symbols used in #if and #ifdef directives in a
source tree.
* autoreconf to recursively remake configure and configuration header
files in a source tree.
** Changed utilities:
* autoheader can take pieces of acconfig.h to replace config.h.{top,bot}.
* autoconf and autoheader can look for package-local definition files
in an alternate directory.
** New macros:
* AC_CACHE_VAL to share results of tests between configure runs.
* AC_DEFUN to define macros, automatically AC_PROVIDE them, and ensure
@ -81,26 +104,6 @@ Major changes in release 2.0:
* New files autoconf.m4 and autoheader.m4 load the other Autoconf macros.
* acsite.m4 is the new name for the system-wide aclocal.m4.
* Has the beginnings of a DejaGnu test suite.
** New utilities:
* autoscan to generate a preliminary configure.in for a package by
scanning its source code for commonly used nonportable functions,
programs, and header files.
* autoupdate to update a configure.in to use the new macro names.
* ifnames to list the symbols used in #if and #ifdef directives in a
source tree.
* autoreconf to recursively remake configure and configuration header
files in a source tree.
** Changed utilities:
* autoheader can take pieces of acconfig.h to replace config.h.{top,bot}.
* autoconf and autoheader can look for package-local definition files
in an alternate directory.
** Documentation:
* Autoconf manual is reorganized to make information easier to find
and has several new indexes.
* INSTALL is reorganized and clearer and is now made from Texinfo source.
Major changes in release 1.11:

9
TODO
View File

@ -31,6 +31,15 @@ Things it might be nice to do someday:
------------------------------------------------------------------------------
* Doc: Discuss what Autoconf doesn't do: Makefile rules and
boilerplate, providing replacement C headers and library functions
(a consistent ANSI C/POSIX.1 environment). Lessons learned.
Advantages to not requiring special external libraries or config
files or programs.
Mention site files in install.texi.
------------------------------------------------------------------------------
* Make autoconf diagnose giving too few or too many arguments to macros.
------------------------------------------------------------------------------

View File

@ -53,12 +53,12 @@
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
/* Define if you have <dirent.h>. */
#undef HAVE_DIRENT_H
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
@ -77,12 +77,6 @@
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you don't have <dirent.h>, but have <ndir.h>. */
#undef HAVE_NDIR_H
/* Define if you have <netdb.h> (and thus the rexec function). */
#undef HAVE_NETDB_H
/* Define if system calls automatically restart after interruption
by a signal. */
#undef HAVE_RESTARTABLE_SYSCALLS
@ -102,18 +96,6 @@
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
/* Define if you don't have <dirent.h>, but have <sys/dir.h>. */
#undef HAVE_SYS_DIR_H
/* Define if you have <sys/mtio.h>. */
#undef HAVE_SYS_MTIO_H
/* Define if you don't have <dirent.h>, but have <sys/ndir.h>. */
#undef HAVE_SYS_NDIR_H
/* Define if you have a <sys/wait.h> with `union wait'. */
#undef HAVE_SYS_WAIT
/* Define if your struct tm has tm_zone. */
#undef HAVE_TM_ZONE
@ -136,9 +118,6 @@
/* Define if you have the wait3 system call. */
#undef HAVE_WAIT3
/* Define if you have the POSIX.1 `waitpid' function. */
#undef HAVE_WAITPID
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
@ -176,9 +155,6 @@
/* Define if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define if you have neither a remote shell nor the rexec function. */
#undef NO_REMOTE
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t

View File

@ -3,7 +3,7 @@ dnl Requires GNU m4.
dnl This file is part of Autoconf.
dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
@ -17,6 +17,10 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl As a special exception, if you use parts of this file in a
dnl configure script, doing so does not cause the resulting script to
dnl be covered by the GNU General Public License.
dnl
dnl Written by David MacKenzie, with help from
dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
dnl Roland McGrath, Noah Friedman, and david d zuhn.
@ -116,24 +120,10 @@ dnl AC_INIT_NOTICE()
AC_DEFUN(AC_INIT_NOTICE,
[# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version] AC_ACVERSION [
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this script; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# The redistribution and modification terms for this script do not affect
# the terms for software that it configures.
# This configure script is free software; there are no restrictions on how you
# can redistribute it and/or modify it.
ac_help=])

View File

@ -2,7 +2,7 @@ dnl Macros that test for specific features.
dnl This file is part of Autoconf.
dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
@ -16,6 +16,10 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl As a special exception, if you use parts of this file in a
dnl configure script, doing so does not cause the resulting script to
dnl be covered by the GNU General Public License.
dnl
dnl Written by David MacKenzie, with help from
dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
dnl Roland McGrath, and Noah Friedman.
@ -258,7 +262,7 @@ if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
[AC_LANG_SAVE[]dnl
AC_LANG_CPLUSPLUS[]dnl
CXXCPP="${CXX-c++} -E"
CXXCPP="${CXX-gcc} -E"
AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
ac_cv_prog_CXXCPP="$CXXCPP"
AC_LANG_RESTORE[]dnl
@ -393,7 +397,7 @@ fi
AC_SUBST(LN_S)dnl
])
AC_DEFUN(AC_RSH,
define(AC_RSH,
[errprint(__file__:__line__: [$0] has been removed; replace it with equivalent code
)m4exit(4)])
@ -482,12 +486,12 @@ AC_DEFUN(AC_HEADER_DIRENT,
[ac_header_dirent=no
AC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h,
[ac_header_dirent=$ac_hdr; break])
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix,
# and -lx contains other useful things as well. (FIXME what are they?)
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
else
AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
fi
AC_CHECK_LIB(x, main, LIBS="$LIBS -lx")
])
dnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
@ -1067,7 +1071,8 @@ AC_CHECK_LIB(elf, elf_read,
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(inq_stats/cpustats.h,
[ac_have_func=yes AC_DEFINE(UMAX4_3) AC_DEFINE(UMAX)])
[ac_have_func=yes AC_DEFINE(UMAX4_3)
AC_DEFINE(UMAX)])
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(sys/cpustats.h,
@ -1472,7 +1477,7 @@ if test $ac_cv_c_const = no; then
fi
])
AC_DEFUN(AC_ARG_ARRAY,
define(AC_ARG_ARRAY,
[errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments
)m4exit(4)])
@ -1499,7 +1504,7 @@ rm -f conftest])dnl
AC_MSG_RESULT($ac_cv_sys_interpreter)
])
AC_DEFUN(AC_HAVE_POUNDBANG,
define(AC_HAVE_POUNDBANG,
[errprint(__file__:__line__: [$0 has been replaced by AC_SYS_INTERPRETER, taking no arguments
])m4exit(4)])

View File

@ -242,12 +242,14 @@ Running @code{configure} Scripts
* Compilers and Options:: Selecting compilers and optimization.
* Build Directory:: Configuring in a different directory.
* Installation Names:: Installing in different directories.
* System Type:: Specifying the system type.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
* Sharing Defaults:: Setting site-wide defaults for @code{configure}.
* Operation Controls:: Changing how @code{configure} runs.
Questions About Autoconf
* Copyright:: Legal restrictions on Autoconf output.
* Copyright:: Copyright on Autoconf output.
* Why GNU m4:: Why not use the standard @code{m4}?
* Bootstrapping:: Autoconf and GNU @code{m4} require each other?
* Why Not Imake:: Why GNU uses @code{configure} instead of Imake.
@ -1023,14 +1025,22 @@ configuration-related dependencies.
When a package tests more than a few C preprocessor symbols, the command
lines to pass @samp{-D} options to the compiler can get quite long.
This causes two problems. One is that the @code{make} output is hard to
read. More seriously, the command lines can exceed the length limits of
some operating systems. As an alternative to passing @samp{-D} options
to the compiler, @code{configure} scripts can create a C header file
containing @samp{#define} directives. The @code{AC_CONFIG_HEADER} macro
selects this kind of output. It should be called right after @code{AC_INIT}.
visually scan for errors. More seriously, the command lines can exceed
the length limits of some operating systems. As an alternative to
passing @samp{-D} options to the compiler, @code{configure} scripts can
create a C header file containing @samp{#define} directives. The
@code{AC_CONFIG_HEADER} macro selects this kind of output. It should be
called right after @code{AC_INIT}.
The package should @samp{#include} the configuration header file before
any other header files, to prevent inconsistencies in declarations.
any other header files, to prevent inconsistencies in declarations (for
example, if it redefines @code{const}). Use @samp{#include <config.h>}
instead of @samp{#include "config.h"}, and pass the C compiler a
@samp{-I.} option (or @samp{-I..}; whichever directory contains
@file{config.h}). That way, even if the source directory is configured
itself (perhaps to make a distribution), other build directories can
also be configured without finding the @file{config.h} from the source
directory.
@defmac AC_CONFIG_HEADER (@var{header-to-create} @dots{})
@maindex CONFIG_HEADER
@ -2763,12 +2773,13 @@ packages.
Some of these external utilities have a portable subset of features, as
well; for example, don't rely on @code{ln} having a @samp{-f} option or
@code{cat} having any options. Don't use @samp{grep -s} to suppress
output, because @samp{grep -s} on System V does not suppress output,
only error messages. Instead, redirect the standard output and standard
error (in case the file doesn't exist) of @code{grep} to
@file{/dev/null}. Check the exit status of @code{grep} to determine
whether it found a match.
@code{cat} having any options. @code{sed} scripts should not contain
comments or use branch labels longer than 8 characters. Don't use
@samp{grep -s} to suppress output, because @samp{grep -s} on System V
does not suppress output, only error messages. Instead, redirect the
standard output and standard error (in case the file doesn't exist) of
@code{grep} to @file{/dev/null}. Check the exit status of @code{grep}
to determine whether it found a match.
@node Testing Values and Files, Multiple Cases, Portable Shell, Writing Tests
@section Testing Values and Files
@ -3667,13 +3678,13 @@ should be relative to the top level source or build directory.
For example, this call:
@example
AC_LINK_FILES(config/sun3.h config/aout.h, host.h object.h)
AC_LINK_FILES(config/$@{machine@}.h config/$@{obj_format@}.h, host.h object.h)
@end example
@noindent
creates in the current directory @file{host.h}, which is a link to
@file{@var{srcdir}/config/sun3.h}, and @file{object.h}, which is a link
to @file{@var{srcdir}/config/aout.h}.
@file{@var{srcdir}/config/$@{machine@}.h}, and @file{object.h}, which is a link
to @file{@var{srcdir}/config/$@{obj_format@}.h}.
@end defmac
@node Site Configuration, Invoking configure, Manual Configuration, Top
@ -3722,7 +3733,7 @@ with. If no argument is given, it defaults to @samp{yes}.
For each external software package that may be used, @file{configure.in}
should call @code{AC_ARG_WITH} to detect whether the @code{configure}
user asked to use it. Whether each package is used or not by
default, and what arguments are valid, is up to you.
default, and which arguments are valid, is up to you.
@defmac AC_ARG_WITH (@var{package}, @var{help-string}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
@maindex ARG_WITH
@ -3782,7 +3793,7 @@ equivalent to @samp{--enable-@var{feature}=no}.
For each optional feature, @file{configure.in} should call
@code{AC_ARG_ENABLE} to detect whether the @code{configure} user asked
to include it. Whether each feature is included or not by default, and
what arguments are valid, is up to you.
which arguments are valid, is up to you.
@defmac AC_ARG_ENABLE (@var{feature}, @var{help-string}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
@maindex ARG_ENABLE
@ -3895,7 +3906,7 @@ install: all
If you have more than one program to install, you can do it in a loop:
@example
PROGRAMS=cat ls rm
PROGRAMS=cp ls rm
install:
for p in $(PROGRAMS); do \
$(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
@ -3980,8 +3991,10 @@ file in the package.
* Compilers and Options:: Selecting compilers and optimization.
* Build Directory:: Configuring in a different directory.
* Installation Names:: Installing in different directories.
* System Type:: Specifying the system type.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
* Sharing Defaults:: Setting site-wide defaults for @code{configure}.
* Operation Controls:: Changing how @code{configure} runs.
@end menu
@include install.texi
@ -4077,7 +4090,7 @@ Several questions about Autoconf come up occasionally. Here some of them
are addressed.
@menu
* Copyright:: Legal restrictions on Autoconf output.
* Copyright:: Copyright on Autoconf output.
* Why GNU m4:: Why not use the standard @code{m4}?
* Bootstrapping:: Autoconf and GNU @code{m4} require each other?
* Why Not Imake:: Why GNU uses @code{configure} instead of Imake.
@ -4092,23 +4105,11 @@ scripts that Autoconf generates? How does that affect my
programs that use them?
@end display
The configuration scripts that Autoconf produces are covered by the GNU
General Public License. This is because they consist almost entirely of
parts of Autoconf itself, rearranged somewhat, and Autoconf is
distributed under the terms of the GPL. As applied to Autoconf, the GPL
just means that you need to distribute @file{configure.in}, and
@file{acsite.m4}, @file{aclocal.m4}, @file{acconfig.h}, and
@file{@var{config}.h.top} and @file{@var{config}.h.bot} if you use them,
along with @code{configure}.
Programs that use Autoconf scripts to configure themselves do not
automatically come under the GPL. Distributing an Autoconf
configuration script as part of a program is considered to be @emph{mere
aggregation} of that work with the Autoconf script. Such programs are
not derivative works based on Autoconf; only their configuration scripts
are. We still encourage software authors to distribute their work under
terms like those of the GPL, but doing so is not required to use
Autoconf.
There are no restrictions on how the configuration scripts that Autoconf
produces may be distributed or used. In Autoconf version 1, they were
covered by the GNU General Public License. We still encourage software
authors to distribute their work under terms like those of the GPL, but
doing so is not required to use Autoconf.
@node Why GNU m4, Bootstrapping, Copyright, Questions
@section Why Require GNU @code{m4}?

View File

@ -111,9 +111,9 @@ s%[^#]*AC_CONFIG_HEADER(\([^)]*\).*%\1%
t here
: here
s%.*:%%
t hascolon
t colon
s%$%.in%
: hascolon
: colon
p
q
}' configure.in`

View File

@ -111,9 +111,9 @@ s%[^#]*AC_CONFIG_HEADER(\([^)]*\).*%\1%
t here
: here
s%.*:%%
t hascolon
t colon
s%$%.in%
: hascolon
: colon
p
q
}' configure.in`

View File

@ -111,9 +111,9 @@ s%[^#]*AC_CONFIG_HEADER(\([^)]*\).*%\1%
t here
: here
s%.*:%%
t hascolon
t colon
s%$%.in%
: hascolon
: colon
p
q
}' configure.in`

View File

@ -74,29 +74,16 @@ editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
all: ${PROGS}
autoconf: autoconf.sh
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
.SUFFIXES:
.SUFFIXES: .sh .pl
autoheader: autoheader.sh
.sh:
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoheader.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
$(editsh) $< > $@.tmp && mv $@.tmp $@ && chmod +x $@
autoreconf: autoreconf.sh
.pl:
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoreconf.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
autoupdate: autoupdate.sh
rm -f $@ $@.tmp
$(editsh) $(srcdir)/autoupdate.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
ifnames: ifnames.sh
rm -f $@ $@.tmp
$(editsh) $(srcdir)/ifnames.sh > $@.tmp && mv $@.tmp $@ && chmod +x $@
autoscan: autoscan.pl
rm -f $@ $@.tmp
$(editpl) $(srcdir)/autoscan.pl > $@.tmp && mv $@.tmp $@ && chmod +x $@
$(editpl) $< > $@.tmp && mv $@.tmp $@ && chmod +x $@
info: autoconf.info @standards_info@ INSTALL

View File

@ -242,12 +242,14 @@ Running @code{configure} Scripts
* Compilers and Options:: Selecting compilers and optimization.
* Build Directory:: Configuring in a different directory.
* Installation Names:: Installing in different directories.
* System Type:: Specifying the system type.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
* Sharing Defaults:: Setting site-wide defaults for @code{configure}.
* Operation Controls:: Changing how @code{configure} runs.
Questions About Autoconf
* Copyright:: Legal restrictions on Autoconf output.
* Copyright:: Copyright on Autoconf output.
* Why GNU m4:: Why not use the standard @code{m4}?
* Bootstrapping:: Autoconf and GNU @code{m4} require each other?
* Why Not Imake:: Why GNU uses @code{configure} instead of Imake.
@ -1023,14 +1025,22 @@ configuration-related dependencies.
When a package tests more than a few C preprocessor symbols, the command
lines to pass @samp{-D} options to the compiler can get quite long.
This causes two problems. One is that the @code{make} output is hard to
read. More seriously, the command lines can exceed the length limits of
some operating systems. As an alternative to passing @samp{-D} options
to the compiler, @code{configure} scripts can create a C header file
containing @samp{#define} directives. The @code{AC_CONFIG_HEADER} macro
selects this kind of output. It should be called right after @code{AC_INIT}.
visually scan for errors. More seriously, the command lines can exceed
the length limits of some operating systems. As an alternative to
passing @samp{-D} options to the compiler, @code{configure} scripts can
create a C header file containing @samp{#define} directives. The
@code{AC_CONFIG_HEADER} macro selects this kind of output. It should be
called right after @code{AC_INIT}.
The package should @samp{#include} the configuration header file before
any other header files, to prevent inconsistencies in declarations.
any other header files, to prevent inconsistencies in declarations (for
example, if it redefines @code{const}). Use @samp{#include <config.h>}
instead of @samp{#include "config.h"}, and pass the C compiler a
@samp{-I.} option (or @samp{-I..}; whichever directory contains
@file{config.h}). That way, even if the source directory is configured
itself (perhaps to make a distribution), other build directories can
also be configured without finding the @file{config.h} from the source
directory.
@defmac AC_CONFIG_HEADER (@var{header-to-create} @dots{})
@maindex CONFIG_HEADER
@ -2763,12 +2773,13 @@ packages.
Some of these external utilities have a portable subset of features, as
well; for example, don't rely on @code{ln} having a @samp{-f} option or
@code{cat} having any options. Don't use @samp{grep -s} to suppress
output, because @samp{grep -s} on System V does not suppress output,
only error messages. Instead, redirect the standard output and standard
error (in case the file doesn't exist) of @code{grep} to
@file{/dev/null}. Check the exit status of @code{grep} to determine
whether it found a match.
@code{cat} having any options. @code{sed} scripts should not contain
comments or use branch labels longer than 8 characters. Don't use
@samp{grep -s} to suppress output, because @samp{grep -s} on System V
does not suppress output, only error messages. Instead, redirect the
standard output and standard error (in case the file doesn't exist) of
@code{grep} to @file{/dev/null}. Check the exit status of @code{grep}
to determine whether it found a match.
@node Testing Values and Files, Multiple Cases, Portable Shell, Writing Tests
@section Testing Values and Files
@ -3667,13 +3678,13 @@ should be relative to the top level source or build directory.
For example, this call:
@example
AC_LINK_FILES(config/sun3.h config/aout.h, host.h object.h)
AC_LINK_FILES(config/$@{machine@}.h config/$@{obj_format@}.h, host.h object.h)
@end example
@noindent
creates in the current directory @file{host.h}, which is a link to
@file{@var{srcdir}/config/sun3.h}, and @file{object.h}, which is a link
to @file{@var{srcdir}/config/aout.h}.
@file{@var{srcdir}/config/$@{machine@}.h}, and @file{object.h}, which is a link
to @file{@var{srcdir}/config/$@{obj_format@}.h}.
@end defmac
@node Site Configuration, Invoking configure, Manual Configuration, Top
@ -3722,7 +3733,7 @@ with. If no argument is given, it defaults to @samp{yes}.
For each external software package that may be used, @file{configure.in}
should call @code{AC_ARG_WITH} to detect whether the @code{configure}
user asked to use it. Whether each package is used or not by
default, and what arguments are valid, is up to you.
default, and which arguments are valid, is up to you.
@defmac AC_ARG_WITH (@var{package}, @var{help-string}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
@maindex ARG_WITH
@ -3782,7 +3793,7 @@ equivalent to @samp{--enable-@var{feature}=no}.
For each optional feature, @file{configure.in} should call
@code{AC_ARG_ENABLE} to detect whether the @code{configure} user asked
to include it. Whether each feature is included or not by default, and
what arguments are valid, is up to you.
which arguments are valid, is up to you.
@defmac AC_ARG_ENABLE (@var{feature}, @var{help-string}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
@maindex ARG_ENABLE
@ -3895,7 +3906,7 @@ install: all
If you have more than one program to install, you can do it in a loop:
@example
PROGRAMS=cat ls rm
PROGRAMS=cp ls rm
install:
for p in $(PROGRAMS); do \
$(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
@ -3980,8 +3991,10 @@ file in the package.
* Compilers and Options:: Selecting compilers and optimization.
* Build Directory:: Configuring in a different directory.
* Installation Names:: Installing in different directories.
* System Type:: Specifying the system type.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
* Sharing Defaults:: Setting site-wide defaults for @code{configure}.
* Operation Controls:: Changing how @code{configure} runs.
@end menu
@include install.texi
@ -4077,7 +4090,7 @@ Several questions about Autoconf come up occasionally. Here some of them
are addressed.
@menu
* Copyright:: Legal restrictions on Autoconf output.
* Copyright:: Copyright on Autoconf output.
* Why GNU m4:: Why not use the standard @code{m4}?
* Bootstrapping:: Autoconf and GNU @code{m4} require each other?
* Why Not Imake:: Why GNU uses @code{configure} instead of Imake.
@ -4092,23 +4105,11 @@ scripts that Autoconf generates? How does that affect my
programs that use them?
@end display
The configuration scripts that Autoconf produces are covered by the GNU
General Public License. This is because they consist almost entirely of
parts of Autoconf itself, rearranged somewhat, and Autoconf is
distributed under the terms of the GPL. As applied to Autoconf, the GPL
just means that you need to distribute @file{configure.in}, and
@file{acsite.m4}, @file{aclocal.m4}, @file{acconfig.h}, and
@file{@var{config}.h.top} and @file{@var{config}.h.bot} if you use them,
along with @code{configure}.
Programs that use Autoconf scripts to configure themselves do not
automatically come under the GPL. Distributing an Autoconf
configuration script as part of a program is considered to be @emph{mere
aggregation} of that work with the Autoconf script. Such programs are
not derivative works based on Autoconf; only their configuration scripts
are. We still encourage software authors to distribute their work under
terms like those of the GPL, but doing so is not required to use
Autoconf.
There are no restrictions on how the configuration scripts that Autoconf
produces may be distributed or used. In Autoconf version 1, they were
covered by the GNU General Public License. We still encourage software
authors to distribute their work under terms like those of the GPL, but
doing so is not required to use Autoconf.
@node Why GNU m4, Bootstrapping, Copyright, Questions
@section Why Require GNU @code{m4}?

View File

@ -127,6 +127,21 @@ an extra prefix or suffix on their names by giving @code{configure} the
option @samp{--program-prefix=@var{PREFIX}} or
@samp{--program-suffix=@var{SUFFIX}}.
@node Optional Features
@section Optional Features
Some packages pay attention to @samp{--enable-@var{feature}} options to
@code{configure}, where @var{feature} indicates an optional part of the
package. They may also pay attention to @samp{--with-@var{package}}
options, where @var{package} is something like @samp{gnu-as} or @samp{x}
(for the X Window System). The @file{README} should mention any
@samp{--enable-} and @samp{--with-} options that the package recognizes.
For packages that use the X Window System, @code{configure} can usually
find the X include and library files automatically, but if it doesn't,
you can use the @code{configure} options @samp{--x-includes=@var{dir}}
and @samp{--x-libraries=@var{dir}} to specify their locations.
@node System Type
@section Specifying the System Type
@ -150,18 +165,23 @@ the @samp{--target=@var{type}} option to select the type of system
they will produce code for and the @samp{--build=@var{type}} option
to select the type of system on which you are compiling the package.
@node Optional Features
@section Optional Features
@node Sharing Defaults
@section Sharing Defaults
Some packages pay attention to @samp{--with-@var{package}} options to
@code{configure}, where @var{package} is something like @samp{gnu-as} or
@samp{x} (for the X Window System). They may also pay attention to
@samp{--enable-@var{feature}} options, where @var{feature} indicates an
optional part of the package. The @file{README} should mention any
@samp{--with-} and @samp{--enable-} options that the package recognizes.
If you want to set default values for @code{configure} scripts to share,
you can create a site shell script called @file{config.site} that gives
default values for variables like @code{CC}, @code{cache_file}, and
@code{prefix}. @code{configure} looks for
@file{@var{prefix}/lib/config.site} if it exists, then
@file{@var{exec_prefix}/lib/config.site} if it exists. Or, you can set
the @code{CONFIG_SITE} environment variable to the location of the site
script. A warning: not all @code{configure} scripts look for a site script.
@noindent
@code{configure} also recognizes the following options:
@node Operation Controls
@section Operation Controls
@code{configure} recognizes the following options to control how it
operates.
@table @code
@item --cache-file=@var{file}
@ -184,12 +204,6 @@ Look for the package's source code in directory @var{dir}. Usually
@item --version
Print the version of Autoconf used to generate the @code{configure}
script, and exit.
@item --x-includes=@var{dir}
X include files are in directory @var{dir}.
@item --x-libraries=@var{dir}
X library files are in directory @var{dir}.
@end table
@noindent

View File

@ -127,6 +127,21 @@ an extra prefix or suffix on their names by giving @code{configure} the
option @samp{--program-prefix=@var{PREFIX}} or
@samp{--program-suffix=@var{SUFFIX}}.
@node Optional Features
@section Optional Features
Some packages pay attention to @samp{--enable-@var{feature}} options to
@code{configure}, where @var{feature} indicates an optional part of the
package. They may also pay attention to @samp{--with-@var{package}}
options, where @var{package} is something like @samp{gnu-as} or @samp{x}
(for the X Window System). The @file{README} should mention any
@samp{--enable-} and @samp{--with-} options that the package recognizes.
For packages that use the X Window System, @code{configure} can usually
find the X include and library files automatically, but if it doesn't,
you can use the @code{configure} options @samp{--x-includes=@var{dir}}
and @samp{--x-libraries=@var{dir}} to specify their locations.
@node System Type
@section Specifying the System Type
@ -150,18 +165,23 @@ the @samp{--target=@var{type}} option to select the type of system
they will produce code for and the @samp{--build=@var{type}} option
to select the type of system on which you are compiling the package.
@node Optional Features
@section Optional Features
@node Sharing Defaults
@section Sharing Defaults
Some packages pay attention to @samp{--with-@var{package}} options to
@code{configure}, where @var{package} is something like @samp{gnu-as} or
@samp{x} (for the X Window System). They may also pay attention to
@samp{--enable-@var{feature}} options, where @var{feature} indicates an
optional part of the package. The @file{README} should mention any
@samp{--with-} and @samp{--enable-} options that the package recognizes.
If you want to set default values for @code{configure} scripts to share,
you can create a site shell script called @file{config.site} that gives
default values for variables like @code{CC}, @code{cache_file}, and
@code{prefix}. @code{configure} looks for
@file{@var{prefix}/lib/config.site} if it exists, then
@file{@var{exec_prefix}/lib/config.site} if it exists. Or, you can set
the @code{CONFIG_SITE} environment variable to the location of the site
script. A warning: not all @code{configure} scripts look for a site script.
@noindent
@code{configure} also recognizes the following options:
@node Operation Controls
@section Operation Controls
@code{configure} recognizes the following options to control how it
operates.
@table @code
@item --cache-file=@var{file}
@ -184,12 +204,6 @@ Look for the package's source code in directory @var{dir}. Usually
@item --version
Print the version of Autoconf used to generate the @code{configure}
script, and exit.
@item --x-includes=@var{dir}
X include files are in directory @var{dir}.
@item --x-libraries=@var{dir}
X library files are in directory @var{dir}.
@end table
@noindent

View File

@ -3,7 +3,7 @@ dnl Requires GNU m4.
dnl This file is part of Autoconf.
dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
@ -17,6 +17,10 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl As a special exception, if you use parts of this file in a
dnl configure script, doing so does not cause the resulting script to
dnl be covered by the GNU General Public License.
dnl
dnl Written by David MacKenzie, with help from
dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
dnl Roland McGrath, Noah Friedman, and david d zuhn.
@ -116,24 +120,10 @@ dnl AC_INIT_NOTICE()
AC_DEFUN(AC_INIT_NOTICE,
[# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version] AC_ACVERSION [
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This script is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this script; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# The redistribution and modification terms for this script do not affect
# the terms for software that it configures.
# This configure script is free software; there are no restrictions on how you
# can redistribute it and/or modify it.
ac_help=])

View File

@ -2,7 +2,7 @@ dnl Macros that test for specific features.
dnl This file is part of Autoconf.
dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl This file is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
@ -16,6 +16,10 @@ dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl As a special exception, if you use parts of this file in a
dnl configure script, doing so does not cause the resulting script to
dnl be covered by the GNU General Public License.
dnl
dnl Written by David MacKenzie, with help from
dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
dnl Roland McGrath, and Noah Friedman.
@ -258,7 +262,7 @@ if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
[AC_LANG_SAVE[]dnl
AC_LANG_CPLUSPLUS[]dnl
CXXCPP="${CXX-c++} -E"
CXXCPP="${CXX-gcc} -E"
AC_TRY_CPP([#include <stdlib.h>], , CXXCPP=/lib/cpp)
ac_cv_prog_CXXCPP="$CXXCPP"
AC_LANG_RESTORE[]dnl
@ -393,7 +397,7 @@ fi
AC_SUBST(LN_S)dnl
])
AC_DEFUN(AC_RSH,
define(AC_RSH,
[errprint(__file__:__line__: [$0] has been removed; replace it with equivalent code
)m4exit(4)])
@ -482,12 +486,12 @@ AC_DEFUN(AC_HEADER_DIRENT,
[ac_header_dirent=no
AC_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h,
[ac_header_dirent=$ac_hdr; break])
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix,
# and -lx contains other useful things as well. (FIXME what are they?)
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
else
AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
fi
AC_CHECK_LIB(x, main, LIBS="$LIBS -lx")
])
dnl Like AC_CHECK_HEADER, except also make sure that HEADER-FILE
@ -1067,7 +1071,8 @@ AC_CHECK_LIB(elf, elf_read,
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(inq_stats/cpustats.h,
[ac_have_func=yes AC_DEFINE(UMAX4_3) AC_DEFINE(UMAX)])
[ac_have_func=yes AC_DEFINE(UMAX4_3)
AC_DEFINE(UMAX)])
fi
if test $ac_have_func = no; then
AC_CHECK_HEADER(sys/cpustats.h,
@ -1472,7 +1477,7 @@ if test $ac_cv_c_const = no; then
fi
])
AC_DEFUN(AC_ARG_ARRAY,
define(AC_ARG_ARRAY,
[errprint(__file__:__line__: [$0] has been removed; don't do unportable things with arguments
)m4exit(4)])
@ -1499,7 +1504,7 @@ rm -f conftest])dnl
AC_MSG_RESULT($ac_cv_sys_interpreter)
])
AC_DEFUN(AC_HAVE_POUNDBANG,
define(AC_HAVE_POUNDBANG,
[errprint(__file__:__line__: [$0 has been replaced by AC_SYS_INTERPRETER, taking no arguments
])m4exit(4)])

View File

@ -1,25 +1,10 @@
# Test all of the acspecific.m4 macros. -*- TCL -*-
foreach mac {
AC_PROG_CC AC_PROG_CXX AC_PROG_GCC_TRADITIONAL AC_PROG_CC_C_O
AC_PROG_MAKE_SET AC_PROG_RANLIB AC_PROG_AWK AC_PROG_YACC AC_PROG_CPP
AC_PROG_CXXCPP AC_REQUIRE_CPP AC_PROG_LEX AC_DECL_YYTEXT
AC_PROG_INSTALL AC_PROG_LN_S AC_HEADER_STDC AC_UNISTD_H AC_USG
AC_MEMORY_H AC_HEADER_MAJOR AC_DIR_HEADER AC_HEADER_DIRENT
AC_HEADER_STAT AC_DECL_SYS_SIGLIST AC_TYPE_GETGROUPS AC_TYPE_UID_T
AC_TYPE_SIZE_T AC_TYPE_PID_T AC_TYPE_OFF_T AC_TYPE_MODE_T
AC_TYPE_SIGNAL AC_FUNC_CLOSEDIR_VOID AC_FUNC_MEMCMP AC_FUNC_MMAP
AC_FUNC_VPRINTF AC_FUNC_VFORK AC_FUNC_GETMNTENT AC_FUNC_STRFTIME
AC_FUNC_WAIT3 AC_FUNC_ALLOCA AC_FUNC_GETLOADAVG AC_FUNC_UTIME_NULL
AC_FUNC_STRCOLL AC_FUNC_SETVBUF_REVERSED AC_STRUCT_TM AC_HEADER_TIME
AC_STRUCT_TIMEZONE AC_STRUCT_ST_BLOCKS AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_RDEV AC_C_CROSS AC_C_CHAR_UNSIGNED AC_C_LONG_DOUBLE
AC_INT_16_BITS AC_LONG_64_BITS AC_C_BIGENDIAN AC_C_INLINE AC_C_CONST
AC_SYS_INTERPRETER AC_SYS_LONG_FILE_NAMES AC_SYS_RESTARTABLE_SYSCALLS
AC_PATH_X AC_PATH_XTRA AC_AIX AC_MINIX AC_ISC_POSIX AC_XENIX_DIR
AC_SCO_INTL AC_IRIX_SUN AC_DYNIX_SEQ
send_user "Checking for syntax errors in the specific tests...\n"
set script {s/^AC_DEFUN(\([^,]*\).*/\1/p}
set macros [exec sed -n $script $srcdir/../acspecific.m4]
} {
send_user "Testing $mac\n"
foreach mac $macros {
send_user "$mac\n"
autoconf_test $mac $mac
}

View File

@ -78,8 +78,6 @@ proc autoconf_load_plus {args} {
if {$status==0} {
return 0
}
# Eventually we might want to run configure with --verbose.
# In that case, we'll need to examine $exec_output more creatively.
if [string match "*:*" "$exec_output"] then {
fail "$args, problem with executing"
return 0