3 Things it might be nice to do someday. I haven't evaluated all of
4 these suggestions... their presence here doesn't imply my endorsement.
8 ------------------------------------------------------------------------------
12 ** --target & AC_ARG_PROGRAM
13 Shouldn't *any* `program' be installed as `$target_alias-program' even
14 if AC_ARG_PROGRAM is not called? That would be much more predictable.
17 ** RedHat's Autoconf page
21 Write a test that checks that it honors the values set by the user.
23 * Autoconf 2.52 or later
26 Integrate other Fortrans etc.
28 ** AC_CHECK_FUNCS and AC_TRY_LINK_FUNC
29 I have still not understood what's the difference between the two
30 which requires to have two different sources: AC_LANG_CALL and
31 AC_LANG_FUNC_LINK_TRY (which names seem to be inappropriate).
32 Wouldn't one be enough?
35 Eve it out of autoconf. Install support for Autotest, M4sugar, and
36 M4sh. Give a means to trace at the same time as we produce the
37 output. autoconf shall use this feature to make autoheader obsolete,
38 and to produce some kind of input file for automake which should no
39 longer *ever* try to parse Autoconf files.
44 ** Document AC_COMPILE_IFELSE, AC_LANG_PROGRAM etc.
45 And make AC_TRY_COMPILE etc. obsolete.
48 Can be introduced even before specializing macros. It just means that
49 specializing macros will call them. OTOH, this doubles our work,
50 since specializing macros will save us from additional typing. But
51 the more powerful autoscan is, the better...
54 Define once for all the hooks they need, any redefinition of
55 AC_PROG_CC etc. is way too dangerous and too limiting. The GCC team
56 certainly has requirements too.
59 Heck, there is nothing after `Deuteronomy'! We're stuck, but we
60 _must_ update the `history' section. Can't go to `New testament', we
61 might hurt feelings? In addition, it means that the Messiah has come,
62 which might be slightly presumptuous :). Still, someone fluent in
63 English should write it.
66 We must find a solution for this macro which needs to find
69 ** Revamp the language support
70 We should probably have a language for C89, and C99. We must give the
71 means to the users to specify some needs over the compilers, and
72 actually look for a good compiler, instead of stopping at the first
75 In fact, the AC_CHECK_PROG macro and variations have proved their
76 limitation: we really need something more powerful and simpler too.
78 We must take into account the specific problems of the GCC team. We
79 must extend AC_CHECK_FUNCS in order to use the headers instead of fake
80 declarations as we currently do. Default headers could be triggered
81 on when C99, but not with the other languages?
83 At the end, we should have a simple macro, such as AC_LANG_COMPILER
84 for instance, which is built over simpler macros. Each language
85 support should come with these simpler macros, but each language
86 should follow the same process.
88 We also need to check the srcext which are supported by the compiler.
89 In fact, this macro is also probably the right place to check for
93 Should be: AC_PROG_CC_ISO? Or even more specific for the ISO version?
94 Should include more tests (e.g., AC_C_CONST etc.)?
97 Defines $interpval. This is not a standard name. Do we want to keep
98 this? Clarify our policy on those names.
101 We should probably install the files which do not depend upon the
102 user, just the Autoconf library files. But conversely autoupdate must
103 be opened to user macros, i.e., for instance libtool itself must be
104 able to say that AM_PROG_LIBTOOL is now AC_PROG_LIBTOOL, and have
105 autoupdate do its job on old configure.in.
108 Decide with the Automake team whether this macro should list only `.c'
109 files, or it should include the `.h' too. For instance the
110 AC_FUNC_GNU_GETOPT macro could provide the three files, likewise for
111 the macro which allows to choose a regex engine.
113 ** Allow --recursive to config.status
114 So that --recheck does not pass --no-recursive to configure.
117 Well, back onto this one :( See Peter for very useful comments on the
118 technology. Should we make this a new language? AC_LANG(ISO C). It
119 would be great to introduce AC_LANG_COMPILER in this release too.
122 Move the specific macro documentation blocks into the source files,
123 and use a doc-block extraction/merge technique to get docuemntation
124 into texi-file. This should help avoid bit-rot in the doc, and make
125 the doc easier to update when people add/change macros. The name
126 "autodoc" is probably already taken so we probably need another one.
128 ------------------------------------------------------------------------------
133 The test for a recent missing doesn't hide the error messages from the
137 The section for old macros is not completely up to date. For
138 instance, there is still AM_PROG_LIBTOOL. Anyway, since autoupdate
139 takes care of them, it is no longer the role of Automake to handle
140 this. Most should be removed.
142 ** AC_EXEXT, AC_OBJEXT
143 Support should be enabled by default.
145 ** Macros now swallowed by Autoconf.
146 error.m4, obstack.m4, ptrdiff.m4, strtod.m4, termios.m4, winsz.m4.
148 ------------------------------------------------------------------------------
153 The error messages for indir and dumpdef are uselessly different. Fix
154 this for translators.
157 F**k! --trace FOO does not catch indir([FOO], $@)!
160 GNU M4 1.4's tracing of builtins is buggy. When run on this input:
164 | define([m4_eval], defn([eval]))
172 | % m4 input.m4 -da -t eval
173 | m4trace: -1- eval(1)
174 | m4trace: -1- m4_eval(2)
175 | m4trace: -1- m4_eval(3)
180 | % m4 input.m4 -da -t m4_eval
183 ------------------------------------------------------------------------------
187 ** Cache name spaces.
188 Cf the discussion with Kaveh. One would like to
190 # Do something that changes the environment
194 in order not to erase the results of a check with another.
197 should depend upon the current language.
200 I think one sad decision in Autoconf was to use white space separated
201 lists for some arguments. For instance AC_CHECK_FUNCS(foo bar). I
202 tend to think that, even if it is not as nice, we should use m4 lists,
203 i.e., AC_CHECK_FUNCS((foo, bar)) in this case. This would ease
204 specializing loops, and more importantly, make them much more robust.
206 A typical example of things that can be performed if we use m4 lists
207 instead of white space separated lists is the case of things that have
208 a space in their names, eg, structures.
210 With the current scheme it would be extremely difficult to loop over
211 AC_CHECK_STRUCTS(struct foo struct bar), while it natural and well
212 defined for m4 lists: AC_CHECK_STRUCTS((struct foo, struct bar)).
214 I know that makes a huge difference in syntax, but a major release
215 should be ready to settle a new world. We *can* provide helping tools
216 for the transition. Considering the benefits, I really think it is
217 worth thinking. --akim
219 ** Forbid shell variables as main arguments
220 The fact that we have to support shell variables as main argument
221 forbids many interesting constructions (specialization are not always
222 possible, equally for AC_REQUIRE'ing macros *with their arguments*).
223 Any loop should be handled by m4 itself, and nothing should be hidden
224 to it. As a consequence, shell variables on the main arguments become
225 useless (the main reason we support shell variables is to allow the
226 loop versions of single argument macros, eg, to go from AC_CHECK_FUNC
227 to AC_CHECK_FUNCS). --akim
229 ** Use the @SUBST@ technology also for headers instead of #undef.
230 This requires that acconfig.h becomes completely obsolete: autoheader
231 should generate all the templates.
233 ** Specializing loops.
234 For instance, make AC_CHECK_FUNC[S] automatically use any particular
235 macros for the listed functions.
236 This requires to obsolete the feature `break' in ACTION-IF, since all
237 the loops are to be handled by m4, not sh.
240 Each macro can potentially come with several faces: of course the
241 configure snippet (AC_foo), a config.h snippet (AH_foo), a system.h
242 snippet (AS_foo), documentation (AD_foo) and, why not, the some C code
243 for instance to replace a function.
245 The motivation for the `faces' is to encapsulate. It is abnormal that
246 once one has a configure macro, then she has to read somewhere to find
247 the piece of system.h to use etc. The macros should come in a
248 self-contained way, or, said it another way, PnP.
250 A major issue is that of specialization. AC_CHECK_HEADER (or another
251 name) for instance, will have as an effect, via system.h to include
252 the header. But if the test for the header is specific, the generic
253 AS_CHECK_HEADER will still be used. Conversely, some headers may not
254 require a specific AC_ tests, but a specialized AS_ macro.
256 ------------------------------------------------------------------------------
258 * Make AC_CHECK_LIB check whether the function is already available
259 before checking for the library. This might involve adding another
260 kind of cache variable to indicate whether a given function needs a
261 given library. The current ac_cv_func_ variables are intended to
262 indicate whether the function is in the default libraries, but
263 actually also take into account whatever value LIBS had when they
266 Isn't this the issue of AC_SEARCH_LIB? --akim
267 How come the list of libraries to browse not an additional parameter
268 of AC_CHECK_FUNC, exactly like for the headers? --akim
270 ------------------------------------------------------------------------------
272 * Add AC_PROG_CC_POSIX to replace the current ad-hoc macros for AIX,
275 ------------------------------------------------------------------------------
277 * Support creating both config.h and DEFS in the same configure.
279 ------------------------------------------------------------------------------
281 * Select the right CONFIG_SHELL automatically (for Ultrix, Lynx especially.)
283 ------------------------------------------------------------------------------
285 * Doc: Centralize information on POSIX, MS-DOS, cross-compiling, and
286 other important topics.
288 ------------------------------------------------------------------------------
290 * Mike Haertel's suggestions:
292 ** Provide header files containing decls for alloca, strings, etc.
296 *** Error messages include instructions for overriding defaults using
299 *** Distribute a config.site corresponding to a hypothetical bare POSIX system with c89.
303 *** 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.
305 ------------------------------------------------------------------------------
307 * Look at user contributed macros:
308 IEEE double precision math
311 ------------------------------------------------------------------------------
313 For AC_TYPE_SIGNAL signal handlers, provide a way for code to know
314 whether to do "return 0" or "return" (int vs void) to avoid compiler
315 warnings. (Roland McGrath)
317 ------------------------------------------------------------------------------
319 In config.status comment, put the host/target/build types, if used.
321 ------------------------------------------------------------------------------
323 on hal.gnu.ai.mit.edu, configure is getting the wrong answer for
324 AC_CHECK_FUNCS(select).
326 The problem here is that there's severe name space pollution: when
327 conftest.c includes <ctype.h> to pick up any __stub macro definitions,
328 it's getting a prototype declaration for select(), which collides
329 with the dummy declaration in conftest.c. (The chain of includes
330 is conftest.c -> <ctype.h> -> <sys/localedef.h> -> <sys/lc_core.h>
331 -> <sys/types.h> -> <sys/select.h>.)
333 #define $ac_func __dummy_$ac_func
336 From: kwzh@gnu.ai.mit.edu (Karl Heuer)
338 The test for the isascii function was failing because that function is
339 also a macro. He proposed that the test file look like this:
341 /* Remove any macro definition. */
343 /* Override any gcc2 internal prototype to avoid an error. */
344 char isascii(); isascii();
348 ------------------------------------------------------------------------------
350 It would be nice if I could (in the Makefile.in files) set
351 the path to config.h. You have config.h ../config.h ../../config.h's all
352 over the place, in the findutils-4.1 directory.
353 From: "Randall S. Winchester" <rsw@eng.umd.edu>
355 ------------------------------------------------------------------------------
357 In a future version (after 2.2), make AC_PROG_{CC,RANLIB,anything else}
361 ------------------------------------------------------------------------------
363 ls -lt configure configure.in | sort
364 doesn't work right if configure.in is from a symlink farm, where the
365 symlink has either a timestamp of its own, or under BSD 4.4, it has
366 the timestamp of the current directory, neither of which
367 helps. Changing it to
368 ls -Llt configure configure.in | sort
369 works for me, though I don't know how portable that is
370 _Mark_ <eichin@cygnus.com>
372 ------------------------------------------------------------------------------
374 Here is the thing I would like the most;
375 AC_PKG_WITH(PACKAGE, HELP_STRING, PACKAGE-ROOT, PACKAGE-LIBS, PACKAGE-DEFS,
379 AC_PKG_WITH(kerberos,,/usr/local/athena,-lkrb -ldes,[KERBEROS KRB4
382 [if hesiod is not in kerberos-root add --with-hesiod-root=somewhere]
384 AC_PKG_WITH(glue,,,-lglue,GLUE,,)
385 AC_PKG_WITH(bind,,/usr/local/bind, [lib/resolv.a lib/lib44bsd.a], ,include)
386 After the apropriate checks, the existance of the paths, and libs and such
389 CPPFLAGS=$PKG-CPPFLAGS $CPPFLAGS
391 The cppflags should reverse the order so that you can have;
392 -I/usr/local/bind/include -I/usr/local/athena/include
394 -L/usr/local/athena/lib -lkrb -ldes /usr/local/bind/lib/libresolv.a
397 also an AC_PKG_CHK_HEADER
398 and an AC_PKG_CHK_FUNCTION
399 so one can give alternate paths to check for stuff ($PKG-ROOT/lib for
401 From: Randall Winchester
403 ------------------------------------------------------------------------------
405 AC_C_CROSS assumes that configure was called like 'CC=target-gcc;
406 ./configure'. I want to write a package that has target dependent
407 libraries and host dependent tools. So I don't like to lose the
408 distinction between CC and [G]CC_FOR_TARGET. AC_C_CROSS should check
409 for equality of target and host.
417 would be set automatically if host != target.
418 AC_LANG_CROSS_C would be nice too, to check header files
419 etc. with GCC_FOR_TARGET instead of CC
421 Here is one simple test
423 if test "x$host" != "x$target"; then
424 AC_PROGRAMS_CHECK(AR_FOR_TARGET, $target-ar, $target-ar, ar)
425 AC_PROGRAMS_CHECK(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib, ranlib)
426 AC_PROGRAMS_CHECK(GCC_FOR_TARGET, $target-gcc, $target-gcc, gcc)
429 This could be improved to also look for gcc in PATH, but require the
430 prefix to contain the target e.g.:
432 target=m68k-coff -->GCC_FOR_TARGET = /usr/gnu/m68k-coff/bin/gcc
434 From: nennker@cs.tu-berlin.DE (Axel Nennker)
436 ------------------------------------------------------------------------------
438 The problem occurs with the following libc functions in SunOS 5.4:
440 fnmatch glob globfree regcomp regexec regerror regfree wordexp wordfree
442 It also occurs with a bunch more libposix4 functions that most people
443 probably aren't worried about yet, e.g. shm_open.
445 All these functions fail with errno set to ENOSYS (89)
446 ``Operation not applicable''.
448 Perhaps Autoconf should have a specific macro for fnmatch, another for
449 glob+globfree, another for regcomp+regexec+regerror+regfree, and
450 another for wordexp+wordfree. This wouldn't solve the problem in
451 general, but it should work for Solaris 2.4. Or Autoconf could limit
452 itself to fnmatch and regcomp, the only two functions that I know have
453 been a problem so far.
457 ------------------------------------------------------------------------------
459 Make easy macros for checking for X functions and libraries, such as Motif.
461 ------------------------------------------------------------------------------
463 There are basically three ways to lock files
465 I'd be interested in adding a macro to pick the "right one" if you're
468 From: Rich Salz <rsalz@osf.org>
470 ------------------------------------------------------------------------------
472 Timezone calculations checks.
474 ------------------------------------------------------------------------------
476 Support different default filesystem layouts, e.g. SVR4, Linux.
477 Of course, this can be done locally with config.site.
479 ------------------------------------------------------------------------------
481 I wonder if it is possible to get the path for X11's app-defaults
482 directory by autoconf. Moreover, I'd like to have a general way of
483 accessing imake variables by autoconf, something like
485 AC_DEFINE(WINE_APP_DEFAULTS, AC_IMAKE_VAR(XAPPLOADDIR))
487 Slaven Rezic <eserte@cabulja.herceg.de>
489 ------------------------------------------------------------------------------
491 Cache consistency checking: ignore cache if environment
492 (CC or PATH) differs.
495 So we need a general mechanism for storing variables' values in the cache,
496 and checking if they are the same after reading the cache. Then we can add
497 to the list of variables as we come across the need. So far we want
498 LD_LIBRARY_PATH and the internal variables for some of (all?) the args.
499 From: roland@gnu.ai.mit.edu (Roland McGrath)
501 Hmm. That list might include LD_LIBRARY_PATH, LD_RUN_PATH (for solaris),
502 and PATH. I can't think of any others so far.
503 From: friedman@splode.com (Noah Friedman)
505 ------------------------------------------------------------------------------
507 Every user running X11 usually has a directory like *X11* in his PATH
508 variable. By replacing bin by include, you can find good places to
509 look for the include files or libraries.
511 From: rcb5@win.tue.nl (Richard Verhoeven)
513 ------------------------------------------------------------------------------
515 In most cases, when autoscan suggests something, using the search or
516 index command into the Info reader for autoconf manual quickly
517 explains me what the test is about. However, for header files and
518 functions, the search might fail, because the test is not of the
519 specific kind. The Autoconf manual should reflect somewhere all
520 header files or functions (non-specific features, generally)
521 triggering autoscan to generate tests, and tell in a few words what is
522 the problem, and the suggested approach for a solution; that is, how
523 one should use the result of testing the feature.
525 From: pinard@iro.umontreal.ca
527 ------------------------------------------------------------------------------
529 It would be nice if the configure script would handle an option such as
530 --x-libraries="/usr/openwin/lib /usr/dt/lib".
532 Rick Boykin <rboykin@cscsun3.larc.nasa.gov>
534 Under Solaris 2.4, the regular X includes and libs and the Motif
535 includes and libs are in different places. The Emacs configure script
536 actually allows dir1:dir2:dir3 --
538 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
539 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
540 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
542 if test "${x_includes}" != NONE && test -n "${x_includes}"; then
543 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
546 ------------------------------------------------------------------------------
548 What messages should be produced by default, if any?
550 Probably only the few most important ones, like which configuration
551 name was used, whether X or Xt are in use, etc. The specific
552 decisions, and progress messages, should be recorded on the terminal
553 only if --verbose is used.
555 --silent just supresses the "checking for...result"
556 messages, not the "creating FOO" messages.
558 I think the default should be to suppress both.
559 From: Richard Stallman <rms@gnu.ai.mit.edu>
561 There is no distinction now between
562 important decisions (we have X) vs minor decisions (we have lstat).
563 However, there are probably only a few things you deem important enough to
564 announce and only those few things will need to be changed.
565 Perhaps config.status could be written with comments saying what was
567 From: Roland McGrath <roland@gnu.ai.mit.edu>
569 ------------------------------------------------------------------------------
571 Another thing I wish for is a macro which figures out which libraries are
572 needed for BSD-sytle sockets. AC_PATH_X already detects this
573 correctly...so it's just a matter of seperating out the socket-related code.
574 From: "Joel N. Weber II" <nemo@koa.iolani.honolulu.hi.us>
576 ------------------------------------------------------------------------------
578 in order to use the AC_CANONICAL_SYSTEM macro, I have to have
579 install-sh somewhere nearby --- why is this? I have no real reason to
580 distribute install-sh, other than that its absence breaks this code.
582 Shouldn't the above loop be looking for config.sub and config.guess?
583 From: jimb@totoro.bio.indiana.edu (Jim Blandy)
585 adding AC_CANONICAL_HOST to my configure.in script caused
586 all sorts of odd/unexplained errors. Obviously, I had to go
587 get copies of config.guess, config.sub and install-sh from the
588 autoconf distribution, but the error messages and autoconf docs
589 didn't explain that very well.
590 From: bostic@bsdi.com (Keith Bostic)
592 ------------------------------------------------------------------------------
594 Perhaps also have AC_TRY_COMPILER try to link an invalid program, and
595 die if the compiler seemed to succeed--in which case it's not usable
596 with autoconf scripts.
598 ------------------------------------------------------------------------------
600 autoreconf doesn't support having (in the same tree) both directories
601 that are parts of a larger package (sharing aclocal.m4 and
602 acconfig.h), and directories that are independent packages (each with
603 their own ac*). It assumes that they are all part of the same
604 package, if you use --localdir, or that each directory is a separate
605 package, if you don't use it.
607 autoreconf should automatically figure out which ac* files to use--the
608 closest ones up the tree from each directory, probably, unless
609 overridden by --localdir.
611 Also, autoreconf recurses on all subdirectories containing a
612 configure.in, not just those given by an AC_CONFIG_SUBDIRS directive.
613 This may not be a problem in practice.
615 ------------------------------------------------------------------------------