more tweaks

This commit is contained in:
David MacKenzie 1996-11-15 00:04:39 +00:00
parent 81a0a80172
commit b1e18dbda8
14 changed files with 293 additions and 52 deletions

View File

@ -1,5 +1,11 @@
Thu Nov 14 11:15:27 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* acheaders: Add entry for malloc.h. Make the strings.h entry
suggest AC_CHECK_HEADERS instead of AC_HEADER_STDC.
* acgeneral.m4 (AC_INIT_PARSE_ARGS): Move initialization of
ac_max_here_lines here from AC_OUTPUT_HEADER.
* autoheader.sh: Take the multiple-include protection back out.
It's not needed for a file that just #defines stuff, and, as Ken
Raeburn pointed out in Apr 1994:
@ -10,6 +16,7 @@ Thu Nov 14 11:15:27 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Don't try
running a program, just try linking.
(AC_C_CROSS): Make the wording clearer.
Wed Nov 13 10:07:14 1996 David J MacKenzie <djm@catapult.va.pubnix.com>

245
TODO
View File

@ -38,7 +38,7 @@ these suggestions... their presence here doesn't imply my endorsement.
------------------------------------------------------------------------------
* Doc: Add concept index.
* Doc: Add a concept index.
------------------------------------------------------------------------------
@ -70,9 +70,6 @@ config.site.
*** Distribute a config.site corresponding to a hypothetical bare POSIX system with c89.
*** Cache consistency checking: ignore cache if environment
(CC or PATH) differs.
** Site defaults:
*** Convention for consistency checking of env vars and options in config.site so config.site can print obnoxious messages if it doesn't like options or env vars that users use.
@ -100,11 +97,6 @@ In config.status comment, put the host/target/build types, if used.
------------------------------------------------------------------------------
Support a way of including makefile fragments that then have @var@
substitutions done on them.
------------------------------------------------------------------------------
Have AC_CANONICAL_* cache the host/build/target types.
They have to be overridden by the command line arguments,
just as for X includes and libraries. Should they be cached
@ -131,15 +123,6 @@ From: roland@gnu.ai.mit.edu (Roland McGrath)
------------------------------------------------------------------------------
autoconf-2.1 AC_EGREP_HEADER does not work if [square brackets]
are used in the egrep pattern. This makes egrep fairly useless to
find, for example, a space or tab followed by something.
Putting changequotes around the PATTERN parameter makes no difference.
-Jim Avera (jima@netcom.com)
------------------------------------------------------------------------------
AC_MSG_CHECKING([checking for ANSI #stringize])
AC_REVISION([ #(@) revision 2.1 ])
@ -165,6 +148,16 @@ is conftest.c -> <ctype.h> -> <sys/localedef.h> -> <sys/lc_core.h>
#undef $ac_func
From: kwzh@gnu.ai.mit.edu (Karl Heuer)
The test for the isascii function was failing because that function is
also a macro. He proposed that the test file look like this:
/* Remove any macro definition. */
#undef isascii
/* Override any gcc2 internal prototype to avoid an error. */
char isascii(); isascii();
Andreas Schwab
------------------------------------------------------------------------------
put all the config.* stuff somewhere like config/?
@ -359,13 +352,6 @@ From: fjh@kryten.cs.mu.oz.au (Fergus Henderson)
------------------------------------------------------------------------------
It would be nice if the configure script would handle an option such as
--x-libraries="/usr/openwin/lib /usr/dt/lib".
Rick Boykin <rboykin@cscsun3.larc.nasa.gov>
------------------------------------------------------------------------------
Timezone calculations checks.
------------------------------------------------------------------------------
@ -380,6 +366,15 @@ Mention automake, libtool, etc. in the autoconf manual.
------------------------------------------------------------------------------
configure-time pasting together of output files from multiple pieces.
AC_OUTPUT(Makefile:$pre_in:Makefile.in:$pre_out)
This would concatenate the files $pre_in, Makefile.in, and $pre_out
before running sed to do the substitutions.
From: "Theodore Ts'o" <tytso@MIT.EDU>
Support a way of including makefile fragments that then have @var@
substitutions done on them.
Or ac_include?
------------------------------------------------------------------------------
@ -399,6 +394,14 @@ done.
From Jim Meyering
This is trivial, but I'm unsure of the m4 quoting reality. Is it:
AC_DEFUN(AC_LINK_FILES,
[define([AC_LIST_FILES], ifdef([AC_LIST_FILES], AC_LIST_FILES ,)[$1])dnl
define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], AC_LIST_LINKS ,)[$2])])
Roland McGrath
------------------------------------------------------------------------------
Question: at least one common UNIX variant has a "cc" that is old K&R
@ -411,8 +414,198 @@ hpa@yggdrasil.com (H. Peter Anvin)
Modify the meaning of autoheader --localdir to add an additional
directory to look for acconfig.h instead of replacing the directory
containing configure.in.
containing configure.in. Also, autoreconf recurses on all
subdirectories containing a configure.in, not just those given by an
AC_CONFIG_SUBDIRS directive, so you can't have both directories that
are parts of a large package, and directories that are independent
packages.
Marc Horowitz <marc@MIT.EDU>
------------------------------------------------------------------------------
Cache consistency checking: ignore cache if environment
(CC or PATH) differs.
From Mike Haertel
So we need a general mechanism for storing variables' values in the cache,
and checking if they are the same after reading the cache. Then we can add
to the list of variables as we come across the need. So far we want
LD_LIBRARY_PATH and the internal variables for some of (all?) the args.
From: roland@gnu.ai.mit.edu (Roland McGrath)
Hmm. That list might include LD_LIBRARY_PATH, LD_RUN_PATH (for solaris),
and PATH. I can't think of any others so far.
From: friedman@splode.com (Noah Friedman)
------------------------------------------------------------------------------
So how about an option to configure --reset-cache, that says to ignore all
existing cached values for tests that configure runs, and then update the
cache normally. This should be utterly trivial to do in AC_CACHE_VAL;
check the flag variable and always compute the value if it's set.
------------------------------------------------------------------------------
A number of people have tried to fix configuration problems by editing
acconfig.h. (Despite comments at the top of the file.) I think they're
confused because anything.h looks like a regular source file name.
Maybe acconfig.h could be called acconfig.extra or something?
From: kb@cs.umb.edu (K. Berry)
------------------------------------------------------------------------------
Every user running
X11 usually has a directory like *X11* in his PATH variable. By replacing
bin by include, you can find good places to look for the include files
or libraries.
From: rcb5@win.tue.nl (Richard Verhoeven)
------------------------------------------------------------------------------
in order to use the AC_CANONICAL_SYSTEM macro, I have to
have install-sh somewhere nearby --- why is this? I have no real
reason to distribute install-sh, other than that its absence breaks
this code.
Shouldn't the above loop be looking for config.sub and config.guess?
From: jimb@totoro.bio.indiana.edu (Jim Blandy)
adding AC_CANONICAL_HOST to my configure.in script caused
all sorts of odd/unexplained errors. Obviously, I had to go
get copies of config.guess, config.sub and install-sh from the
autoconf distribution, but the error messages and autoconf docs
didn't explain that very well.
From: bostic@bsdi.com (Keith Bostic)
------------------------------------------------------------------------------
Combine AC_PROG_CC_WORKS with AC_C_CROSS. If the compiler exits with
a 0 status and produces a non-empty output file, consider it working.
If the output file is runnable, consider it native, also.
Perhaps also have AC_PROG_CC_WORKS try to link an invalid program, and
die if the compiler seemed to succeed--in which case it's not usable
with autoconf scripts.
------------------------------------------------------------------------------
When using CONFIG_FILES= and CONFIG_HEADERS= for controlling
partial configuration, any AC_LINK_FILES is repeated in each case
(that is, usually, once for config.h and once per subdirectory).
This is not elegant.
Maybe Autoconf could use some kind of CONFIG_LINKS=<file-list>,
having all such AC_LINK(ed)_FILES by default, but usable by each
Makefile.in in rules for updating the particular links they need.
From: pinard@iro.umontreal.ca
------------------------------------------------------------------------------
Perhaps autoconf could have a single @magic@ frob that gets replaced with
assignments for all the *dir variables? There is quite a plethora for each
Makefile.in to have foodir = @foodir@.
From: Roland McGrath <roland@gnu.ai.mit.edu>
------------------------------------------------------------------------------
In most cases, when autoscan suggests something, using the search
or index command into the Info reader for autoconf manual quickly
explains me what the test is about. However, for header files
and functions, the search might fail, because the test is not of
the specific kind. The Autoconf manual should reflect somewhere
all header files or functions (non-specific features, generally)
triggering autoscan to generate tests, and tell in a few words
what is the problem, and the suggested approach for a solution;
that is, how one should use the result of testing the feature.
From: pinard@iro.umontreal.ca
------------------------------------------------------------------------------
It would be nice if the configure script would handle an option such as
--x-libraries="/usr/openwin/lib /usr/dt/lib".
Rick Boykin <rboykin@cscsun3.larc.nasa.gov>
Under Solaris 2.4, the regular X includes and libs and the Motif
includes and libs are in different places. The Emacs configure script
actually allows dir1:dir2:dir3 --
if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
fi
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
fi
------------------------------------------------------------------------------
What messages should be produced by default, if any?
Probably only the few most important ones, like which configuration
name was used, whether X or Xt are in use, etc. The specific
decisions, and progress messages, should be recorded on the terminal
only if --verbose is used.
--silent just supresses the "checking for...result"
messages, not the "creating FOO" messages.
I think the default should be to suppress both.
From: Richard Stallman <rms@gnu.ai.mit.edu>
There is no distinction now between
important decisions (we have X) vs minor decisions (we have lstat).
However, there are probably only a few things you deem important enough to
announce and only those few things will need to be changed.
Perhaps config.status could be written with comments saying what was
decided.
From: Roland McGrath <roland@gnu.ai.mit.edu>
------------------------------------------------------------------------------
Use automake to generate autoconf's Makefile.in's?
------------------------------------------------------------------------------
about the idea of using small configure.in/aclocal.m4 snippets:
this is the one idea in metaconfig (the autoconf-like program used by
Perl) that I like. metaconfig looks for a "U" directory, and includes
each ".U" file into the generated Configure script (according to
various complicated rules).
From: Tom Tromey <tromey@creche.cygnus.com>
------------------------------------------------------------------------------
It would be nice if there were some way for an autoconf macro to add
code to be run at the same time as the `EXTRA-CMDS' argument to
AC_OUTPUT.
it would be most useful if it could be
run any number of times (and have all the command concatenated).
From: Tom Tromey <tromey@creche.cygnus.com>
------------------------------------------------------------------------------
I'd much prefer to see the absolute paths substituted for all the
standard "dir" variables. It would be nice to have variables in
configure that held the absolute paths. And it is nice to be able to
substitute them into other files without relying on the destination
file supporting ${...} syntax. (It works in Perl, sh, and make --
but not guile)
From: Tom Tromey <tromey@creche.cygnus.com>
------------------------------------------------------------------------------
Another thing I wish for is a macro which figures out which libraries are
needed for BSD-sytle sockets. AC_PATH_X already detects this
correctly...so it's just a matter of seperating out the socket-related code.
From: "Joel N. Weber II" <nemo@koa.iolani.honolulu.hi.us>
------------------------------------------------------------------------------

View File

@ -205,6 +205,8 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
@ -1982,10 +1984,10 @@ cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_inc=90 # Lines per file.
ac_beg=1 # First line for current file.
ac_end=$ac_inc # Line after last line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
@ -2005,7 +2007,7 @@ while $ac_more_lines; do
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_inc`
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
@ -2171,8 +2173,6 @@ EOF
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
# Maximum number of lines to put in a single here document.
ac_max_here_lines=12
rm -f conftest.tail
while :

View File

@ -5,7 +5,6 @@ sys/dir.h AC_HEADER_DIRENT
ndir.h AC_HEADER_DIRENT
sys/mkdev.h AC_HEADER_MAJOR
string.h AC_HEADER_STDC
strings.h AC_HEADER_STDC
stdlib.h AC_HEADER_STDC
stddef.h AC_HEADER_STDC
stdarg.h AC_HEADER_STDC
@ -16,8 +15,10 @@ X11/Xlib.h AC_PATH_X
# Others.
fcntl.h AC_CHECK_HEADERS
limits.h AC_CHECK_HEADERS
malloc.h AC_CHECK_HEADERS
paths.h AC_CHECK_HEADERS
sgtty.h AC_CHECK_HEADERS
strings.h AC_CHECK_HEADERS
sys/file.h AC_CHECK_HEADERS
sys/ioctl.h AC_CHECK_HEADERS
sys/time.h AC_CHECK_HEADERS

View File

@ -1533,8 +1533,8 @@ dnl ### Checks for compiler characteristics
AC_DEFUN(AC_C_CROSS,
[# If we cannot run a trivial program, we must be cross compiling.
AC_CACHE_CHECK(whether cross-compiling, ac_cv_c_cross,
[# If we cannot run a trivial program, we are probably using a cross compiler.
AC_CACHE_CHECK(whether using a cross-compiler, ac_cv_c_cross,
[AC_TRY_RUN([main(){return(0);}],
ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])
cross_compiling=$ac_cv_c_cross

View File

@ -1624,6 +1624,23 @@ standard place. Otherwise set @code{LEX} to @samp{lex} and
If @samp{ln -s} works on the current filesystem (the operating system
and filesystem support symbolic links), set output
variable @code{LN_S} to @samp{ln -s}, otherwise set it to @samp{ln}.
If the link is put in a directory other than the current directory, its
meaning depends on whether @samp{ln} or @samp{ln -s} is used. To safely
create links using @samp{$(LN_S)}, either find out which form is used
and adjust the arguments, or always invoke @code{ln} in the directory
where the link is to be created.
In other words, it does not work to do
@example
$(LN_S) foo /x/bar
@end example
Instead, do
@example
(cd /x && $(LN_S) foo bar)
@end example
@end defmac
@defmac AC_PROG_RANLIB
@ -2957,6 +2974,9 @@ method to get the results instead of calling the macros.
If the C compiler being used does not produce executables that can run
on the system where @code{configure} is being run, set the shell
variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}.
In other words, this tests whether the build system type is different
from the host system type (the target system type is irrelevant to this
test). @xref{Manual Configuration}, for more on support for cross compiling.
@end defmac
@node Guidelines, Test Functions, Test Programs, Run Time

View File

@ -153,7 +153,6 @@ esac
# config.h, which it's ok to edit.
cat <<EOF
/* ${config_h_in}. Generated automatically from $infile by autoheader. */
EOF
test -r ${config_h}.top && cat ${config_h}.top

View File

@ -153,7 +153,6 @@ esac
# config.h, which it's ok to edit.
cat <<EOF
/* ${config_h_in}. Generated automatically from $infile by autoheader. */
EOF
test -r ${config_h}.top && cat ${config_h}.top

View File

@ -153,7 +153,6 @@ esac
# config.h, which it's ok to edit.
cat <<EOF
/* ${config_h_in}. Generated automatically from $infile by autoheader. */
EOF
test -r ${config_h}.top && cat ${config_h}.top

16
configure vendored
View File

@ -49,6 +49,8 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
@ -538,7 +540,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:__oline__: checking for $ac_word" >&5
echo "configure:544: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -575,7 +577,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:__oline__: checking for $ac_word" >&5
echo "configure:581: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -607,7 +609,7 @@ done
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:__oline__: checking for $ac_word" >&5
echo "configure:613: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -672,7 +674,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:__oline__: checking for a BSD compatible install" >&5
echo "configure:678: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -873,10 +875,10 @@ cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_inc=90 # Lines per file.
ac_beg=1 # First line for current file.
ac_end=$ac_inc # Line after last line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
@ -896,7 +898,7 @@ while $ac_more_lines; do
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_inc`
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then

View File

@ -1624,6 +1624,23 @@ standard place. Otherwise set @code{LEX} to @samp{lex} and
If @samp{ln -s} works on the current filesystem (the operating system
and filesystem support symbolic links), set output
variable @code{LN_S} to @samp{ln -s}, otherwise set it to @samp{ln}.
If the link is put in a directory other than the current directory, its
meaning depends on whether @samp{ln} or @samp{ln -s} is used. To safely
create links using @samp{$(LN_S)}, either find out which form is used
and adjust the arguments, or always invoke @code{ln} in the directory
where the link is to be created.
In other words, it does not work to do
@example
$(LN_S) foo /x/bar
@end example
Instead, do
@example
(cd /x && $(LN_S) foo bar)
@end example
@end defmac
@defmac AC_PROG_RANLIB
@ -2957,6 +2974,9 @@ method to get the results instead of calling the macros.
If the C compiler being used does not produce executables that can run
on the system where @code{configure} is being run, set the shell
variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}.
In other words, this tests whether the build system type is different
from the host system type (the target system type is irrelevant to this
test). @xref{Manual Configuration}, for more on support for cross compiling.
@end defmac
@node Guidelines, Test Functions, Test Programs, Run Time

View File

@ -205,6 +205,8 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
@ -1982,10 +1984,10 @@ cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_inc=90 # Lines per file.
ac_beg=1 # First line for current file.
ac_end=$ac_inc # Line after last line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
@ -2005,7 +2007,7 @@ while $ac_more_lines; do
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_inc`
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
@ -2171,8 +2173,6 @@ EOF
# Break up conftest.vals because some shells have a limit on
# the size of here documents, and old seds have small limits too.
# Maximum number of lines to put in a single here document.
ac_max_here_lines=12
rm -f conftest.tail
while :

View File

@ -1533,8 +1533,8 @@ dnl ### Checks for compiler characteristics
AC_DEFUN(AC_C_CROSS,
[# If we cannot run a trivial program, we must be cross compiling.
AC_CACHE_CHECK(whether cross-compiling, ac_cv_c_cross,
[# If we cannot run a trivial program, we are probably using a cross compiler.
AC_CACHE_CHECK(whether using a cross-compiler, ac_cv_c_cross,
[AC_TRY_RUN([main(){return(0);}],
ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])
cross_compiling=$ac_cv_c_cross

View File

@ -5,7 +5,6 @@ sys/dir.h AC_HEADER_DIRENT
ndir.h AC_HEADER_DIRENT
sys/mkdev.h AC_HEADER_MAJOR
string.h AC_HEADER_STDC
strings.h AC_HEADER_STDC
stdlib.h AC_HEADER_STDC
stddef.h AC_HEADER_STDC
stdarg.h AC_HEADER_STDC
@ -16,8 +15,10 @@ X11/Xlib.h AC_PATH_X
# Others.
fcntl.h AC_CHECK_HEADERS
limits.h AC_CHECK_HEADERS
malloc.h AC_CHECK_HEADERS
paths.h AC_CHECK_HEADERS
sgtty.h AC_CHECK_HEADERS
strings.h AC_CHECK_HEADERS
sys/file.h AC_CHECK_HEADERS
sys/ioctl.h AC_CHECK_HEADERS
sys/time.h AC_CHECK_HEADERS