autoconf/TODO
1996-11-12 07:17:30 +00:00

454 lines
16 KiB
Plaintext

-*- outline -*-
Things it might be nice to do someday. I haven't evaluated all of
these suggestions... their presence here doesn't imply my endorsement.
-djm
------------------------------------------------------------------------------
* Make AC_CHECK_LIB check whether the function is already available
before checking for the library. This might involve adding another
kind of cache variable to indicate whether a given function needs a
given library. The current ac_cv_func_ variables are intended to
indicate whether the function is in the default libraries, but
actually also take into account whatever value LIBS had when they
were checked for.
------------------------------------------------------------------------------
* Add AC_PROG_CC_POSIX to replace the current ad-hoc macros for AIX,
Minix, ISC, etc.
------------------------------------------------------------------------------
* Use AC_EGREP_CPP instead of AC_TRY_LINK to detect structures and members.
------------------------------------------------------------------------------
* Make AC_CHECK_FUNC[S] automatically use any particular macros for the
listed functions.
------------------------------------------------------------------------------
* Support creating both config.h and DEFS in the same configure.
------------------------------------------------------------------------------
* Select the right CONFIG_SHELL automatically (for Ultrix, Lynx especially.)
------------------------------------------------------------------------------
* Doc: Add concept index.
------------------------------------------------------------------------------
* Doc: Centralize information on POSIX, MS-DOS, cross-compiling, and
other important topics.
------------------------------------------------------------------------------
* Split up AC_SUBST substitutions using a loop to accomodate shells
with severely limited here document sizes, if it turns out to be a problem.
I'm not sure whether the limit is on lines or bytes; if bytes, it
will be less of a problem than it was with the long lines used for
creating a header file.
There has also been a report that HPUX and OSF/1 seds only allow 100
commands.
------------------------------------------------------------------------------
* Allow [ and ] in AC_DEFINE args.
------------------------------------------------------------------------------
* Mike Haertel's suggestions:
** Provide header files containing decls for alloca, strings, etc.
** Cross compiling:
*** Error messages include instructions for overriding defaults using
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.
------------------------------------------------------------------------------
* autoscan: Tell the files that caused inclusion of each macro,
in a dnl comment. (Seems to be hard.)
------------------------------------------------------------------------------
* Look at user contributed macros:
prototypes
IEEE double precision math
------------------------------------------------------------------------------
For AC_TYPE_SIGNAL signal handlers, provide a way for code to know
whether to do "return 0" or "return" (int vs void) to avoid compiler
warnings. (Roland McGrath)
------------------------------------------------------------------------------
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
all in one variable, or three? In that case, what if only one
or two of the cache variables are set?
------------------------------------------------------------------------------
The argument HELP-STRING is a description of the option which
...
Avoid tabs in the help string. You'll need to enclose it in `['
and `]' in order to produce the leading spaces.
Except that [...] is the convention for telling the user the default,
So I guess a changequote(`,') or something would be in order in some cases.
From: "K. Berry" <kb@cs.umb.edu>
------------------------------------------------------------------------------
The default of unlimited permission is fine, but there should be some easy
way for configure to have copyright terms passed through from configure.in.
Maybe AC_LICENSE([...]).
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 ])
causes bogus code to be generated for whatever immediately follows. The
problem goes away if the '#' is removed. Probably the macros are not
disabling the m4 "comment" feature when processing user-supplied strings.
-Jim Avera jima@netcom.com
------------------------------------------------------------------------------
on hal.gnu.ai.mit.edu, configure is getting the wrong answer for
AC_CHECK_FUNCS(select).
The problem here is that there's severe namespace pollution: when
conftest.c includes <ctype.h> to pick up any __stub macro definitions,
it's getting a prototype declaration for select(), which collides
with the dummy declaration in conftest.c. (The chain of includes
is conftest.c -> <ctype.h> -> <sys/localedef.h> -> <sys/lc_core.h>
-> <sys/types.h> -> <sys/select.h>.)
#define $ac_func __dummy_$ac_func
#include <ctype.h>
#undef $ac_func
From: kwzh@gnu.ai.mit.edu (Karl Heuer)
------------------------------------------------------------------------------
put all the config.* stuff somewhere like config/?
All these extraneous files sure clutter up a toplevel directory.
From: "Randall S. Winchester" <rsw@eng.umd.edu>
------------------------------------------------------------------------------
It would be nice if I could (in the Makefile.in files) set
the path to config.h. You have config.h ../config.h ../../config.h's all
over the place, in the findutils-4.1 directory.
From: "Randall S. Winchester" <rsw@eng.umd.edu>
------------------------------------------------------------------------------
In libc and make in aclocal.m4 I have AC_CHECK_SYMBOL, which checks for
sys_siglist et al. Using AC_CHECK_FUNC doesn't work on some system that
winds up caring that you reference it as a function and it is really a
variable. My version always declares the symbol as a char *[]; if that
ends up a bad idea, we can have it take an arg with the C decl, but that is
a bit verbose to write if it's actually superfluous.
From Roland McGrath.
[I'd call it AC_CHECK_VAR, I think. -djm]
------------------------------------------------------------------------------
In a future version (after 2.2), make AC_PROG_{CC,RANLIB,anything else}
use AC_CHECK_TOOL.
From Roland McGrath.
------------------------------------------------------------------------------
ls -lt configure configure.in | sort
doesn't work right if configure.in is from a symlink farm, where the
symlink has either a timestamp of its own, or under BSD 4.4, it has
the timestamp of the current directory, neither of which
helps. Changing it to
ls -Llt configure configure.in | sort
works for me, though I don't know how portable that is
_Mark_ <eichin@cygnus.com>
------------------------------------------------------------------------------
Here is the thing I would like the most;
AC_PKG_WITH(PACKAGE, HELP_STRING, PACKAGE-ROOT, PACKAGE-LIBS, PACKAGE-DEFS,
PACKAGE-CCPFLAGS)
like
AC_PKG_WITH(kerberos,,/usr/local/athena,-lkrb -ldes,[KERBEROS KRB4
CRYPT],include)
AC_PKG_WITH(hesiod,
[if hesiod is not in kerberos-root add --with-hesiod-root=somewhere]
,,-lhesiod,HESIOD,,)
AC_PKG_WITH(glue,,,-lglue,GLUE,,)
AC_PKG_WITH(bind,,/usr/local/bind, [lib/resolv.a lib/lib44bsd.a], ,include)
After the apropriate checks, the existance of the paths, and libs and such
LIBS=$LIBS $PKG-LIBS
DEFS=$DEFS $PKG-DEFS
CPPFLAGS=$PKG-CPPFLAGS $CPPFLAGS
$PKG-ROOT=$PKG-ROOT
The cppflags should reverse the order so that you can have;
-I/usr/local/bind/include -I/usr/local/athena/include
and
-L/usr/local/athena/lib -lkrb -ldes /usr/local/bind/lib/libresolv.a
as order matters.
also an AC_PKG_CHK_HEADER
and an AC_PKG_CHK_FUNCTION
so one can give alternate paths to check for stuff ($PKG-ROOT/lib for
example)
From: Randall Winchester
------------------------------------------------------------------------------
AC_C_CROSS assumes that configure was
called like 'CC=target-gcc; ./configure'. I want to write a package
that has target dependent libraries and host dependent tools. So I
don't like to lose the distinction between CC and [G]CC_FOR_TARGET.
AC_C_CROSS should check for equality of target and host.
It would be great if
GCC_FOR_TARGET
AR_FOR_TARGET
RANLIB_FOR_TARGET
would be set automatically if host != target.
AC_LANG_CROSS_C would be nice too, to check header files
etc. with GCC_FOR_TARGET instead of CC
Here is one simple test
if test "x$host" != "x$target"; then
AC_PROGRAMS_CHECK(AR_FOR_TARGET, $target-ar, $target-ar, ar)
AC_PROGRAMS_CHECK(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib, ranlib)
AC_PROGRAMS_CHECK(GCC_FOR_TARGET, $target-gcc, $target-gcc, gcc)
fi
This could be improved to also look for gcc in PATH, but require the
prefix to contain the target e.g.:
target=m68k-coff -->GCC_FOR_TARGET = /usr/gnu/m68k-coff/bin/gcc
From: nennker@cs.tu-berlin.DE (Axel Nennker)
------------------------------------------------------------------------------
The problem occurs with the following libc functions in SunOS 5.4:
fnmatch glob globfree regcomp regexec regerror regfree wordexp wordfree
It also occurs with a bunch more libposix4 functions that most people
probably aren't worried about yet, e.g. shm_open.
All these functions fail with errno set to ENOSYS (89)
``Operation not applicable''.
Perhaps autoconf should have a
specific macro for fnmatch, another for glob+globfree, another for
regcomp+regexec+regerror+regfree, and another for wordexp+wordfree.
This wouldn't solve the problem in general, but it should work for
Solaris 2.4. Or autoconf could limit itself to fnmatch and regcomp,
the only two functions that I know have been a problem so far.
From Paul Eggert.
------------------------------------------------------------------------------
Make easy macros for checking for X functions and libraries, such as Motif.
------------------------------------------------------------------------------
Testing for ANSI header files (AC_HEADER_STDC) fails under linux when
using the latest libraries (libc-4.6.30, at least libc-4.6.27 works
ok) when LC_CTYPE is set to ISO-8859-1. The islower/toupper test
reports errors.
Anyway, adding a line like
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
to the configure script can solve the problem.
From: tom@vlsivie.tuwien.ac.AT (Thomas Winder)
------------------------------------------------------------------------------
* Test suite: more things to test:
** That the shell scripts produce correct output on some simple data.
** Configuration header files. That autoheader does the right thing,
and so does AC_CONFIG_HEADER when autoconf is run.
------------------------------------------------------------------------------
Autoheader in autoconf-2.4 doesn't produce entries for:
AC_CHECK_TYPE(ssize_t, int)
and it seems like it could easily do so.
In general, it seems to me like autoconf isn't set up to
let me periodically run autoheader, and then include my
"local" tests -- autoheader gets most stuff right, I'd like
to rerun it periodically without losing my local changes
to config.h.in.
One of the things that I need is to know is the type to use
for a fixed size on disk, e.g., what is the system's name
for an unsigned-32-bit integer?
I can use:
AC_CHECK_SIZEOF(unsigned int)
and, in fact, that's what I do. But I still have to build
sets of #if tests to get from there to the name of the type.
From: bostic@bsdi.com (Keith Bostic)
------------------------------------------------------------------------------
There are basically three ways to lock files
lockf, fnctl, flock
I'd be interested in adding a macro to pick the "right one" if you're
interested.
From: Rich Salz <rsalz@osf.org>
------------------------------------------------------------------------------
It is IMHO a bug that `config.status' cannot handle multiple
simultaneous invocations. It should include the process id (`$$' in sh)
as part of the name of any temporary files it creates.
From: fjh@kryten.cs.mu.oz.au (Fergus Henderson)
------------------------------------------------------------------------------
I think it would be useful to be able to have the variables expanded in
AC_CONFIG_HEADER just like AC_OUTPUT allows.
From: Julian Onions <j.onions@nexor.co.uk>
------------------------------------------------------------------------------
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>
------------------------------------------------------------------------------
This is fine, but painfully slow.
Sun Jun 30 04:43:08 1996 Paul Eggert <eggert@twinsun.com>
* acgeneral.m4 (AC_CACHE_SAVE):
Output each variable separately, so that values containing
special characters (e.g. ', \, newline) are handled correctly.
--- acgeneral.m4 1996/11/09 22:20:01 1.211
+++ acgeneral.m4 1996/11/12 04:32:06
@@ -1051,10 +1052,16 @@
dnl Allow a site initialization script to override cache values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-# HP-UX 10.01 sh prints single quotes around any value that contains spaces.
-(set) 2>&1 |
-sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)='*\([^']*\)'*/\1=\${\1='\2'}/p"\
- >> confcache
+ac_vars=`(set) 2>&1 | sed -n '/^[a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*=/s/=.*//p'`
+# Output each variable separately so that values containing
+# special characters (e.g. ', \, newline) are handled correctly.
+for ac_var in $ac_vars; do
+ eval ac_val=\$$ac_var
+ sed -e "s/'/'\\\\''/g" -e "1s/^/$ac_var=\${$ac_var='&/" -e "\$s/\$/'}/" \
+ >> confcache <<EOF
+$ac_val
+EOF
+done
changequote([, ])dnl
if cmp -s $cache_file confcache; then
:
------------------------------------------------------------------------------
Timezone calculations checks.
------------------------------------------------------------------------------
Support different default filesystem layouts, e.g. SVR4, Linux.
Of course, this can be done locally with config.site.
------------------------------------------------------------------------------
Mention automake, libtool, etc. in the autoconf manual.
------------------------------------------------------------------------------
configure-time pasting together of output files from multiple pieces.
Or ac_include?
------------------------------------------------------------------------------
I wonder if it is possible to get the path for X11's app-defaults
directory by autoconf. Moreover, I'd like to have a general way of
accessing imake variables by autoconf, something like
AC_DEFINE(WINE_APP_DEFAULTS, AC_IMAKE_VAR(XAPPLOADDIR))
Slaven Rezic <eserte@cabulja.herceg.de>
------------------------------------------------------------------------------
Whichever AC_LINK_FILES directive comes last is that one that gets
done.
From Jim Meyering
------------------------------------------------------------------------------
Question: at least one common UNIX variant has a "cc" that is old K&R
and "c89" for ANSI C. Is there any reason why AC_PROG_CC couldn't
check for c89 before cc if it can't find gcc?
hpa@yggdrasil.com (H. Peter Anvin)
------------------------------------------------------------------------------