From: Theodore Tso Date: Wed, 21 Jun 1995 18:53:39 +0000 (+0000) Subject: Installed autoconf 2.4 in the Kerberos V5 tree. This reverted a few X-Git-Tag: krb5-1.0-beta6~1697 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fc870920890ed363dca83dd96ee76c31df9c246e;p=krb5.git Installed autoconf 2.4 in the Kerberos V5 tree. This reverted a few Krb5-specific changes: tytso Ultrix /bin/sh workarounds (which are supposedly fixed in another way in autoconf 2.4), eichin's change to autoreconf to allow it to work in symlink farms, jgilmore's change acgeneral.m4 to report the update status of the cache better (???). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6116 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/util/autoconf/ChangeLog b/src/util/autoconf/ChangeLog index 8f63900d7..28bcd12f0 100644 --- a/src/util/autoconf/ChangeLog +++ b/src/util/autoconf/ChangeLog @@ -1,26 +1,262 @@ -Fri Mar 17 20:39:08 1995 John Gilmore (gnu at toad.com) +Wed Jun 21 14:48:19 1995 - * acgeneral.m4: Report the update status of the cache better; - show diffs if an unwriteable cache gets updated, for manually - configuring the Mac config.cache. - * configure: Update with this acgeneral.m4. + * Installed autoconf 2.4 in the Kerberos V5 tree. This reverted a + few Krb5-specific changes: tytso Ultrix /bin/sh + workarounds (which are supposedly fixed in another way in + autoconf 2.4), eichin's change to autoreconf to allow it to + work in symlink farms, jgilmore's change acgeneral.m4 to + report the update status of the cache better (???). -Wed Jan 25 19:52:11 1995 Mark Eichin (eichin@tweedledumber.cygnus.com) +Wed Jun 14 23:07:20 1995 David J. MacKenzie - * autoreconf.sh (ls test): use -Llt to sort, in case we're in a - symlink farm. + * Version 2.4. -Mon Dec 19 19:20:58 1994 Theodore Y. Ts'o (tytso at tsx-11) +Sun May 7 08:09:12 1995 David J. MacKenzie - * acgeneral.m4 (AC_DEFINE_UNQUOTED): Workaround more Ultrix sh - brain damage. + * acspecific.m4 (AC_PATH_X_XMKMF): Check for libX11.{so,sl} as + well as .a when seeing whether LIBDIR or USRLIBDIR is right. - * acgeneral.m4 (AC_CACHE_SAVE): Work around yet another really - horrible Ultrix sh bug. The values of variables read in - using the ${var='bar'} construction are displayed using - the "set" command with the high bit set. (Someone should - just haul off the Ultrix sh and have it shot). Fixed - using tr. +Sat May 6 17:29:07 1995 David J. MacKenzie + + * acspecific.m4 (AC_PROG_CPP): If CPP is already set, use that as + the value and set the cache variable to it. + +Mon Mar 27 10:48:36 1995 David J. MacKenzie + + * Version 2.3. + + * acgeneral.m4 (AC_OUTPUT): Add quotes around the echo arguments + in the trap, so backslashes aren't required for multiline input. + From G.Wilford@ee.surrey.ac.uk. + Also use the sed trick when not using a config header file. + +Thu Mar 23 18:02:25 1995 David J. MacKenzie + + * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Put "-c" right + after compiler name. Same for "-o conftest". + + * ifnames.sh (AC_MACRODIR): Default to @datadir@, not a hardcoded + path. + + * Test release 2.2.1. + + * acgeneral.m4 (AC_OUTPUT): Use sed, not tr, so we only remove the + output config header, not the input one too. From + muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig). + (AC_LANG_C): Undo Feb 7 change. According to Roland McGrath, + most compilers require all options but -l... and -o to come first. + + * Makefile.in (uninstall): Don't use $@, since the cd makes it + invalid when srcdir is relative. + +Wed Mar 8 17:05:06 1995 David J. MacKenzie + + * Version 2.2. + +Wed Mar 8 12:44:34 1995 David J. MacKenzie + + * Makefile.in: Follow cd commands with &&, not ;. + From Franc,ois Pinard. + +Tue Mar 7 11:48:19 1995 David J. MacKenzie + + * acspecific.m4 (AC_FUNC_ALLOCA): Keep sh variable namespace clean. + Put newline after AC_DEFINE_UNQUOTED call to avoid Irix syntax error. + +Mon Mar 6 15:07:00 1995 David J. MacKenzie + + * Test release 2.1.3. + + * acspecific.m4 (AC_FUNC_ALLOCA): Replace nested AC_FUNC_CHECK + calls with a loop. + + * acspecific.m4 (AC_FUNC_VPRINTF): Don't check for signal munging. + From Paul Eggert. + + * acgeneral.m4 (AC_CACHE_SAVE): Tell the user whether the cache + changed or not. From gnu@toad.com (John Gilmore). + + * Makefile.in (install-info): Don't cd, to avoid breaking + install-sh references. + +Fri Mar 3 11:41:01 1995 David J. MacKenzie + + * Makefile.in (autoconf.info, standards.info): Use --no-split to + avoid creating filenames > 14 chars. + + * acgeneral.m4 (AC_CHECK_FUNC): Use assert.h, + to avoid protype conflicts from ctype.h (!!) on OSF/1 3.0. + +Sat Feb 25 01:56:57 1995 Roland McGrath + + * acspecific.m4 (AC_C_BIGENDIAN): Check for BYTE_ORDER macro from + sys/param.h before trying the test program which cannot be + cross-compiled. + +Fri Feb 24 20:02:08 1995 Roland McGrath + + * acgeneral.m4 (AC_CHECK_FUNC): Include errno.h instead of ctype.h + in test program. + +Wed Feb 22 18:01:27 1995 David J. MacKenzie + + * Test release 2.1.2. + +Tue Feb 21 13:00:07 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CACHE_VAL): Add extra quotes to work around AIX + 4.1 bug reported by hyc@locus.com (Howard Chu). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for -lelf before -lkvm. + Reported by Kaveh R. Ghazi . + (AC_HEADER_STAT): Check whether S_IFDIR is defined, to work around + ISC bug reported by rick@anasazi.com (Rick Coupland). + + * autoheader.sh: Better solution to @BOTTOM@ printing. + From Paul Eggert. + +Mon Feb 13 18:13:11 1995 Roland McGrath + + * acspecific.m4 (AC_PROG_CC_C_O): Use sed filter to make sure + ${ac_cc} is always a valid shell variable name. + (AC_PROG_MAKE_SET): Remove gratuitous backslashes in checking message. + +Sun Feb 12 18:42:35 1995 Roland McGrath + + * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): Require AC_CANONICAL_BUILD, + so both $build and $host are definitely set before we compare + them. + +Sat Feb 11 04:37:30 1995 Roland McGrath + + * acgeneral.m4 (AC_CHECK_TOOL): Rewritten. Take optional third + arg VALUE-IF-NOT-FOUND. Check for + ${ac_tool_prefix}PROG-TO-CHECK-FOR first. If not found and third + arg given, and ${ac_tool_prefix} is nonempty, check for unadorned + PROG-TO-CHECK-FOR as well. Last choice use VALUE-IF-NOT-FOUND. + +Fri Feb 10 17:45:53 1995 Roland McGrath + + * acgeneral.m4 (AC_OUTPUT): Fix sed command to produce $ac_dots + for subdir configures. + +Thu Feb 9 14:42:20 1995 David J. MacKenzie + + * testsuite/config/unix.exp (autoconf_load): Run the script with + /dev/null as the cache. + + * acgeneral.m4 (AC_CHECK_TOOL_PREFIX, AC_CHECK_TOOL): New macros, + from Roland McGrath. + + * acspecific.m4 (AC_DECL_YYTEXT): Cache the output file root. + (AC_C_INLINE): If the compiler doesn't recognize it, define it + away. Try __inline__ too. From Jim Avera. + (AC_FUNC_GETPGRP): New macro. From Arnold Robbins. + * acconfig.h: New entry for it. + + * configure.in: Check for new awk. + * Makefile.in (editsh): Substitute in AWK. + + * acspecific.m4 (AC_PROG_INSTALL): Allow trailing slashes in PATH + elements. + * acgeneral.m4 (AC_PREFIX_PROGRAM): Ditto. + +Tue Feb 7 11:32:09 1995 David J. MacKenzie + + * acgeneral.m4 (AC_CHECK_LIB, AC_HAVE_LIBRARY): Check and add the new + library before existing libs, not after, in case it uses them. + * acspecific.m4 (AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT, + AC_FUNC_STRFTIME, AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): Ditto. + + * autoheader.sh: Allow @BOTTOM@ to be the first line in + acconfig.h. From iwj10@cus.cam.ac.uk (Ian Jackson). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Add semicolons before + AC_DEFINE. Check for -lkvm before -lutil. Assume it needs setgid + if using -lutil. + + * acgeneral.m4 (ac_compile, ac_link): Put the file name before the + variables, so they can contain -l options. + + * acspecific.m4 (AC_FUNC_WAIT3): Sleep longer for HPUX. + (AC_TYPE_SIGNAL): Declare signal as extern "C" for C++. + + * Makefile.in testsuite/Makefile.in (maintainer-clean): Renamed + from realclean. + + * autoconf.sh (TMPDIR): Inherit from environment, or set if not. + + * acgeneral.m4 (AC_PREFIX_PROGRAM): Say we're checking the prefix. + + * acspecific.m4 (AC_ISC_POSIX): Fix typo. + (AC_PATH_X): Screen out bogus values from imake. + (AC_PROG_LEX): Check for yywrap, not main, in the library. + +Thu Feb 2 11:32:07 1995 David J. MacKenzie + + * acconfig.h (__CHAR_UNSIGNED): Protect with #ifndef. + From marcus@ee.pdx.edu (Marcus Daniels). + + * acgeneral.m4 (AC_CACHE_SAVE): Workaround Ultrix and 4.3BSD sh + bug in setting the high bit on variable values. + From Ken Raeburn. + (AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS): Ignore initial "./" to + avoid messing up the dot-dot counts. + (AC_OUTPUT_SUBDIRS): Pass INSTALL magic to subdirectories. + From Karl Berry. + + * ifnames.sh: Speed up drastically by folding 3N+2 processes into 2. + From Paul Eggert. + +Wed Feb 1 11:58:27 1995 David J. MacKenzie + + * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Add additional + quoting for internal consistency. + From junio@twinsun.COM (Jun Hamano). + + * acspecific.m4 (AC_PATH_XTRA): R6 function name was wrong. + From Karl Berry. + (AC_C_CROSS): Fix typo in cache var name. + From tgl@sss.pgh.pa.us (Tom Lane). + (AC_PROG_MAKE_SET): Change / in the make program name into _ so it + can be part of a shell variable name. + (AC_DECL_YYTEXT): Fix arguments to AC_TRY_LINK. + From interran@uluru.stanford.edu (John Interrante). + + * acgeneral.m4 (AC_CHECK_SIZEOF): If test program fails, set the + variable to 0 as the doc sez. + From eisen@cc.gatech.edu (Greg Eisenhauer). + + * acgeneral.m4, acspecific.m4: Remove *.core and core.* as well as + core, for recent BSD's. + + * acspecific.m4 (AC_SYS_INTERPRETER): Use `#! /' instead of `#!/'. + * acgeneral.m4 (AC_INIT_BINSH): Likewise. + * All scripts: likewise. + From woods@kuma.web.net (Greg A. Woods). + + * acgeneral.m4 (AC_INIT_PREPARE): Use fd 6 instead of 4, to + prevent a conflict on the Kubota Titan. From + muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig). + + * autoconf.sh: Use a more concise syntax to set variables. + From Karl Berry. + + * acspecific.m4 (AC_FUNC_WAIT3): Check page fault measurements to + catch Linux. From tobias@server.et-inf.fho-emden.de (Peter Tobias). + + * acgeneral.m4 (AC_OUTPUT): If running config.status + fails, exit with a nonzero status. From Ken Raeburn. + +Tue Dec 6 19:07:07 1994 Roland McGrath + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Use elf_begin in -lelf + check, not elf_read. + +Mon Nov 7 18:18:11 1994 Roland McGrath + + * acspecific.m4 (AC_PROG_MAKE_SET): Fix msg; $MAKE is not useful + Make syntax. Fri Nov 4 09:08:33 1994 David J. MacKenzie diff --git a/src/util/autoconf/INSTALL b/src/util/autoconf/INSTALL index 0338fbce2..95d84c820 100644 --- a/src/util/autoconf/INSTALL +++ b/src/util/autoconf/INSTALL @@ -43,9 +43,13 @@ The simplest way to compile this package is: documentation. 5. You can remove the program binaries and object files from the - source directory by typing `make clean'. To also remove the files - that `configure' created (so you can compile the package for a - different kind of computer), type `make distclean'. + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. Compilers and Options ===================== @@ -60,17 +64,22 @@ this: Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure -Using a Different Build Directory -================================= +Compiling For Multiple Architectures +==================================== - You can compile the package in a different directory from the one -containing the source code. Doing so allows you to compile it on more -than one kind of computer at the same time. To do this, you must use a -version of `make' that supports the `VPATH' variable, such as GNU -`make'. `cd' to the directory where you want the object files and -executables to go and run the `configure' script. `configure' -automatically checks for the source code in the directory that -`configure' is in and in `..'. + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. Installation Names ================== @@ -143,9 +152,9 @@ Operation Controls operates. `--cache-file=FILE' - Save the results of the tests in FILE instead of `config.cache'. - Set FILE to `/dev/null' to disable caching, for debugging - `configure'. + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. `--help' Print a summary of the options to `configure', and exit. diff --git a/src/util/autoconf/Makefile.in b/src/util/autoconf/Makefile.in index e7aab1db8..4066ce47c 100644 --- a/src/util/autoconf/Makefile.in +++ b/src/util/autoconf/Makefile.in @@ -26,6 +26,7 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi M4 = @M4@ +AWK = @AWK@ PERL = @PERL@ # Programs that are always installed. @@ -70,7 +71,8 @@ DISTFILES = COPYING ChangeLog ChangeLog.1 INSTALL \ testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \ standards.texi make-stds.texi standards.info* -editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''M4''@,$(M4),g' +editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e \ + 's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g' editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g' all: ${SCRIPTS} @@ -88,15 +90,16 @@ all: ${SCRIPTS} info: autoconf.info @standards_info@ INSTALL +# Use --no-split to avoid creating filenames > 14 chars. autoconf.info: autoconf.texi install.texi - $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --output=$@ + $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@ INSTALL: install.texi $(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \ --no-headers --no-validate standards.info: standards.texi make-stds.texi - $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --output=$@ + $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@ dvi: autoconf.dvi @standards_dvi@ @@ -140,53 +143,57 @@ install: all $(M4FILES) acconfig.h installdirs install-info done; \ else :; fi +# Don't cd, to avoid breaking install-sh references. install-info: info installdirs - -test -f autoconf.info || cd $(srcdir); \ - for i in autoconf.info*; do \ - $(INSTALL_DATA) $$i $(infodir)/$$i; \ - done - -test -f standards.info || cd $(srcdir); \ - for i in standards.info*; do \ - $(INSTALL_DATA) $$i $(infodir)/$$i; \ - done + if test -f autoconf.info; then \ + for i in *.info*; do \ + $(INSTALL_DATA) $$i $(infodir)/$$i; \ + done; \ + else \ + for i in $(srcdir)/*.info*; do \ + $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \ + done; \ + fi uninstall: for p in $(SCRIPTS); do \ rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ done rm -fr $(acdatadir) - cd $(infodir); rm -f autoconf.info* + cd $(infodir) && rm -f autoconf.info* if test -f standards.info || test -f $(srcdir)/standards.info; \ - then cd $(infodir); rm -f standards.info*; fi + then cd $(infodir) && rm -f standards.info*; fi ${srcdir}/configure: configure.in $(M4FILES) - cd $(srcdir); \ - rm -f $@ $@.tmp; \ - $(M4) autoconf.m4 configure.in > $@.tmp && \ - chmod +x $@.tmp && mv $@.tmp $@ + cd $(srcdir) && \ + rm -f configure configure.tmp && \ + $(M4) autoconf.m4 configure.in > configure.tmp && \ + chmod +x configure.tmp && mv configure.tmp configure Makefile: Makefile.in config.status ./config.status config.status: configure ./config.status --recheck -clean mostlyclean distclean realclean:: +maintainer-clean:: + @echo "This command is intended for maintainers to use;" + @echo "rebuilding the deleted files requires makeinfo." + rm -f TAGS *.info* INSTALL + +clean mostlyclean distclean maintainer-clean:: for dir in $(SUBDIRS); do \ echo making $@ in $$dir ; \ - (cd $$dir; $(MAKE) $@) ; \ + (cd $$dir && $(MAKE) $@) ; \ done -clean mostlyclean distclean realclean:: +clean mostlyclean distclean maintainer-clean:: rm -f $(SCRIPTS) *.tmp rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas -distclean realclean:: +distclean maintainer-clean:: rm -f Makefile config.status config.cache config.log -realclean:: - rm -f TAGS *.info* INSTALL - TAGS: etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi diff --git a/src/util/autoconf/NEWS b/src/util/autoconf/NEWS index cb226556c..b5dd50c3a 100644 --- a/src/util/autoconf/NEWS +++ b/src/util/autoconf/NEWS @@ -1,3 +1,22 @@ +Major changes in release 2.4: + +* Fix a few bugs found by Emacs testers. + +Major changes in release 2.3: + +* Fix the cleanup trap in several ways. +* Handle C compilers that are picky about option placement. +* ifnames gets the version number from the right directory. + +Major changes in release 2.2: + +* The ifnames utility is much faster but requires a "new awk" interpreter. +* AC_CHECK_LIB and AC_HAVE_LIBRARY check and add the new + library before existing libs, not after, in case it uses them. +* New macros: AC_FUNC_GETPGRP, AC_CHECK_TOOL. +* Lots of bug fixes. +* Many additions to the TODO file :-) + Major changes in release 2.1: * Fix C++ problems. @@ -12,7 +31,7 @@ Thanks to everybody who's submitted changes and additions to Autoconf! I've incorporated many of them, and am still considering others for future releases -- but I didn't want to postpone this release indefinitely. -Caution: don't indiscriminantly rebuild configure scripts with +Caution: don't indiscriminately rebuild configure scripts with Autoconf version 2. Some configure.in files need minor adjustments to work with it; the documentation has a chapter on upgrading. A few configure.in files, including those for GNU Emacs and the GNU C diff --git a/src/util/autoconf/TODO b/src/util/autoconf/TODO index 89c32295d..0f757e0d9 100644 --- a/src/util/autoconf/TODO +++ b/src/util/autoconf/TODO @@ -1,6 +1,8 @@ -*- outline -*- -Things it might be nice to do someday: +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 ------------------------------------------------------------------------------ @@ -66,7 +68,7 @@ Things it might be nice to do someday: * Mike Haertel's suggestions: -** Provide files containing decls for alloca, strings, etc. +** Provide header files containing decls for alloca, strings, etc. ** Cross compiling: @@ -89,8 +91,275 @@ in a dnl comment. (Seems to be hard.) ------------------------------------------------------------------------------ -* Look at user contributed macros: prototypes, IEEE double precision math, -shared libraries, various other things. +* Look at user contributed macros: + prototypes + IEEE double precision math + shared libraries + +------------------------------------------------------------------------------ + +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. + +------------------------------------------------------------------------------ + +Look at contributions: + ac_include (Karl Berry) + aclocal.h tom@basil.icce.rug.NL (Tom R.Hageman) + +------------------------------------------------------------------------------ + + 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" + +------------------------------------------------------------------------------ + +I would find it a wonderful boon if config.log contained not just the +output from the compilers, but also the invocation. Almost all +the errors I've found are due to the wrong options getting passed for +one reason or another. + +Saving the input test file(s) that failed would be useful, too. +From: "K. Berry" + +------------------------------------------------------------------------------ + +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 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 -> -> -> +-> -> .) + + #define $ac_func __dummy_$ac_func + #include + #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" + +------------------------------------------------------------------------------ + +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" + +------------------------------------------------------------------------------ + +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 it's 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_ + +------------------------------------------------------------------------------ + +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 dependend libraries and host dependend tools. So I +dont'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. + +------------------------------------------------------------------------------ + +We probably shouldn't cache a path for INSTALL within a source +directory, because that will break other packages using the cache if +that directory is removed. + +------------------------------------------------------------------------------ + +Document this trick: + +>> Half my time these days seems to be spent porting +>> configure.in files to new OS releases.) Alas, there doesn't seem to +>> be any way to turn off caching (with a configure.in directive). + +define([AC_CACHE_LOAD], )dnl +define([AC_CACHE_SAVE], )dnl +AC_INIT(whatever) + ... rest of configure.in ... + +------------------------------------------------------------------------------ + +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) + +------------------------------------------------------------------------------ + +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) + +------------------------------------------------------------------------------ + +Using the macro AC_CHECK_LIB, if the library name contains a dot (which is +the case of the library complib.sgimath on Irix 5.x) a syntax error occurs +because the corresponding cache variable name contains a dot. +Should dots be converted to underlines in variable names by autoconf? +From: Frederic.DEvernay@sophia.inria.fr (Frederic Devernay) ------------------------------------------------------------------------------ diff --git a/src/util/autoconf/acconfig.h b/src/util/autoconf/acconfig.h index 801a8ac8b..abbb64245 100644 --- a/src/util/autoconf/acconfig.h +++ b/src/util/autoconf/acconfig.h @@ -25,7 +25,9 @@ #undef C_ALLOCA /* Define if type char is unsigned and you are not using gcc. */ +#ifndef __CHAR_UNSIGNED__ #undef __CHAR_UNSIGNED__ +#endif /* Define if the closedir function returns void instead of int. */ #undef CLOSEDIR_VOID @@ -50,6 +52,9 @@ /* Define if the `getloadavg' function needs to be run setuid or setgid. */ #undef GETLOADAVG_PRIVILEGED +/* Define if the `getpgrp' function takes no argument. */ +#undef GETPGRP_VOID + /* Define to `int' if doesn't define. */ #undef gid_t diff --git a/src/util/autoconf/acgeneral.m4 b/src/util/autoconf/acgeneral.m4 index 102b0bdd0..2ed88cdf5 100644 --- a/src/util/autoconf/acgeneral.m4 +++ b/src/util/autoconf/acgeneral.m4 @@ -1,7 +1,7 @@ dnl Parameterized macros. dnl Requires GNU m4. dnl This file is part of Autoconf. -dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +dnl Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -51,7 +51,7 @@ dnl divert(-1)dnl Throw away output until AC_INIT is called. changequote([, ]) -define(AC_ACVERSION, 2.1) +define(AC_ACVERSION, 2.4) dnl Some old m4's don't support m4exit. But they provide dnl equivalent functionality by core dumping because of the @@ -73,7 +73,7 @@ dnl ### Defining macros dnl m4 output diversions. We let m4 output them all in order at the end, dnl except that we explicitly undivert AC_DIVERSION_SED. -dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #!/bin/sh line +dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings define(AC_DIVERSION_INIT, 2)dnl initialization code define(AC_DIVERSION_SED, 3)dnl variable substitutions in config.status @@ -448,7 +448,7 @@ dnl Try to have only one #! line, so the script doesn't look funny dnl for users of AC_REVISION. dnl AC_INIT_BINSH() AC_DEFUN(AC_INIT_BINSH, -[#!/bin/sh +[#! /bin/sh ]) dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR) @@ -466,14 +466,15 @@ AC_DIVERT_POP()dnl to NORMAL dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR) AC_DEFUN(AC_INIT_PREPARE, -[trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 +[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: -# 0 unused; standard input +# 0 standard input # 1 file creation # 2 errors and warnings -# 3 unused; some systems may open it to /dev/tty -define(AC_FD_MSG, 4)dnl +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +define(AC_FD_MSG, 6)dnl [#] AC_FD_MSG checking for... messages and results define(AC_FD_CC, 5)dnl [#] AC_FD_CC compiler messages saved in config.log @@ -581,8 +582,8 @@ AC_DEFUN(AC_ARG_ENABLE, ac_help="$ac_help [$2]" AC_DIVERT_POP()dnl -[#] Check whether --enable-$1 or --disable-$1 was given. -enableval="[$enable_]patsubst($1, -, _)" +[#] Check whether --enable-[$1] or --disable-[$1] was given. +enableval="[$enable_]patsubst([$1], -, _)" if test -n "$enableval"; then ifelse([$3], , :, [$3]) ifelse([$4], , , [else @@ -606,8 +607,8 @@ AC_DEFUN(AC_ARG_WITH, ac_help="$ac_help [$2]" AC_DIVERT_POP()dnl -[#] Check whether --with-$1 or --without-$1 was given. -withval="[$with_]patsubst($1, -, _)" +[#] Check whether --with-[$1] or --without-[$1] was given. +withval="[$with_]patsubst([$1], -, _)" if test -n "$withval"; then ifelse([$3], , :, [$3]) ifelse([$4], , , [else @@ -754,7 +755,8 @@ AC_CANONICAL_TARGET AC_CANONICAL_BUILD test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && program_prefix=${target_alias}- + NONENONEs,x,x, && + program_prefix=${target_alias}- ]) dnl Subroutines of AC_CANONICAL_SYSTEM. @@ -769,6 +771,7 @@ fi AC_MSG_CHECKING(host system type) +dnl Set host_alias. host_alias=$host case "$host_alias" in NONE) @@ -781,6 +784,7 @@ NONE) esac ;; esac +dnl Set the other host vars. host=`$ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` @@ -798,6 +802,7 @@ AC_DEFUN(AC_CANONICAL_TARGET, [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_MSG_CHECKING(target system type) +dnl Set target_alias. target_alias=$target case "$target_alias" in NONE) @@ -807,6 +812,7 @@ NONE) esac ;; esac +dnl Set the other target vars. target=`$ac_config_sub $target_alias` target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` @@ -824,6 +830,7 @@ AC_DEFUN(AC_CANONICAL_BUILD, [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_MSG_CHECKING(build system type) +dnl Set build_alias. build_alias=$build case "$build_alias" in NONE) @@ -833,6 +840,7 @@ NONE) esac ;; esac +dnl Set the other build vars. build=`$ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` @@ -881,7 +889,7 @@ fi dnl AC_CACHE_SAVE() define(AC_CACHE_SAVE, -[cat > $cache_file.$$ <<\EOF +[cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. @@ -899,25 +907,23 @@ define(AC_CACHE_SAVE, EOF changequote(, )dnl dnl Allow a site initialization script to override cache values. -# Ultrix sh set writes to stderr and can't be redirected directly. -# Ultrix sh set also returns variables that were read in from the config file -# with their high bit set. -(set) 2>&1 | tr '\201-\377' '\001-\177' | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \ - >> $cache_file.$$ +# 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. +(set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache changequote([, ])dnl -if cmp -s $cache_file $cache_file.$$; then - true +if cmp -s $cache_file confcache; then + : else if test -w $cache_file; then echo "updating cache $cache_file" - cat $cache_file.$$ > $cache_file + cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" - diff $cache_file $cache_file.$$ fi fi -rm -f $cache_file.$$ +rm -f confcache ]) dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved. @@ -926,7 +932,8 @@ define(AC_CACHE_VAL, [dnl We used to use the below line, but it fails if the 1st arg is a dnl shell variable, so we need the eval. dnl if test "${$1+set}" = set; then -if eval "test \"`echo '${'$1'+set}'`\" = set"; then +dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion"). +if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG else $2 @@ -946,9 +953,8 @@ EOF ]) dnl Similar, but perform shell substitutions $ ` \ once on VALUE. -dnl The 'tr' is to fix more Ultrix sh brain damage define(AC_DEFINE_UNQUOTED, -[cat <> confdefs.h +[cat >> confdefs.h <>)dnl define(<>, translit($1, [a-z], [A-Z]))dnl changequote([, ])dnl +AC_MSG_CHECKING([for prefix by ]) AC_PATH_PROG(AC_VAR_NAME, $1) changequote(<<, >>)dnl if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then - prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'` + prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` changequote([, ])dnl fi fi @@ -1192,7 +1224,7 @@ AC_DEFUN(AC_CHECK_LIB, [AC_MSG_CHECKING([for -l$1]) AC_CACHE_VAL(ac_cv_lib_$1, [ac_save_LIBS="$LIBS" -LIBS="$LIBS -l$1 $5" +LIBS="-l$1 $5 $LIBS" AC_TRY_LINK(, [$2()], eval "ac_cv_lib_$1=yes", eval "ac_cv_lib_$1=no")dnl LIBS="$ac_save_LIBS" ])dnl @@ -1203,7 +1235,7 @@ if eval "test \"`echo '$ac_cv_lib_'$1`\" = yes"; then ac_tr_lib=HAVE_LIB`echo $1 | tr '[a-z]' '[A-Z]'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_lib) - LIBS="$LIBS -l$1" + LIBS="-l$1 $LIBS" ], [$3]) else AC_MSG_RESULT(no) @@ -1224,7 +1256,7 @@ changequote([, ])dnl AC_MSG_CHECKING([for -l[]AC_LIB_NAME]) AC_CACHE_VAL(AC_CV_NAME, [ac_save_LIBS="$LIBS" -LIBS="$LIBS -l[]AC_LIB_NAME[] $4" +LIBS="-l[]AC_LIB_NAME[] $4 $LIBS" AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)dnl LIBS="$ac_save_LIBS" ])dnl @@ -1232,7 +1264,7 @@ AC_MSG_RESULT($AC_CV_NAME) if test "$AC_CV_NAME" = yes; then ifelse([$2], , [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z])) - LIBS="$LIBS -l[]AC_LIB_NAME[]" + LIBS="-l[]AC_LIB_NAME[] $LIBS" ], [$2]) ifelse([$3], , , [else $3 @@ -1445,7 +1477,12 @@ AC_DEFUN(AC_CHECK_FUNC, [AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_func_$1, [AC_TRY_LINK( -[#include /* Arbitrary system header to define __stub macros. */ +dnl Don't include because on OSF/1 3.0 it includes +dnl which includes which contains a prototype for +dnl select. Similarly for bzero. +[/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $1(); below. */ +#include /* Override any gcc2 internal prototype to avoid an error. */ ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus extern "C" @@ -1514,7 +1551,7 @@ main() if (!f) exit(1); fprintf(f, "%d\n", sizeof($1)); exit(0); -}], AC_CV_NAME=`cat conftestval`)])dnl +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0)])dnl AC_MSG_RESULT($AC_CV_NAME) AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME) undefine([AC_TYPE_NAME])dnl @@ -1568,7 +1605,7 @@ dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) define(AC_OUTPUT, [trap '' 1 2 15 AC_CACHE_SAVE -trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. @@ -1593,7 +1630,7 @@ ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()]) echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS <>)dnl +ifdef(<>, +<>, +<>) +changequote([, ])dnl AC_OUTPUT_FILES($1) ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl @@ -1646,7 +1685,7 @@ exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 dnl config.status should not do recursion. ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl ])dnl @@ -1714,7 +1753,7 @@ changequote([, ])dnl if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" - ac_dir_suffix="/$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. changequote(, )dnl ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` @@ -1903,7 +1942,7 @@ changequote([, ])dnl if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then # The dest file is in a subdirectory. test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir" - ac_dest_dir_suffix="/$ac_dest_dir" + ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dest_dir_suffix. changequote(, )dnl ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'` @@ -1928,7 +1967,8 @@ changequote([, ])dnl done ]) -This is a subroutine of AC_OUTPUT. It is called after running config.status. +dnl This is a subroutine of AC_OUTPUT. +dnl It is called after running config.status. dnl AC_OUTPUT_SUBDIRS(DIRECTORY...) define(AC_OUTPUT_SUBDIRS, [ @@ -2005,13 +2045,21 @@ if test "$no_recursion" != yes; then # Make the cache file name correct relative to the subdirectory. changequote(, )dnl # A "../" for each directory in /$ac_config_dir. - ac_dots=`echo /$ac_config_dir|sed 's%/[^/]*%../%g'` + ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` changequote([, ])dnl case "$cache_file" in /*) ac_sub_cache_file=$cache_file ;; *) # Relative path. ac_sub_cache_file="$ac_dots$cache_file" ;; esac +ifdef([AC_PROVIDE_AC_PROG_INSTALL], + [ case "$ac_given_INSTALL" in +changequote(, )dnl + [/$]*) INSTALL="$ac_given_INSTALL" ;; +changequote([, ])dnl + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac +])dnl echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir" # The eval makes quoting arguments work. diff --git a/src/util/autoconf/acspecific.m4 b/src/util/autoconf/acspecific.m4 index 3c07bc921..e48e42f46 100644 --- a/src/util/autoconf/acspecific.m4 +++ b/src/util/autoconf/acspecific.m4 @@ -1,6 +1,6 @@ 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 Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -186,7 +186,10 @@ AC_DEFUN(AC_PROG_CC_C_O, else AC_MSG_CHECKING(whether cc understands -c and -o together) fi -set dummy $CC; ac_cc=[$]2 +set dummy $CC; ac_cc="`echo [$]2 | +changequote(, )dnl + sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" +changequote([, ])dnl AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, [eval ac_cv_prog_cc_${ac_cc}_c_o=no echo 'foo(){}' > conftest.c @@ -220,7 +223,7 @@ fi dnl Define SET_MAKE to set ${MAKE} if make doesn't. AC_DEFUN(AC_PROG_MAKE_SET, -[AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE) +[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE}) set dummy ${MAKE-make}; ac_make=[$]2 AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, [cat > conftestmake <<\EOF @@ -250,7 +253,7 @@ AC_SUBST([SET_MAKE])dnl AC_DEFUN(AC_PROG_RANLIB, [AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)]) -dnl Check for mawk first since it's said to be faster. +dnl Check for mawk first since it's generally faster. AC_DEFUN(AC_PROG_AWK, [AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )]) @@ -278,8 +281,10 @@ Syntax Error], , AC_TRY_CPP([#include Syntax Error], , CPP=/lib/cpp)) ac_cv_prog_CPP="$CPP"])dnl + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" fi -CPP="$ac_cv_prog_CPP" AC_MSG_RESULT($CPP) AC_SUBST(CPP)dnl ]) @@ -313,42 +318,48 @@ then flex*) ac_lib=fl ;; *) ac_lib=l ;; esac - AC_CHECK_LIB($ac_lib, main, LEXLIB="-l$ac_lib") + AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib") fi AC_SUBST(LEXLIB)]) +dnl Check if lex declares yytext as a char * by default, not a char[]. +undefine([AC_DECL_YYTEXT]) AC_DEFUN(AC_DECL_YYTEXT, [AC_REQUIRE_CPP()dnl AC_REQUIRE([AC_PROG_LEX])dnl -AC_MSG_CHECKING(for yytext declaration) -AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer, -[# POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -# -# The minimal lex program is just a single line: %%. But some broken lexes +AC_MSG_CHECKING(lex output file root) +AC_CACHE_VAL(ac_cv_prog_lex_root, +[# The minimal lex program is just a single line: %%. But some broken lexes # (Solaris, I think it was) want two %% lines, so accommodate them. -ac_cv_prog_lex_yytext_pointer=no - echo '%% +echo '%% %%' | $LEX if test -f lex.yy.c; then - LEX_OUTPUT_ROOT=lex.yy + ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then - LEX_OUTPUT_ROOT=lexyy + ac_cv_prog_lex_root=lexyy else - AC_MSG_ERROR(cannot find output from $LEX, giving up) -fi -echo 'extern char *yytext; main () { exit (0); }' >>$LEX_OUTPUT_ROOT.c + AC_MSG_ERROR(cannot find output from $LEX; giving up) +fi])dnl +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root +AC_MSG_RESULT($ac_cv_prog_lex_root) +AC_SUBST(LEX_OUTPUT_ROOT)dnl + +AC_MSG_CHECKING(whether yytext is a pointer) +AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer, +[# POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c ac_save_LIBS="$LIBS" LIBS="$LIBS $LEXLIB" -AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, ac_cv_prog_lex_yytext_pointer=yes) +AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes) LIBS="$ac_save_LIBS" rm -f "${LEX_OUTPUT_ROOT}.c"])dnl AC_MSG_RESULT($ac_cv_prog_lex_yytext_pointer) if test $ac_cv_prog_lex_yytext_pointer = yes; then AC_DEFINE(YYTEXT_POINTER) fi -AC_SUBST(LEX_OUTPUT_ROOT)dnl ]) AC_DEFUN(AC_PROG_INSTALL, @@ -368,8 +379,9 @@ if test -z "$INSTALL"; then AC_CACHE_VAL(ac_cv_path_install, [ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do - case "$ac_dir" in - ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;; + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. for ac_prog in ginstall installbsd scoinst install; do @@ -390,6 +402,9 @@ AC_CACHE_VAL(ac_cv_path_install, done IFS="$ac_save_ifs" # As a last resort, use the slow shell script. +dnl FIXME We probably shouldn't cache a path within a source directory, +dnl because that will break other packages using the cache if +dnl that directory is removed. test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"])dnl INSTALL="$ac_cv_path_install" fi @@ -586,24 +601,26 @@ AC_DEFUN(AC_HEADER_STAT, AC_CACHE_VAL(ac_cv_header_stat_broken, [AC_EGREP_CPP([You lose], [#include #include -#ifdef S_ISBLK + +#if defined(S_ISBLK) && defined(S_IFDIR) # if S_ISBLK (S_IFDIR) You lose. # endif -# ifdef S_IFCHR -# if S_ISBLK (S_IFCHR) +#endif + +#if defined(S_ISBLK) && defined(S_IFCHR) +# if S_ISBLK (S_IFCHR) You lose. -# endif # endif #endif -#ifdef S_ISLNK +#if defined(S_ISLNK) && defined(S_IFREG) # if S_ISLNK (S_IFREG) You lose. # endif #endif -#ifdef S_ISSOCK +#if defined(S_ISSOCK) && defined(S_IFREG) # if S_ISSOCK (S_IFREG) You lose. # endif @@ -730,7 +747,10 @@ AC_CACHE_VAL(ac_cv_type_signal, #ifdef signal #undef signal #endif -extern void (*signal ()) ();], +#ifdef __cplusplus +extern "C" +#endif +void (*signal ()) ();], [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl AC_MSG_RESULT($ac_cv_type_signal) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) @@ -835,6 +855,69 @@ if test $ac_cv_func_mmap = yes; then fi ]) +AC_DEFUN(AC_FUNC_GETPGRP, +[AC_MSG_CHECKING(whether getpgrp takes no argument) +AC_CACHE_VAL(ac_cv_func_getpgrp_void, +[AC_TRY_RUN([ +/* + * If this system has a BSD-style getpgrp(), + * which takes a pid argument, exit unsuccessfully. + * + * Snarfed from Chet Ramey's bash pgrp.c test program + */ +#include +#include + +int pid; +int pg1, pg2, pg3, pg4; +int ng, np, s, child; + +main() +{ + pid = getpid(); + pg1 = getpgrp(0); + pg2 = getpgrp(); + pg3 = getpgrp(pid); + pg4 = getpgrp(1); + + /* + * If all of these values are the same, it's pretty sure that + * we're on a system that ignores getpgrp's first argument. + */ + if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3) + exit(0); + + child = fork(); + if (child < 0) + exit(1); + else if (child == 0) { + np = getpid(); + /* + * If this is Sys V, this will not work; pgrp will be + * set to np because setpgrp just changes a pgrp to be + * the same as the pid. + */ + setpgrp(np, pg1); + ng = getpgrp(0); /* Same result for Sys V and BSD */ + if (ng == pg1) { + exit(1); + } else { + exit(0); + } + } else { + wait(&s); + exit(s>>8); + } +} +], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no, + AC_MSG_ERROR(cannot check getpgrp if cross compiling)) +]) +AC_MSG_RESULT($ac_cv_func_getpgrp_void) +if test $ac_cv_func_getpgrp_void = yes; then + AC_DEFINE(GETPGRP_VOID) +fi +]) + AC_DEFUN(AC_FUNC_VPRINTF, [AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF)) if test "$ac_cv_func_vprintf" != yes; then @@ -847,19 +930,17 @@ AC_DEFUN(AC_FUNC_VFORK, AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) AC_MSG_CHECKING(for working vfork) AC_CACHE_VAL(ac_cv_func_vfork, -[AC_REQUIRE([AC_TYPE_SIGNAL]) -AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ +[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ #include #include #include -#include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_VFORK_H #include #endif -/* On sparc systems, changes by the child to local and incoming +/* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . @@ -884,16 +965,12 @@ sparc_address_test (arg) int arg; } } } -static int signalled; -static RETSIGTYPE catch (s) int s; { signalled = 1; } main() { pid_t parent = getpid (); pid_t child; sparc_address_test (); - signal (SIGINT, catch); - child = vfork (); if (child == 0) { @@ -901,7 +978,7 @@ main() { This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for - gcc 1.40.3 on a sparc, but we use 8 to be safe. + gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. @@ -916,12 +993,6 @@ main() { || p != p5 || p != p6 || p != p7) _exit(1); - /* On some systems (e.g. SunOS 5.2), if the parent is catching - a signal, the child ignores the signal before execing, - and the parent later receives that signal, the parent dumps core. - Test for this by ignoring SIGINT in the child. */ - signal (SIGINT, SIG_IGN); - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, @@ -944,10 +1015,6 @@ main() { /* Did the vfork/compiler bug occur? */ || parent != getpid() - /* Did the signal handling bug occur? */ - || kill(parent, SIGINT) != 0 - || signalled != 1 - /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); @@ -973,10 +1040,11 @@ main() { /* Use a field that we can force nonzero -- voluntary context switches. For systems like NeXT and OSF/1 that don't set it, - also use the system CPU time. */ + also use the system CPU time. And page faults (I/O) for Linux. */ r.ru_nvcsw = 0; r.ru_stime.tv_sec = 0; r.ru_stime.tv_usec = 0; + r.ru_majflt = r.ru_minflt = 0; switch (fork()) { case 0: /* Child. */ sleep(1); /* Give up the CPU. */ @@ -984,8 +1052,8 @@ main() { case -1: _exit(0); /* What can we do? */ default: /* Parent. */ wait3(&i, 0, &r); - sleep(1); /* Avoid "text file busy" from rm on fast HP-UX machines. */ - exit(r.ru_nvcsw == 0 + sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */ + exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); } }], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])dnl @@ -1052,9 +1120,10 @@ wenotbecray ], ac_cv_os_cray=yes, ac_cv_os_cray=no)])dnl AC_MSG_RESULT($ac_cv_os_cray) if test $ac_cv_os_cray = yes; then -AC_CHECK_FUNC(_getb67, AC_DEFINE(CRAY_STACKSEG_END, _getb67), -AC_CHECK_FUNC(GETB67, AC_DEFINE(CRAY_STACKSEG_END, GETB67), -AC_CHECK_FUNC(getb67, AC_DEFINE(CRAY_STACKSEG_END, getb67)))) +for ac_func in _getb67 GETB67 getb67; do + AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func) + break]) +done fi AC_MSG_CHECKING(stack direction for C alloca) @@ -1083,21 +1152,23 @@ AC_SUBST(ALLOCA)dnl ]) AC_DEFUN(AC_FUNC_GETLOADAVG, -[# Some definitions of getloadavg require that the program be installed setgid. -NEED_SETGID=false -AC_SUBST(NEED_SETGID)dnl -ac_have_func=no +[ac_have_func=no # yes means we've found a way to get the load average. -# Check for the 4.4BSD definition of getloadavg. -AC_CHECK_LIB(util, getloadavg, [LIBS="$LIBS -lutil" ac_have_func=yes # Some systems with -lutil have (and need) -lkvm as well, some do not. -AC_CHECK_LIB(kvm, kvm_open, LIBS="$LIBS -lkvm")]) +# On Solaris, -lkvm requires nlist from -lelf, so check that first +# to get the right answer into the cache. +AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") +AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") +# Check for the 4.4BSD definition of getloadavg. +AC_CHECK_LIB(util, getloadavg, + [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes]) if test $ac_have_func = no; then -# There is a commonly available library for RS/6000 AIX. -# Since it is not a standard part of AIX, it might be installed locally. -ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" -AC_CHECK_LIB(getloadavg, getloadavg, LIBS="$LIBS -lgetloadavg", LIBS="$ac_save_LIBS") + # There is a commonly available library for RS/6000 AIX. + # Since it is not a standard part of AIX, it might be installed locally. + ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" + AC_CHECK_LIB(getloadavg, getloadavg, + LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS") fi # Make sure it is really in the library, if we think we found it. @@ -1105,48 +1176,52 @@ AC_REPLACE_FUNCS(getloadavg) if test $ac_cv_func_getloadavg = yes; then AC_DEFINE(HAVE_GETLOADAVG) + ac_have_func=yes else -ac_have_func=no -AC_CHECK_HEADER(sys/dg_sys_info.h, -[ac_have_func=yes AC_DEFINE(DGUX) -AC_CHECK_LIB(dgc, dg_sys_info)]) -if test $ac_have_func = no; then -# We cannot check for , because Solaris 2 does not use dwarf (it -# uses stabs), but it is still SVR4. We cannot check for because -# Irix 4.0.5F has the header but not the library. -AC_CHECK_LIB(elf, elf_read, - [LIBS="$LIBS -lelf" ac_have_func=yes AC_DEFINE(SVR4) - AC_CHECK_LIB(kvm, kvm_open, LIBS="$LIBS -lkvm")]) -fi -if test $ac_have_func = no; then -AC_CHECK_HEADER(inq_stats/cpustats.h, - [ac_have_func=yes AC_DEFINE(UMAX) - AC_DEFINE(UMAX4_3)]) -fi -if test $ac_have_func = no; then -AC_CHECK_HEADER(sys/cpustats.h, - [ac_have_func=yes AC_DEFINE(UMAX)]) -fi -if test $ac_have_func = no; then -AC_CHECK_HEADERS(mach/mach.h) -fi + # Figure out what our getloadavg.c needs. + ac_have_func=no + AC_CHECK_HEADER(sys/dg_sys_info.h, + [ac_have_func=yes; AC_DEFINE(DGUX) + AC_CHECK_LIB(dgc, dg_sys_info)]) + + # We cannot check for , because Solaris 2 does not use dwarf (it + # uses stabs), but it is still SVR4. We cannot check for because + # Irix 4.0.5F has the header but not the library. + if test $ac_have_func = no && test $ac_cv_lib_elf = yes; then + ac_have_func=yes; AC_DEFINE(SVR4) + fi -AC_CHECK_HEADER(nlist.h, -[AC_DEFINE(NLIST_STRUCT) -AC_MSG_CHECKING([for n_un in struct nlist]) -AC_CACHE_VAL(ac_cv_struct_nlist_n_un, -[AC_TRY_COMPILE([#include ], -[struct nlist n; n.n_un.n_name = 0;], -ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl -AC_MSG_RESULT($ac_cv_struct_nlist_n_un) -if test $ac_cv_struct_nlist_n_un = yes; then - AC_DEFINE(NLIST_NAME_UNION) -fi -])dnl + if test $ac_have_func = no; then + AC_CHECK_HEADER(inq_stats/cpustats.h, + [ac_have_func=yes; AC_DEFINE(UMAX) + AC_DEFINE(UMAX4_3)]) + fi + + if test $ac_have_func = no; then + AC_CHECK_HEADER(sys/cpustats.h, + [ac_have_func=yes; AC_DEFINE(UMAX)]) + fi + + if test $ac_have_func = no; then + AC_CHECK_HEADERS(mach/mach.h) + fi -dnl FIXME two bugs here: -dnl Hardwiring the path of getloadavg.c in the top-level directory, -dnl and not checking whether a getloadavg from a library needs privileges. + AC_CHECK_HEADER(nlist.h, + [AC_DEFINE(NLIST_STRUCT) + AC_MSG_CHECKING([for n_un in struct nlist]) + AC_CACHE_VAL(ac_cv_struct_nlist_n_un, + [AC_TRY_COMPILE([#include ], + [struct nlist n; n.n_un.n_name = 0;], + ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl + AC_MSG_RESULT($ac_cv_struct_nlist_n_un) + if test $ac_cv_struct_nlist_n_un = yes; then + AC_DEFINE(NLIST_NAME_UNION) + fi + ])dnl +fi # Do not have getloadavg in system libraries. + +# Some definitions of getloadavg require that the program be installed setgid. +dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory. AC_MSG_CHECKING(whether getloadavg requires setgid) AC_CACHE_VAL(ac_cv_func_getloadavg_setgid, [AC_EGREP_CPP([Yowza Am I SETGID yet], @@ -1157,12 +1232,13 @@ Yowza Am I SETGID yet ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl AC_MSG_RESULT($ac_cv_func_getloadavg_setgid) if test $ac_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED) + NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED) +else + NEED_SETGID=false fi +AC_SUBST(NEED_SETGID)dnl -fi # Do not have getloadavg in system libraries. - -if test "$NEED_SETGID" = true; then +if test $ac_cv_func_getloadavg_setgid = yes; then AC_MSG_CHECKING(group of /dev/kmem) AC_CACHE_VAL(ac_cv_group_kmem, [changequote(, )dnl @@ -1196,7 +1272,7 @@ exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0 && t.st_mtime - s.st_mtime < 120)); }], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no, ac_cv_func_utime_null=no) -rm -f core])dnl +rm -f core core.* *.core])dnl AC_MSG_RESULT($ac_cv_func_utime_null) if test $ac_cv_func_utime_null = yes; then AC_DEFINE(HAVE_UTIME_NULL) @@ -1233,7 +1309,7 @@ main () { putc('\r', stdout); exit(0); /* Non-reversed systems segv here. */ }], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no) -rm -f core])dnl +rm -f core core.* *.core])dnl AC_MSG_RESULT($ac_cv_func_setvbuf_reversed) if test $ac_cv_func_setvbuf_reversed = yes; then AC_DEFINE(SETVBUF_REVERSED) @@ -1242,13 +1318,13 @@ fi AC_DEFUN(AC_FUNC_GETMNTENT, [# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX. -AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun", - [AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")]) +AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS", + [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")]) AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])]) AC_DEFUN(AC_FUNC_STRFTIME, [# strftime is in -lintl on SCO UNIX. -AC_CHECK_LIB(intl, strftime, LIBS="$LIBS -lintl") +AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS") AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])]) AC_DEFUN(AC_FUNC_MEMCMP, @@ -1372,7 +1448,7 @@ AC_DEFUN(AC_C_CROSS, AC_MSG_CHECKING(whether cross-compiling) AC_CACHE_VAL(ac_cv_c_cross, [AC_TRY_RUN([main(){return(0);}], - ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_cross=yes)])dnl + ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])dnl cross_compiling=$ac_cv_c_cross AC_MSG_RESULT($ac_cv_c_cross) ]) @@ -1441,7 +1517,20 @@ AC_TRY_RUN([main() { exit(sizeof(long int) != 8); }], AC_DEFUN(AC_C_BIGENDIAN, [AC_MSG_CHECKING(whether byte ordering is bigendian) AC_CACHE_VAL(ac_cv_c_bigendian, -[AC_TRY_RUN([main () { +[ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +AC_TRY_COMPILE([#include +#include ], [ +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif], [# It does; now see whether it defined to BIG_ENDIAN or not. +AC_TRY_COMPILE([#include +#include ], [ +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)]) +if test $ac_cv_c_bigendian = unknown; then +AC_TRY_RUN([main () { /* Are we little or big endian? From Harbison&Steele. */ union { @@ -1450,25 +1539,31 @@ AC_CACHE_VAL(ac_cv_c_bigendian, } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); -}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)])dnl +}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes) +fi])dnl AC_MSG_RESULT($ac_cv_c_bigendian) if test $ac_cv_c_bigendian = yes; then AC_DEFINE(WORDS_BIGENDIAN) fi ]) +dnl Do nothing if the compiler accepts the inline keyword. +dnl Otherwise define inline to __inline__ or __inline if one of those work, +dnl otherwise define inline to be empty. AC_DEFUN(AC_C_INLINE, [AC_MSG_CHECKING([for inline]) AC_CACHE_VAL(ac_cv_c_inline, -[if test "$GCC" = yes; then -AC_TRY_COMPILE(, [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no) -else - ac_cv_c_inline=no -fi])dnl +[ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break]) +done +])dnl AC_MSG_RESULT($ac_cv_c_inline) -if test $ac_cv_c_inline = no; then - AC_DEFINE(inline, __inline) -fi +case "$ac_cv_c_inline" in + inline | yes) ;; + no) AC_DEFINE(inline, ) ;; + *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) ;; +esac ]) AC_DEFUN(AC_C_CONST, @@ -1542,7 +1637,7 @@ AC_DEFUN(AC_SYS_INTERPRETER, ac_msg="whether #! works in shell scripts" AC_MSG_CHECKING($ac_msg) AC_CACHE_VAL(ac_cv_sys_interpreter, -[echo '#!/bin/cat +[echo '#! /bin/cat exit 69 ' > conftest chmod u+x conftest @@ -1673,17 +1768,20 @@ EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `make acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a - then - ac_im_usrlibdir=$ac_im_libdir - fi + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. case "$ac_im_incroot" in /usr/include) ;; - *) ac_x_includes="$ac_im_incroot" ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; esac case "$ac_im_usrlibdir" in /usr/lib | /lib) ;; - *) ac_x_libraries="$ac_im_usrlibdir" ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; esac fi cd .. @@ -1746,7 +1844,7 @@ AC_TRY_CPP([#include <$x_direct_test_include>], # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS="$LIBS" -LIBS="$LIBS -l$x_direct_test_library" +LIBS="-l$x_direct_test_library $LIBS" AC_TRY_LINK(, [${x_direct_test_function}()], [LIBS="$ac_save_LIBS" no_x= ac_x_libraries=], [LIBS="$ac_save_LIBS" @@ -1829,7 +1927,7 @@ else # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. - AC_CHECK_LIB(ICE, IceConnectionNumbers, + AC_CHECK_LIB(ICE, IceConnectionNumber, [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"]) LDFLAGS="$ac_save_LDFLAGS" @@ -1870,6 +1968,7 @@ AC_SUBST(X_EXTRA_LIBS)dnl dnl ### Checks for UNIX variants dnl These are kludges which should be replaced by a single POSIX check. +dnl They aren't cached, to discourage their use. AC_DEFUN(AC_AIX, @@ -1897,7 +1996,7 @@ fi ]) AC_DEFUN(AC_ISC_POSIX, -[AC_BEFORE([$0], [AC_TRY_LINK])dnl +[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl AC_BEFORE([$0], [AC_TRY_LINK])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_MSG_CHECKING(for POSIXized ISC) @@ -1929,22 +2028,22 @@ AC_EGREP_CPP(yes, ], [AC_MSG_RESULT(yes); XENIX=yes], [AC_MSG_RESULT(no); XENIX=]) if test "$XENIX" = yes; then # Make sure -ldir precedes -lx. - test $ac_header_dirent = dirent.h && LIBS="$LIBS -ldir" + test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS" LIBS="$LIBS -lx" fi ]) AC_DEFUN(AC_DYNIX_SEQ, [AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl -AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq") +AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS") ]) AC_DEFUN(AC_IRIX_SUN, [AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl -AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun") +AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS") ]) AC_DEFUN(AC_SCO_INTL, [AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl -AC_CHECK_LIB(intl, strftime, LIBS="$LIBS -lintl") +AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS") ]) diff --git a/src/util/autoconf/autoconf.info b/src/util/autoconf/autoconf.info index cec6b13d4..0bbcfc693 100644 --- a/src/util/autoconf/autoconf.info +++ b/src/util/autoconf/autoconf.info @@ -1,10 +1,13 @@ This is Info file autoconf.info, produced by Makeinfo-1.55 from the -input file ./autoconf.texi. +input file autoconf.texi. START-INFO-DIR-ENTRY * Autoconf: (autoconf). Create source code configuration scripts. END-INFO-DIR-ENTRY + Autoconf: Creating Automatic Configuration Scripts, by David +MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro package. @@ -27,126 +30,126 @@ translation approved by the Foundation.  Indirect: -autoconf.info-1: 1085 -autoconf.info-2: 51012 -autoconf.info-3: 100216 -autoconf.info-4: 150192 -autoconf.info-5: 198408 +autoconf.info-1: 1159 +autoconf.info-2: 51142 +autoconf.info-3: 99599 +autoconf.info-4: 149475 +autoconf.info-5: 197599  Tag Table: (Indirect) -Node: Top1085 -Node: Introduction9210 -Node: Making configure Scripts13050 -Node: Writing configure.in16115 -Node: Invoking autoscan19815 -Node: Invoking ifnames22120 -Node: Invoking autoconf23610 -Node: Invoking autoreconf25448 -Node: Setup27768 -Node: Input28654 -Node: Output30270 -Node: Makefile Substitutions33020 -Node: Preset Output Variables34602 -Node: Build Directories37840 -Node: Automatic Remaking39566 -Node: Configuration Headers41632 -Node: Header Templates43999 -Node: Invoking autoheader45178 -Node: Subdirectories48265 -Node: Default Prefix49608 -Node: Versions51012 -Node: Existing Tests52914 -Node: Alternative Programs54379 -Node: Particular Programs55043 -Node: Generic Programs60893 -Node: Libraries62570 -Node: Library Functions64399 -Node: Particular Functions64957 -Node: Generic Functions70704 -Node: Header Files72545 -Node: Particular Headers73104 -Node: Generic Headers80075 -Node: Structures81375 -Node: Typedefs83612 -Node: Particular Typedefs84116 -Node: Generic Typedefs85316 -Node: Compiler Characteristics85759 -Node: System Services88215 -Node: UNIX Variants90536 -Node: Writing Tests92555 -Node: Examining Declarations94327 -Node: Examining Syntax96793 -Node: Examining Libraries97848 -Node: Run Time100216 -Node: Test Programs101177 -Node: Guidelines103712 -Node: Test Functions104901 -Node: Portable Shell106444 -Node: Testing Values and Files108096 -Node: Multiple Cases109751 -Node: Language Choice110949 -Node: Results112507 -Node: Defining Symbols113266 -Node: Setting Output Variables116275 -Node: Caching Results118121 -Node: Cache Variable Names120023 -Node: Cache Files121572 -Node: Printing Messages123357 -Node: Writing Macros126644 -Node: Macro Definitions127263 -Node: Macro Names128368 -Node: Quoting130819 -Node: Dependencies Between Macros132721 -Node: Prerequisite Macros133353 -Node: Suggested Ordering134808 -Node: Obsolete Macros136338 -Node: Manual Configuration137562 -Node: Specifying Names138471 -Node: Canonicalizing140343 -Node: System Type Variables141657 -Node: Using System Type142404 -Node: Site Configuration143684 -Node: External Software144457 -Node: Package Options146922 -Node: Site Details148978 -Node: Transforming Names150192 -Node: Transformation Options151371 -Node: Transformation Examples151837 -Node: Transformation Rules153405 -Node: Site Defaults154814 -Node: Invoking configure157976 -Node: Basic Installation158917 -Node: Compilers and Options161239 -Node: Build Directory161881 -Node: Installation Names162582 -Node: Optional Features163500 -Node: System Type164270 -Node: Sharing Defaults165292 -Node: Operation Controls165916 -Node: Invoking config.status166780 -Node: Questions170168 -Node: Distributing170700 -Node: Why GNU m4171826 -Node: Bootstrapping172639 -Node: Why Not Imake173255 -Node: Upgrading177836 -Node: Changed File Names179357 -Node: Changed Makefiles180093 -Node: Changed Macros181173 -Node: Invoking autoupdate182420 -Node: Changed Results184011 -Node: Changed Macro Writing186113 -Node: History187376 -Node: Genesis188083 -Node: Exodus189256 -Node: Leviticus192305 -Node: Numbers193828 -Node: Deuteronomy195744 -Node: Old Macro Names198408 -Node: Environment Variable Index201457 -Node: Output Variable Index202459 -Node: Preprocessor Symbol Index206540 -Node: Macro Index211348 +Node: Top1159 +Node: Introduction9298 +Node: Making configure Scripts13138 +Node: Writing configure.in16203 +Node: Invoking autoscan19903 +Node: Invoking ifnames22208 +Node: Invoking autoconf23698 +Node: Invoking autoreconf25536 +Node: Setup27856 +Node: Input28742 +Node: Output30465 +Node: Makefile Substitutions33215 +Node: Preset Output Variables34804 +Node: Build Directories38043 +Node: Automatic Remaking39676 +Node: Configuration Headers41762 +Node: Header Templates44129 +Node: Invoking autoheader45308 +Node: Subdirectories48395 +Node: Default Prefix49738 +Node: Versions51142 +Node: Existing Tests53046 +Node: Alternative Programs54511 +Node: Particular Programs55175 +Node: Generic Programs61025 +Node: Libraries63534 +Node: Library Functions65363 +Node: Particular Functions65921 +Node: Generic Functions72205 +Node: Header Files74046 +Node: Particular Headers74605 +Node: Generic Headers81576 +Node: Structures82876 +Node: Typedefs85113 +Node: Particular Typedefs85617 +Node: Generic Typedefs86817 +Node: Compiler Characteristics87260 +Node: System Services89744 +Node: UNIX Variants92093 +Node: Writing Tests94112 +Node: Examining Declarations96078 +Node: Examining Syntax98544 +Node: Examining Libraries99599 +Node: Run Time102156 +Node: Test Programs103117 +Node: Guidelines105652 +Node: Test Functions106841 +Node: Portable Shell108384 +Node: Testing Values and Files110321 +Node: Multiple Cases111976 +Node: Language Choice113174 +Node: Results114732 +Node: Defining Symbols115491 +Node: Setting Output Variables118500 +Node: Caching Results120346 +Node: Cache Variable Names122248 +Node: Cache Files123797 +Node: Printing Messages125582 +Node: Writing Macros128869 +Node: Macro Definitions129488 +Node: Macro Names130593 +Node: Quoting133044 +Node: Dependencies Between Macros134946 +Node: Prerequisite Macros135578 +Node: Suggested Ordering137033 +Node: Obsolete Macros138563 +Node: Manual Configuration139787 +Node: Specifying Names140686 +Node: Canonicalizing142558 +Node: System Type Variables143872 +Node: Using System Type144619 +Node: Site Configuration146066 +Node: External Software146839 +Node: Package Options149475 +Node: Site Details151699 +Node: Transforming Names152922 +Node: Transformation Options154100 +Node: Transformation Examples154566 +Node: Transformation Rules156134 +Node: Site Defaults157543 +Node: Invoking configure161327 +Node: Basic Installation162276 +Node: Compilers and Options164856 +Node: Multiple Architectures165505 +Node: Installation Names166491 +Node: Optional Features167416 +Node: System Type168186 +Node: Sharing Defaults169208 +Node: Operation Controls169832 +Node: Invoking config.status170707 +Node: Questions174095 +Node: Distributing174627 +Node: Why GNU m4175753 +Node: Bootstrapping176566 +Node: Why Not Imake177182 +Node: Upgrading181591 +Node: Changed File Names183112 +Node: Changed Makefiles183848 +Node: Changed Macros184944 +Node: Invoking autoupdate186191 +Node: Changed Results187782 +Node: Changed Macro Writing189884 +Node: History191147 +Node: Genesis191854 +Node: Exodus193027 +Node: Leviticus196076 +Node: Numbers197599 +Node: Deuteronomy199515 +Node: Old Macro Names202179 +Node: Environment Variable Index205228 +Node: Output Variable Index206230 +Node: Preprocessor Symbol Index210311 +Node: Macro Index215181  End Tag Table diff --git a/src/util/autoconf/autoconf.info-1 b/src/util/autoconf/autoconf.info-1 index f49358c98..e35ad85c5 100644 --- a/src/util/autoconf/autoconf.info-1 +++ b/src/util/autoconf/autoconf.info-1 @@ -1,10 +1,13 @@ This is Info file autoconf.info, produced by Makeinfo-1.55 from the -input file ./autoconf.texi. +input file autoconf.texi. START-INFO-DIR-ENTRY * Autoconf: (autoconf). Create source code configuration scripts. END-INFO-DIR-ENTRY + Autoconf: Creating Automatic Configuration Scripts, by David +MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro package. @@ -30,7 +33,7 @@ File: autoconf.info, Node: Top, Next: Introduction, Up: (dir) This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro -package. This is edition 2.1, for Autoconf version 2.1. +package. This is edition 2.3, for Autoconf version 2.3. * Menu: @@ -77,7 +80,7 @@ Initialization and Output Files Substitutions in Makefiles * Preset Output Variables:: Output variables that are always set. -* Build Directories:: Compiling in a different directory. +* Build Directories:: Supporting multiple concurrent compiles. * Automatic Remaking:: Makefile rules for configuring. Configuration Header Files @@ -176,7 +179,7 @@ Site Configuration Transforming Program Names When Installing -* Transformation Options:: `configure' options to transforme names. +* Transformation Options:: `configure' options to transform names. * Transformation Examples:: Sample uses of transforming names. * Transformation Rules:: `Makefile' uses of transforming names. @@ -184,7 +187,7 @@ Running `configure' Scripts * Basic Installation:: Instructions for typical cases. * Compilers and Options:: Selecting compilers and optimization. -* Build Directory:: Configuring in a different directory. +* Multiple Architectures:: Compiling for multiple architectures at once. * Installation Names:: Installing in different directories. * Optional Features:: Selecting optional features. * System Type:: Specifying the system type. @@ -663,8 +666,9 @@ else. The only other required macro is `AC_OUTPUT' (*note Output::.). directory. UNIQUE-FILE-IN-SOURCE-DIR is some file that is in the package's source directory; `configure' checks for this file's existence to make sure that the directory that it is told contains - the source code in fact does (*note Invoking configure::., for - more information). + the source code in fact does. Occasionally people accidentally + specify the wrong directory with `--srcdir'; this is a safety + check. *Note Invoking configure::, for more information. Packages that do manual configuration or use the `install' program might need to tell `configure' where to find some other shell scripts @@ -773,7 +777,7 @@ for more information on what to put in `Makefile's. * Menu: * Preset Output Variables:: Output variables that are always set. -* Build Directories:: Compiling in a different directory. +* Build Directories:: Supporting multiple concurrent compiles. * Automatic Remaking:: Makefile rules for configuring.  @@ -796,7 +800,7 @@ contains. variable in a comment at the top of each input file. For example, an input shell script should begin like this: - #!/bin/sh + #! /bin/sh # @configure_input@ The presence of that line also reminds people editing the file @@ -859,11 +863,9 @@ File: autoconf.info, Node: Build Directories, Next: Automatic Remaking, Prev: Build Directories ----------------- - You might want to compile a software package in a different directory -from the one that contains the source code. Doing this allows you to -compile the package for several architectures simultaneously from the -same copy of the source code and keep multiple sets of object files on -disk. + You can support compiling a software package for several +architectures simultaneously from the same copy of the source code. +The object files for each architecture are kept in their own directory. To support doing this, `make' uses the `VPATH' variable to find the files that are in the source directory. GNU `make' and most other @@ -882,7 +884,7 @@ look like: substitutions on the value of `VPATH'. `configure' substitutes in the correct value for `srcdir' when it -produces `Makefile.in'. +produces `Makefile'. Do not use the `make' variable `$<', which expands to the pathname of the file in the source directory (found with `VPATH'), except in @@ -918,7 +920,7 @@ not change their contents. This feature avoids unnecessary recompilation. You should include the file `stamp-h.in' your package's distribution, so `make' will consider `config.h.in' up to date. On some old BSD systems, `touch' or any command that results in an empty -file does not update the timestamps, so use a command like `date' as a +file does not update the timestamps, so use a command like `echo' as a workaround. ${srcdir}/configure: configure.in aclocal.m4 @@ -929,7 +931,7 @@ workaround. ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h \ config.h.top config.h.bot cd ${srcdir} && autoheader - date > ${srcdir}/stamp-h.in + echo timestamp > ${srcdir}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status @@ -941,10 +943,10 @@ workaround. config.status: configure ./config.status --recheck - In addition, you should pass `date > stamp-h' in the EXTRA-CMDS -argument to `AC_OUTPUT', so `config.status' will ensure that `config.h' -is considered up to date. *Note Output::, for more information about -`AC_OUTPUT'. + In addition, you should pass `echo timestamp > stamp-h' in the +EXTRA-CMDS argument to `AC_OUTPUT', so `config.status' will ensure that +`config.h' is considered up to date. *Note Output::, for more +information about `AC_OUTPUT'. *Note Invoking config.status::, for more examples of handling configuration-related dependencies. diff --git a/src/util/autoconf/autoconf.info-2 b/src/util/autoconf/autoconf.info-2 index ae8fc7b9c..6333f5521 100644 --- a/src/util/autoconf/autoconf.info-2 +++ b/src/util/autoconf/autoconf.info-2 @@ -1,10 +1,13 @@ This is Info file autoconf.info, produced by Makeinfo-1.55 from the -input file ./autoconf.texi. +input file autoconf.texi. START-INFO-DIR-ENTRY * Autoconf: (autoconf). Create source code configuration scripts. END-INFO-DIR-ENTRY + Autoconf: Creating Automatic Configuration Scripts, by David +MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro package. @@ -61,7 +64,7 @@ Using them is optional. It is a good idea to call this macro before `AC_INIT' so that the revision number is near the top of both `configure.in' and `configure'. To support doing that, the `AC_REVISION' output - begins with `#!/bin/sh', like the normal start of a `configure' + begins with `#! /bin/sh', like the normal start of a `configure' script does. For example, this line in `configure.in': @@ -70,7 +73,7 @@ Using them is optional. produces this in `configure': - #!/bin/sh + #! /bin/sh # From configure.in Revision: 1.30  @@ -259,7 +262,13 @@ Generic Program Checks These macros are used to find programs not covered by the particular test macros. If you need to check the behavior of a program as well as find out whether it is present, you have to write your own test for it -(*note Writing Tests::.). +(*note Writing Tests::.). If you need to check for a program that +might not be in the user's `PATH', you can temporarily add to it: + + ac_save_path="$PATH" + PATH=/usr/libexec:/usr/sbin:/usr/etc:/etc + AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd) + PATH="$ac_save_path" - Macro: AC_CHECK_PROG (VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND [, VALUE-IF-NOT-FOUND]) @@ -278,6 +287,18 @@ find out whether it is present, you have to write your own test for it is not specified, the value of VARIABLE is not changed. Calls `AC_SUBST' for VARIABLE. + - Macro: AC_CHECK_TOOL (VARIABLE, PROG-TO-CHECK-FOR [, + VALUE-IF-NOT-FOUND]) + Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a + prefix of the host type as determined by `AC_CANONICAL_HOST', + followed by a dash (*note Canonicalizing::.). For example, if the + user runs `configure --host=i386-gnu', then this call: + AC_CHECK_TOOL(RANLIB, ranlib, :) + + sets `RANLIB' to `i386-gnu-ranlib' if that program exists in + `PATH', or to `ranlib' if that program exists in `PATH', or to `:' + if neither program exists. + - Macro: AC_PATH_PROG (VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND]) Like `AC_CHECK_PROG', but set VARIABLE to the entire path of @@ -314,7 +335,7 @@ archive files. If linking with LIBRARY results in unresolved symbols, which would be resolved by linking with additional libraries, give those libraries as the OTHER-LIBRARIES argument, separated by spaces: - `-lX11 -lXt'. Otherwise this macro will fail to detect that + `-lXt -lX11'. Otherwise this macro will fail to detect that LIBRARY is present, because linking the test program will always fail with unresolved symbols. @@ -431,9 +452,16 @@ and in some cases how they respond when given certain arguments. the name of the group that should own the installed program. - Macro: AC_FUNC_GETMNTENT - Check for the `getmntent' in the `sun' and `seq' libraries, for - Irix 4 and PTX, respectively. Then, if `getmntent' is available, - define `HAVE_GETMNTENT'. + Check for `getmntent' in the `sun' and `seq' libraries, for Irix 4 + and PTX, respectively. Then, if `getmntent' is available, define + `HAVE_GETMNTENT'. + + - Macro: AC_FUNC_GETPGRP + If `getpgrp' takes no argument (the POSIX.1 version), define + `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a + process ID as an argument. This macro does not check whether + `getpgrp' exists at all; if you need to work in that situation, + first call `AC_CHECK_FUNC' for `getpgrp'. - Macro: AC_FUNC_MEMCMP If the `memcmp' function is not available, or does not work on @@ -469,7 +497,9 @@ and in some cases how they respond when given certain arguments. `vfork' is not found, define `vfork' to be `fork'. This macro checks for several known errors in implementations of `vfork' and considers the system to not have a working `vfork' if it detects - any of them. + any of them. It is not considered to be an implementation error + if a child's invocation of `signal' modifies the parent's signal + handler, since child processes rarely change their signal handlers. - Macro: AC_FUNC_VPRINTF If `vprintf' is found, define `HAVE_VPRINTF'. Otherwise, if @@ -913,9 +943,9 @@ Time::.) as empty. - Macro: AC_C_INLINE - If the C compiler is a version of GCC that supports the keyword - `__inline' but not `inline' (such as some NeXT versions), define - `inline' to be `__inline'. + If the C compiler supports the keyword `inline', do nothing. + Otherwise define `inline' to `__inline__' or `__inline' if it + accepts one of those, otherwise define `inline' to be empty. - Macro: AC_C_CHAR_UNSIGNED If the C type `char' is unsigned, define `__CHAR_UNSIGNED__', @@ -958,7 +988,7 @@ capabilities. - Macro: AC_SYS_INTERPRETER Check whether the system supports starting scripts with a line of - the form `#!/bin/csh' to select the interpreter to use for the + the form `#! /bin/csh' to select the interpreter to use for the script. After running this macro, shell code in `configure.in' can check the variable `ac_cv_sys_interpreter'; it will be set to `yes' if the system supports `#!', `no' if not. @@ -980,16 +1010,17 @@ capabilities. set it to the empty string. - Macro: AC_PATH_XTRA - An enhanced version of `AC_PATH_X'. Add the C compiler flags that - X needs to output variable `X_CFLAGS', and the X linker flags to - `X_LIBS'. If X is not available, add `-DX_DISPLAY_MISSING' to + An enhanced version of `AC_PATH_X'. It adds the C compiler flags + that X needs to output variable `X_CFLAGS', and the X linker flags + to `X_LIBS'. If X is not available, adds `-DX_DISPLAY_MISSING' to `X_CFLAGS'. - Also check for special libraries that some systems need in order to - compile X programs. Add any that the system needs to output - variable `X_EXTRA_LIBS'. And check for special X11R6 libraries - that need to be linked with before `-lX11', and add any found to - the output variable `X_PRE_LIBS'. + This macro also checks for special libraries that some systems + need in order to compile X programs. It adds any that the system + needs to output variable `X_EXTRA_LIBS'. And it checks for + special X11R6 libraries that need to be linked with before + `-lX11', and adds any found to the output variable `X_PRE_LIBS'. + - Macro: AC_SYS_LONG_FILE_NAMES If the system supports file names longer than 14 characters, define @@ -1075,6 +1106,10 @@ print any messages, for the same reason. The checks for particular kinds of C features call these macros and do cache their results and print messages about what they're checking for. + When you write a feature test that could be applicable to more than +one software package, the best thing to do is encapsulate it in a new +macro. *Note Writing Macros::, for how to do that. + * Menu: * Examining Declarations:: Detecting header files and declarations. @@ -1165,50 +1200,3 @@ systems. link; use `AC_TRY_LINK' if you need to do that (*note Examining Libraries::.). - -File: autoconf.info, Node: Examining Libraries, Next: Run Time, Prev: Examining Syntax, Up: Writing Tests - -Examining Libraries -=================== - - To check for a library, a function, or a global variable, Autoconf -`configure' scripts try to compile and link a small program that uses -it. This is unlike Metaconfig, which by default uses `nm' or `ar' on -the C library to try to figure out which functions are available. -Trying to link with the function is usually a more reliable approach -because it avoids dealing with the variations in the options and output -formats of `nm' and `ar' and in the location of the standard libraries. -It also allows configuring for cross-compilation or checking a -function's runtime behavior if needed. On the other hand, it can be -slower than scanning the libraries once. - - A few systems have linkers that do not return a failure exit status -when there are unresolved functions in the link. This bug makes the -configuration scripts produced by Autoconf unusable on those systems. -However, some of them can be given options that make the exit status -correct. This is a problem that Autoconf does not currently handle -automatically. - - `AC_TRY_LINK' is used to compile test programs to test for functions -and global variables. It is also used (by `AC_CHECK_LIB') to check for -libraries, by adding the library being checked for to `LIBS' -temporarily and trying to link a small program. - - - Macro: AC_TRY_LINK (INCLUDES, FUNCTION-BODY, ACTION-IF-FOUND [, - ACTION-IF-NOT-FOUND]) - Create a test C program to see whether a function whose body - consists of FUNCTION-BODY can be compiled and linked; INCLUDES is - any `#include' statements needed by the code in FUNCTION-BODY. If - the file compiles and links successfully, run shell commands - ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND. This macro - uses `CFLAGS' or `CXXFLAGS', `CPPFLAGS', `LDFLAGS', and `LIBS' - when compiling. - - - Macro: AC_COMPILE_CHECK (ECHO-TEXT, INCLUDES, FUNCTION-BODY, - ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) - This is an obsolete version of `AC_TRY_LINK', with the addition - that it prints `checking for ECHO-TEXT' to the standard output - first, if ECHO-TEXT is non-empty. Use `AC_MSG_CHECKING' and - `AC_MSG_RESULT' instead to print messages (*note Printing - Messages::.). - diff --git a/src/util/autoconf/autoconf.info-3 b/src/util/autoconf/autoconf.info-3 index 0cbd5dbcf..3e388c389 100644 --- a/src/util/autoconf/autoconf.info-3 +++ b/src/util/autoconf/autoconf.info-3 @@ -1,10 +1,13 @@ This is Info file autoconf.info, produced by Makeinfo-1.55 from the -input file ./autoconf.texi. +input file autoconf.texi. START-INFO-DIR-ENTRY * Autoconf: (autoconf). Create source code configuration scripts. END-INFO-DIR-ENTRY + Autoconf: Creating Automatic Configuration Scripts, by David +MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro package. @@ -25,6 +28,55 @@ manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. + +File: autoconf.info, Node: Examining Libraries, Next: Run Time, Prev: Examining Syntax, Up: Writing Tests + +Examining Libraries +=================== + + To check for a library, a function, or a global variable, Autoconf +`configure' scripts try to compile and link a small program that uses +it. This is unlike Metaconfig, which by default uses `nm' or `ar' on +the C library to try to figure out which functions are available. +Trying to link with the function is usually a more reliable approach +because it avoids dealing with the variations in the options and output +formats of `nm' and `ar' and in the location of the standard libraries. +It also allows configuring for cross-compilation or checking a +function's runtime behavior if needed. On the other hand, it can be +slower than scanning the libraries once. + + A few systems have linkers that do not return a failure exit status +when there are unresolved functions in the link. This bug makes the +configuration scripts produced by Autoconf unusable on those systems. +However, some of them can be given options that make the exit status +correct. This is a problem that Autoconf does not currently handle +automatically. If users encounter this problem, they might be able to +solve it by setting `LDFLAGS' in the environment to pass whatever +options the linker needs (for example, `-Wl,-dn' on MIPS RISC/OS). + + `AC_TRY_LINK' is used to compile test programs to test for functions +and global variables. It is also used (by `AC_CHECK_LIB') to check for +libraries, by adding the library being checked for to `LIBS' +temporarily and trying to link a small program. + + - Macro: AC_TRY_LINK (INCLUDES, FUNCTION-BODY, ACTION-IF-FOUND [, + ACTION-IF-NOT-FOUND]) + Create a test C program to see whether a function whose body + consists of FUNCTION-BODY can be compiled and linked; INCLUDES is + any `#include' statements needed by the code in FUNCTION-BODY. If + the file compiles and links successfully, run shell commands + ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND. This macro + uses `CFLAGS' or `CXXFLAGS', `CPPFLAGS', `LDFLAGS', and `LIBS' + when compiling. + + - Macro: AC_COMPILE_CHECK (ECHO-TEXT, INCLUDES, FUNCTION-BODY, + ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) + This is an obsolete version of `AC_TRY_LINK', with the addition + that it prints `checking for ECHO-TEXT' to the standard output + first, if ECHO-TEXT is non-empty. Use `AC_MSG_CHECKING' and + `AC_MSG_RESULT' instead to print messages (*note Printing + Messages::.). +  File: autoconf.info, Node: Run Time, Next: Portable Shell, Prev: Examining Libraries, Up: Writing Tests @@ -184,7 +236,12 @@ advantage of features that were added after UNIX version 7, circa 1977. You should not use shell functions, aliases, negated character classes, or other features that are not found in all Bourne-compatible shells; restrict yourself to the lowest common denominator. Even `unset' is -not supported by all shells! +not supported by all shells! Also, include a space after the +exclamation point in interpreter specifications, like this: + #! /usr/bin/perl + If you omit the space before the path, then 4.2BSD based systems +(such as Sequent DYNIX) will ignore the line, because they interpret +`#! /' as a 4-byte magic number. The set of external programs you should run in a `configure' script is fairly small. *Note Utilities in Makefiles: @@ -600,13 +657,13 @@ automatically. - Macro: AC_MSG_ERROR (ERROR-DESCRIPTION) Notify the user of an error that prevents `configure' from completing. This macro prints an error message on the standard - error stream and exits `configure' with a nonzero status. + error output and exits `configure' with a nonzero status. eRROR-DESCRIPTION should be something like `invalid value $HOME for \$HOME'. - Macro: AC_MSG_WARN (PROBLEM-DESCRIPTION) Notify the `configure' user of a possible problem. This macro - prints the message on the standard error stream; `configure' + prints the message on the standard error output; `configure' continues running afterward, so macros that call `AC_MSG_WARN' should provide a default (back-up) behavior for the situations they warn about. PROBLEM-DESCRIPTION should be something like `ln @@ -910,8 +967,8 @@ Manual Configuration A few kinds of features can't be guessed automatically by running test programs. For example, the details of the object file format, or -special options that need to be passed to the compiler or linker. It is -possible to check for such features using ad-hoc means, such as having +special options that need to be passed to the compiler or linker. You +can check for such features using ad-hoc means, such as having `configure' check the output of the `uname' program, or looking for libraries that are unique to particular systems. However, Autoconf provides a uniform method for handling unguessable features. @@ -1053,6 +1110,10 @@ together, like in this fragment: `SRCDIR/config/${machine}.h', and `object.h', which is a link to `SRCDIR/config/${obj_format}.h'. + You can also use the host system type to find cross-compilation +tools. *Note Generic Programs::, for information about the +`AC_CHECK_TOOL' macro which does that. +  File: autoconf.info, Node: Site Configuration, Next: Invoking configure, Prev: Manual Configuration, Up: Top @@ -1102,16 +1163,19 @@ should call `AC_ARG_WITH' to detect whether the `configure' user asked to use it. Whether each package is used or not by default, and which arguments are valid, is up to you. - - Macro: AC_ARG_WITH (PACKAGE, HELP-STRING, ACTION-IF-TRUE [, - ACTION-IF-FALSE]) + - Macro: AC_ARG_WITH (PACKAGE, HELP-STRING [, ACTION-IF-GIVEN [, + ACTION-IF-NOT-GIVEN]]) If the user gave `configure' the option `--with-PACKAGE' or - `--without-PACKAGE', run shell commands ACTION-IF-TRUE. Otherwise - run shell commands ACTION-IF-FALSE. The name PACKAGE indicates - another software package that this program should work with. It - should consist only of alphanumeric characters and dashes. + `--without-PACKAGE', run shell commands ACTION-IF-GIVEN. If + neither option was given, run shell commands ACTION-IF-NOT-GIVEN. + The name PACKAGE indicates another software package that this + program should work with. It should consist only of alphanumeric + characters and dashes. The option's argument is available to the shell commands - ACTION-IF-TRUE in the shell variable `withval'. + ACTION-IF-GIVEN in the shell variable `withval', which is actually + just the value of the shell variable `with_PACKAGE'; you may use + that variable instead, if you wish. The argument HELP-STRING is a description of the option which looks like this: @@ -1122,77 +1186,7 @@ arguments are valid, is up to you. Avoid tabs in the help string. You'll need to enclose it in `[' and `]' in order to produce the leading spaces. - - Macro: AC_WITH (PACKAGE, ACTION-IF-TRUE [, ACTION-IF-FALSE]) + - Macro: AC_WITH (PACKAGE, ACTION-IF-GIVEN [, ACTION-IF-NOT-GIVEN]) This is an obsolete version of `AC_ARG_WITH' that does not support providing a help string. - -File: autoconf.info, Node: Package Options, Next: Site Details, Prev: External Software, Up: Site Configuration - -Choosing Package Options -======================== - - If a software package has optional compile-time features, the user -can give `configure' command line options to specify whether to compile -them. The options have one of these forms: - - --enable-FEATURE[=ARG] - --disable-FEATURE - - These options allow users to choose which optional features to build -and install. `--enable-FEATURE' options should never make a feature -behave differently or cause one feature to replace another. They -should only cause parts of the program to be built rather than left out. - - The user can give an argument by following the feature name with `=' -and the argument. Giving an argument of `no' requests that the feature -*not* be made available. A feature with an argument looks like -`--enable-debug=stabs'. If no argument is given, it defaults to `yes'. -`--disable-FEATURE' is equivalent to `--enable-FEATURE=no'. - - For each optional feature, `configure.in' should call -`AC_ARG_ENABLE' to detect whether the `configure' user asked to include -it. Whether each feature is included or not by default, and which -arguments are valid, is up to you. - - - Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING, ACTION-IF-TRUE [, - ACTION-IF-FALSE]) - If the user gave `configure' the option `--enable-FEATURE' or - `--disable-FEATURE', run shell commands ACTION-IF-TRUE. Otherwise - run shell commands ACTION-IF-FALSE. The name FEATURE indicates an - optional user-level facility. It should consist only of - alphanumeric characters and dashes. - - The option's argument is available to the shell commands - ACTION-IF-TRUE in the shell variable `enableval'. The HELP-STRING - argument is like that of `AC_ARG_WITH' (*note External - Software::.). - - - Macro: AC_ENABLE (FEATURE, ACTION-IF-TRUE [, ACTION-IF-FALSE]) - This is an obsolete version of `AC_ARG_ENABLE' that does not - support providing a help string. - - -File: autoconf.info, Node: Site Details, Next: Transforming Names, Prev: Package Options, Up: Site Configuration - -Configuring Site Details -======================== - - Some software packages require complex site-specific information. -Some examples are host names to use for certain services, company -names, and email addresses to contact. Since some configuration -scripts generated by Metaconfig ask for such information interactively, -people sometimes wonder how to get that information in -Autoconf-generated configuration scripts, which aren't interactive. - - Such site configuration information should be put in a file that is -edited *only by users*, not by programs. The location of the file can -either be based on the `prefix' variable, or be a standard location -such as the user's home directory. It could even be specified by an -environment variable. The programs should examine that file at run -time, rather than at compile time. That approach is more convenient -for users and makes the configuration process simpler than getting the -information while configuring. *Note Variables for Installation -Directories: (standards)Directory Variables, for more information on -where to put data files. - diff --git a/src/util/autoconf/autoconf.info-4 b/src/util/autoconf/autoconf.info-4 index f296435d3..7a5a6ca0b 100644 --- a/src/util/autoconf/autoconf.info-4 +++ b/src/util/autoconf/autoconf.info-4 @@ -1,10 +1,13 @@ This is Info file autoconf.info, produced by Makeinfo-1.55 from the -input file ./autoconf.texi. +input file autoconf.texi. START-INFO-DIR-ENTRY * Autoconf: (autoconf). Create source code configuration scripts. END-INFO-DIR-ENTRY + Autoconf: Creating Automatic Configuration Scripts, by David +MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro package. @@ -25,6 +28,78 @@ manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. + +File: autoconf.info, Node: Package Options, Next: Site Details, Prev: External Software, Up: Site Configuration + +Choosing Package Options +======================== + + If a software package has optional compile-time features, the user +can give `configure' command line options to specify whether to compile +them. The options have one of these forms: + + --enable-FEATURE[=ARG] + --disable-FEATURE + + These options allow users to choose which optional features to build +and install. `--enable-FEATURE' options should never make a feature +behave differently or cause one feature to replace another. They +should only cause parts of the program to be built rather than left out. + + The user can give an argument by following the feature name with `=' +and the argument. Giving an argument of `no' requests that the feature +*not* be made available. A feature with an argument looks like +`--enable-debug=stabs'. If no argument is given, it defaults to `yes'. +`--disable-FEATURE' is equivalent to `--enable-FEATURE=no'. + + For each optional feature, `configure.in' should call +`AC_ARG_ENABLE' to detect whether the `configure' user asked to include +it. Whether each feature is included or not by default, and which +arguments are valid, is up to you. + + - Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING [, ACTION-IF-GIVEN [, + ACTION-IF-NOT-GIVEN]]) + If the user gave `configure' the option `--enable-FEATURE' or + `--disable-FEATURE', run shell commands ACTION-IF-GIVEN. If + neither option was given, run shell commands ACTION-IF-NOT-GIVEN. + The name FEATURE indicates an optional user-level facility. It + should consist only of alphanumeric characters and dashes. + + The option's argument is available to the shell commands + ACTION-IF-GIVEN in the shell variable `enableval', which is + actually just the value of the shell variable `enable_PACKAGE'; + you may use that variable instead, if you wish. The HELP-STRING + argument is like that of `AC_ARG_WITH' (*note External + Software::.). + + - Macro: AC_ENABLE (FEATURE, ACTION-IF-GIVEN [, ACTION-IF-NOT-GIVEN]) + This is an obsolete version of `AC_ARG_ENABLE' that does not + support providing a help string. + + +File: autoconf.info, Node: Site Details, Next: Transforming Names, Prev: Package Options, Up: Site Configuration + +Configuring Site Details +======================== + + Some software packages require complex site-specific information. +Some examples are host names to use for certain services, company +names, and email addresses to contact. Since some configuration +scripts generated by Metaconfig ask for such information interactively, +people sometimes wonder how to get that information in +Autoconf-generated configuration scripts, which aren't interactive. + + Such site configuration information should be put in a file that is +edited *only by users*, not by programs. The location of the file can +either be based on the `prefix' variable, or be a standard location +such as the user's home directory. It could even be specified by an +environment variable. The programs should examine that file at run +time, rather than at compile time. Run time configuration is more +convenient for users and makes the configuration process simpler than +getting the information while configuring. *Note Variables for +Installation Directories: (standards)Directory Variables, for more +information on where to put data files. +  File: autoconf.info, Node: Transforming Names, Next: Site Defaults, Prev: Site Details, Up: Site Configuration @@ -49,7 +124,7 @@ the macro `AC_ARG_PROGRAM'. * Menu: -* Transformation Options:: `configure' options to transforme names. +* Transformation Options:: `configure' options to transform names. * Transformation Examples:: Sample uses of transforming names. * Transformation Rules:: `Makefile' uses of transforming names. @@ -89,7 +164,7 @@ same name. For example, if you configure GNU `diff' with `--program-prefix=g', then when you run `make install' it is installed as `/usr/local/bin/gdiff'. - As a more sophistocated example, you could use + As a more sophisticated example, you could use --program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/' to prepend `g' to most of the program names in a source tree, excepting @@ -170,6 +245,17 @@ file in a site file, it is a good idea to also set the output variable `CC' in that site file, because the cache file is only valid for a particular compiler, but many systems have several available. + You can examine or override the value set by a command line option to +`configure' in a site file; options set shell variables that have the +same names as the options, with any dashes turned into underscores. +The exceptions are that `--without-' and `--disable-' options are like +giving the corresponding `--with-' or `--enable-' option and the value +`no'. Thus, `--cache-file=localcache' sets the variable `cache_file' +to the value `localcache'; `--enable-warnings=no' or +`--disable-warnings' sets the variable `enable_warnings' to the value +`no'; `--prefix=/usr' sets the variable `prefix' to the value `/usr'; +etc. + Site files are also good places to set default values for other output variables, such as `CFLAGS', if you need to give them non-default values: anything you would normally do, repetitively, on the command @@ -225,7 +311,7 @@ with Autoconf. * Basic Installation:: Instructions for typical cases. * Compilers and Options:: Selecting compilers and optimization. -* Build Directory:: Configuring in a different directory. +* Multiple Architectures:: Compiling for multiple architectures at once. * Installation Names:: Installing in different directories. * Optional Features:: Selecting optional features. * System Type:: Specifying the system type. @@ -280,12 +366,16 @@ The simplest way to compile this package is: documentation. 5. You can remove the program binaries and object files from the - source directory by typing `make clean'. To also remove the files - that `configure' created (so you can compile the package for a - different kind of computer), type `make distclean'. + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution.  -File: autoconf.info, Node: Compilers and Options, Next: Build Directory, Prev: Basic Installation, Up: Invoking configure +File: autoconf.info, Node: Compilers and Options, Next: Multiple Architectures, Prev: Basic Installation, Up: Invoking configure Compilers and Options ===================== @@ -301,22 +391,27 @@ Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure  -File: autoconf.info, Node: Build Directory, Next: Installation Names, Prev: Compilers and Options, Up: Invoking configure +File: autoconf.info, Node: Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Invoking configure + +Compiling For Multiple Architectures +==================================== -Using a Different Build Directory -================================= + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. - You can compile the package in a different directory from the one -containing the source code. Doing so allows you to compile it on more -than one kind of computer at the same time. To do this, you must use a -version of `make' that supports the `VPATH' variable, such as GNU -`make'. `cd' to the directory where you want the object files and -executables to go and run the `configure' script. `configure' -automatically checks for the source code in the directory that -`configure' is in and in `..'. + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture.  -File: autoconf.info, Node: Installation Names, Next: Optional Features, Prev: Build Directory, Up: Invoking configure +File: autoconf.info, Node: Installation Names, Next: Optional Features, Prev: Multiple Architectures, Up: Invoking configure Installation Names ================== @@ -401,9 +496,9 @@ Operation Controls operates. `--cache-file=FILE' - Save the results of the tests in FILE instead of `config.cache'. - Set FILE to `/dev/null' to disable caching, for debugging - `configure'. + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. `--help' Print a summary of the options to `configure', and exit. @@ -605,14 +700,12 @@ database would be a maintenance nightmare. Autoconf may appear to be this kind of database, but in fact it is not. Instead of listing host dependencies, it lists program requirements. - Imake is special-purpose. It is directed at building the X11 -distribution. By comparison to the GNU tools, this is a simple problem. -If you view the GNU suite as a collection of native tools, then the -problems are similar. But the GNU tools are more powerful than that. -The development tools can be configured as cross tools in almost any -host+target permutation. All of these configurations can be installed -concurrently. They can even be configured to share host independent -files across hosts. Imake doesn't address these issues. + If you view the GNU suite as a collection of native tools, then the +problems are similar. But the GNU development tools can be configured +as cross tools in almost any host+target permutation. All of these +configurations can be installed concurrently. They can even be +configured to share host independent files across hosts. Imake doesn't +address these issues. Imake templates are a form of standardization. The GNU coding standards address the same issues without necessarily imposing the same @@ -642,7 +735,7 @@ Imake build procedure might wrongly assume that all source files are in one big directory tree, or the Imake configuration might assume one compiler whereas the package or the installer needs to use another, or there might be a version mismatch between the Imake expected by the -package and the Imake suported by the host. These problems are much +package and the Imake supported by the host. These problems are much rarer with Autoconf, where each package comes with its own independent configuration processor. @@ -657,7 +750,7 @@ way. Finally, Mark Eichin notes: Imake isn't all that extensible, either. In order to add new -features to Imake, you need to provide you own project template, and +features to Imake, you need to provide your own project template, and duplicate most of the features of the existing one. This means that for a sophisticated project, using the vendor-provided Imake templates fails to provide any leverage--since they don't cover anything that @@ -716,7 +809,7 @@ in a particular package's source directory), you must rename it to `acsite.m4'. *Note Invoking autoconf::. If you distribute `install.sh' with your package, rename it to -`install-sh' so `make' builtin rules won't inadvertantly create a file +`install-sh' so `make' builtin rules won't inadvertently create a file called `install' from it. `AC_PROG_INSTALL' looks for the script under both names, but it is best to use the new name. @@ -735,11 +828,11 @@ files, so they can take advantage of the values of those variables in the environment when `configure' is run. Doing this isn't necessary, but it's a convenience for users. - Also add `@configure_input@' in a comment to each input file for -`AC_OUTPUT', so that the output files will contain a comment saying -they were produced by `configure'. Automatically selecting the right -comment syntax for all the kinds of files that people call `AC_OUTPUT' -on became too much work. + Also add `@configure_input@' in a comment to each non-`Makefile' +input file for `AC_OUTPUT', so that the output files will contain a +comment saying they were produced by `configure'. Automatically +selecting the right comment syntax for all the kinds of files that +people call `AC_OUTPUT' on became too much work. Add `config.log' and `config.cache' to the list of files you remove in `distclean' targets. @@ -754,7 +847,7 @@ you must change it to: prefix = @prefix@ exec_prefix = @exec_prefix@ -The old feature of replacing those variables without `@' characters +The old behavior of replacing those variables without `@' characters around them has been removed.  @@ -1034,90 +1127,3 @@ calling conventions of the Autoconf macros changed from release to release. They all contributed many specific checks, great ideas, and bug fixes. - -File: autoconf.info, Node: Numbers, Next: Deuteronomy, Prev: Leviticus, Up: History - -Numbers -======= - - In July 1992, after months of alpha testing, I released Autoconf 1.0, -and converted many GNU packages to use it. I was surprised by how -positive the reaction to it was. More people started using it than I -could keep track of, including people working on software that wasn't -part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf -continued to improve rapidly, as many people using the `configure' -scripts reported problems they encountered. - - Autoconf turned out to be a good torture test for `m4' -implementations. UNIX `m4' started to dump core because of the length -of the macros that Autoconf defined, and several bugs showed up in GNU -`m4' as well. Eventually, we realized that we needed to use some -features that only GNU `m4' has. 4.3BSD `m4', in particular, has an -impoverished set of builtin macros; the System V version is better, but -still doesn't provide everything we need. - - More development occurred as people put Autoconf under more stresses -(and to uses I hadn't anticipated). Karl Berry added checks for X11. -david zuhn contributed C++ support. Franc,ois Pinard made it diagnose -invalid arguments. Jim Blandy bravely coerced it into configuring GNU -Emacs, laying the groundwork for several later improvements. Roland -McGrath got it to configure the GNU C Library, wrote the `autoheader' -script to automate the creation of C header file templates, and added a -`--verbose' option to `configure'. Noah Friedman added the -`--macrodir' option and `AC_MACRODIR' environment variable. (He also -coined the term "autoconfiscate" to mean "adapt a software package to -use Autoconf".) Roland and Noah improved the quoting protection in -`AC_DEFINE' and fixed many bugs, especially when I got sick of dealing -with portability problems from February through June, 1993. - - -File: autoconf.info, Node: Deuteronomy, Prev: Numbers, Up: History - -Deuteronomy -=========== - - A long wish list for major features had accumulated, and the effect -of several years of patching by various people had left some residual -cruft. In April 1994, while working for Cygnus Support, I began a major -revision of Autoconf. I added most of the features of the Cygnus -`configure' that Autoconf had lacked, largely by adapting the relevant -parts of Cygnus `configure' with the help of david zuhn and Ken -Raeburn. These features include support for using `config.sub', -`config.guess', `--host', and `--target'; making links to files; and -running `configure' scripts in subdirectories. Adding these features -enabled Ken to convert GNU `as', and Rob Savoye to convert DejaGNU, to -using Autoconf. - - I added more features in response to other peoples' requests. Many -people had asked for `configure' scripts to share the results of the -checks between runs, because (particularly when configuring a large -source tree, like Cygnus does) they were frustratingly slow. Mike -Haertel suggested adding site-specific initialization scripts. People -distributing software that had to unpack on MS-DOS asked for a way to -override the `.in' extension on the file names, which produced file -names like `config.h.in' containing two dots. Jim Avera did an -extensive examination of the problems with quoting in `AC_DEFINE' and -`AC_SUBST'; his insights led to significant improvements. Richard -Stallman asked that compiler output be sent to `config.log' instead of -`/dev/null', to help people debug the Emacs `configure' script. - - I made some other changes because of my dissatisfaction with the -quality of the program. I made the messages showing results of the -checks less ambiguous, always printing a result. I regularized the -names of the macros and cleaned up coding style inconsistencies. I -added some auxiliary utilities that I had developed to help convert -source code packages to use Autoconf. With the help of Franc,ois -Pinard, I made the macros not interrupt each others' messages. (That -feature revealed some performance bottlenecks in GNU `m4', which he -hastily corrected!) I reorganized the documentation around problems -people want to solve. And I began a testsuite, because experience had -shown that Autoconf has a pronounced tendency to regress when we change -it. - - Again, several alpha testers gave invaluable feedback, especially -Franc,ois Pinard, Jim Meyering, Karl Berry, Rob Savoye, Ken Raeburn, -and Mark Eichin. - - Finally, version 2.0 was ready. And there was much rejoicing. (And -I have free time again. I think. Yeah, right.) - diff --git a/src/util/autoconf/autoconf.info-5 b/src/util/autoconf/autoconf.info-5 index b18e2b3dd..87df15046 100644 --- a/src/util/autoconf/autoconf.info-5 +++ b/src/util/autoconf/autoconf.info-5 @@ -1,10 +1,13 @@ This is Info file autoconf.info, produced by Makeinfo-1.55 from the -input file ./autoconf.texi. +input file autoconf.texi. START-INFO-DIR-ENTRY * Autoconf: (autoconf). Create source code configuration scripts. END-INFO-DIR-ENTRY + Autoconf: Creating Automatic Configuration Scripts, by David +MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an `m4' macro package. @@ -25,6 +28,93 @@ manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. + +File: autoconf.info, Node: Numbers, Next: Deuteronomy, Prev: Leviticus, Up: History + +Numbers +======= + + In July 1992, after months of alpha testing, I released Autoconf 1.0, +and converted many GNU packages to use it. I was surprised by how +positive the reaction to it was. More people started using it than I +could keep track of, including people working on software that wasn't +part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf +continued to improve rapidly, as many people using the `configure' +scripts reported problems they encountered. + + Autoconf turned out to be a good torture test for `m4' +implementations. UNIX `m4' started to dump core because of the length +of the macros that Autoconf defined, and several bugs showed up in GNU +`m4' as well. Eventually, we realized that we needed to use some +features that only GNU `m4' has. 4.3BSD `m4', in particular, has an +impoverished set of builtin macros; the System V version is better, but +still doesn't provide everything we need. + + More development occurred as people put Autoconf under more stresses +(and to uses I hadn't anticipated). Karl Berry added checks for X11. +david zuhn contributed C++ support. Franc,ois Pinard made it diagnose +invalid arguments. Jim Blandy bravely coerced it into configuring GNU +Emacs, laying the groundwork for several later improvements. Roland +McGrath got it to configure the GNU C Library, wrote the `autoheader' +script to automate the creation of C header file templates, and added a +`--verbose' option to `configure'. Noah Friedman added the +`--macrodir' option and `AC_MACRODIR' environment variable. (He also +coined the term "autoconfiscate" to mean "adapt a software package to +use Autoconf".) Roland and Noah improved the quoting protection in +`AC_DEFINE' and fixed many bugs, especially when I got sick of dealing +with portability problems from February through June, 1993. + + +File: autoconf.info, Node: Deuteronomy, Prev: Numbers, Up: History + +Deuteronomy +=========== + + A long wish list for major features had accumulated, and the effect +of several years of patching by various people had left some residual +cruft. In April 1994, while working for Cygnus Support, I began a major +revision of Autoconf. I added most of the features of the Cygnus +`configure' that Autoconf had lacked, largely by adapting the relevant +parts of Cygnus `configure' with the help of david zuhn and Ken +Raeburn. These features include support for using `config.sub', +`config.guess', `--host', and `--target'; making links to files; and +running `configure' scripts in subdirectories. Adding these features +enabled Ken to convert GNU `as', and Rob Savoye to convert DejaGNU, to +using Autoconf. + + I added more features in response to other peoples' requests. Many +people had asked for `configure' scripts to share the results of the +checks between runs, because (particularly when configuring a large +source tree, like Cygnus does) they were frustratingly slow. Mike +Haertel suggested adding site-specific initialization scripts. People +distributing software that had to unpack on MS-DOS asked for a way to +override the `.in' extension on the file names, which produced file +names like `config.h.in' containing two dots. Jim Avera did an +extensive examination of the problems with quoting in `AC_DEFINE' and +`AC_SUBST'; his insights led to significant improvements. Richard +Stallman asked that compiler output be sent to `config.log' instead of +`/dev/null', to help people debug the Emacs `configure' script. + + I made some other changes because of my dissatisfaction with the +quality of the program. I made the messages showing results of the +checks less ambiguous, always printing a result. I regularized the +names of the macros and cleaned up coding style inconsistencies. I +added some auxiliary utilities that I had developed to help convert +source code packages to use Autoconf. With the help of Franc,ois +Pinard, I made the macros not interrupt each others' messages. (That +feature revealed some performance bottlenecks in GNU `m4', which he +hastily corrected!) I reorganized the documentation around problems +people want to solve. And I began a testsuite, because experience had +shown that Autoconf has a pronounced tendency to regress when we change +it. + + Again, several alpha testers gave invaluable feedback, especially +Franc,ois Pinard, Jim Meyering, Karl Berry, Rob Savoye, Ken Raeburn, +and Mark Eichin. + + Finally, version 2.0 was ready. And there was much rejoicing. (And +I have free time again. I think. Yeah, right.) +  File: autoconf.info, Node: Old Macro Names, Next: Environment Variable Index, Prev: History, Up: Top @@ -231,11 +321,11 @@ Autoconf checks. * Menu: * AC_MACRODIR: Invoking autoupdate. -* AC_MACRODIR: Invoking autoscan. -* AC_MACRODIR: Invoking autoreconf. -* AC_MACRODIR: Invoking ifnames. * AC_MACRODIR: Invoking autoheader. +* AC_MACRODIR: Invoking autoreconf. * AC_MACRODIR: Invoking autoconf. +* AC_MACRODIR: Invoking ifnames. +* AC_MACRODIR: Invoking autoscan. * CONFIG_FILES: Invoking config.status. * CONFIG_HEADERS: Invoking config.status. * CONFIG_SHELL: Invoking config.status. @@ -263,18 +353,18 @@ how this is done. * build_cpu: System Type Variables. * build_os: System Type Variables. * build_vendor: System Type Variables. -* CC: Particular Programs. * CC: UNIX Variants. * CC: Particular Programs. -* CFLAGS: Preset Output Variables. +* CC: Particular Programs. * CFLAGS: Particular Programs. +* CFLAGS: Preset Output Variables. * configure_input: Preset Output Variables. * CPP: Particular Programs. * CPPFLAGS: Preset Output Variables. * CXX: Particular Programs. * CXXCPP: Particular Programs. -* CXXFLAGS: Preset Output Variables. * CXXFLAGS: Particular Programs. +* CXXFLAGS: Preset Output Variables. * DEFS: Preset Output Variables. * exec_prefix: Preset Output Variables. * host: System Type Variables. @@ -290,10 +380,10 @@ how this is done. * LEX: Particular Programs. * LEXLIB: Particular Programs. * LEX_OUTPUT_ROOT: Particular Programs. +* LIBOBJS: Structures. +* LIBOBJS: Generic Functions. * LIBOBJS: Particular Functions. * LIBOBJS: Particular Functions. -* LIBOBJS: Generic Functions. -* LIBOBJS: Structures. * LIBS: UNIX Variants. * LIBS: UNIX Variants. * LIBS: Preset Output Variables. @@ -336,6 +426,7 @@ use these names in `#if' directives. * DIRENT: Particular Headers. * GETGROUPS_T: Particular Typedefs. * GETLODAVG_PRIVILEGED: Particular Functions. +* GETPGRP_VOID: Particular Functions. * gid_t: Particular Typedefs. * HAVE_FUNCTION: Generic Functions. * HAVE_HEADER: Generic Headers. @@ -435,6 +526,7 @@ list easier to use, the macros are listed without their preceding `AC_'. * CHECK_PROG: Generic Programs. * CHECK_PROGS: Generic Programs. * CHECK_SIZEOF: Compiler Characteristics. +* CHECK_TOOL: Generic Programs. * CHECK_TYPE: Generic Typedefs. * COMPILE_CHECK: Examining Libraries. * CONFIG_AUX_DIR: Input. @@ -466,6 +558,7 @@ list easier to use, the macros are listed without their preceding `AC_'. * FUNC_CLOSEDIR_VOID: Particular Functions. * FUNC_GETLOADAVG: Particular Functions. * FUNC_GETMNTENT: Particular Functions. +* FUNC_GETPGRP: Particular Functions. * FUNC_MEMCMP: Particular Functions. * FUNC_MMAP: Particular Functions. * FUNC_SETVBUF_REVERSED: Particular Functions. @@ -557,8 +650,8 @@ list easier to use, the macros are listed without their preceding `AC_'. * SET_MAKE: Old Macro Names. * SIZEOF_TYPE: Old Macro Names. * SIZE_T: Old Macro Names. -* STAT_MACROS_BROKEN: Structures. * STAT_MACROS_BROKEN: Old Macro Names. +* STAT_MACROS_BROKEN: Structures. * STDC_HEADERS: Old Macro Names. * STRCOLL: Old Macro Names. * STRUCT_ST_BLKSIZE: Structures. diff --git a/src/util/autoconf/autoconf.sh b/src/util/autoconf/autoconf.sh index 5ae95c710..65b1326d8 100644 --- a/src/util/autoconf/autoconf.sh +++ b/src/util/autoconf/autoconf.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # autoconf -- create `configure' using m4 macros # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. @@ -31,15 +31,16 @@ Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir] if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LANG+set}" = set; then LANG=C; export LANG; fi -test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@ -test -z "${M4}" && M4=@M4@ +: ${AC_MACRODIR=@datadir@} +: ${M4=@M4@} case "${M4}" in /*) # Handle the case that m4 has moved since we were configured. # It may have been found originally in a build directory. test -f "${M4}" || M4=m4 ;; esac -tmpout=/tmp/acout.$$ +: ${TMPDIR=/tmp} +tmpout=${TMPDIR}/acout.$$ localdir= show_version=no @@ -91,7 +92,7 @@ esac trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15 -tmpin=/tmp/acin.$$ # Always set this, to avoid bogus errors from some rm's. +tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's. if test z$infile = z-; then infile=$tmpin cat > $infile diff --git a/src/util/autoconf/autoconf.texi b/src/util/autoconf/autoconf.texi index 3ec9655cb..476a2cc35 100644 --- a/src/util/autoconf/autoconf.texi +++ b/src/util/autoconf/autoconf.texi @@ -6,9 +6,9 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 2.1 -@set VERSION 2.1 -@set UPDATED November 1994 +@set EDITION 2.3 +@set VERSION 2.3 +@set UPDATED March 1995 @iftex @finalout @@ -21,6 +21,8 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY @end format +Autoconf: Creating Automatic Configuration Scripts, by David MacKenzie. + This file documents the GNU Autoconf package for creating scripts to configure source code packages using templates and an @code{m4} macro package. @@ -141,7 +143,7 @@ Initialization and Output Files Substitutions in Makefiles * Preset Output Variables:: Output variables that are always set. -* Build Directories:: Compiling in a different directory. +* Build Directories:: Supporting multiple concurrent compiles. * Automatic Remaking:: Makefile rules for configuring. Configuration Header Files @@ -240,7 +242,7 @@ Site Configuration Transforming Program Names When Installing -* Transformation Options:: @code{configure} options to transforme names. +* Transformation Options:: @code{configure} options to transform names. * Transformation Examples:: Sample uses of transforming names. * Transformation Rules:: @file{Makefile} uses of transforming names. @@ -248,7 +250,7 @@ Running @code{configure} Scripts * Basic Installation:: Instructions for typical cases. * Compilers and Options:: Selecting compilers and optimization. -* Build Directory:: Configuring in a different directory. +* Multiple Architectures:: Compiling for multiple architectures at once. * Installation Names:: Installing in different directories. * Optional Features:: Selecting optional features. * System Type:: Specifying the system type. @@ -753,7 +755,9 @@ Process any command-line arguments and find the source code directory. @var{unique-file-in-source-dir} is some file that is in the package's source directory; @code{configure} checks for this file's existence to make sure that the directory that it is told contains the source code in -fact does (@pxref{Invoking configure}, for more information). +fact does. Occasionally people accidentally specify the wrong directory +with @samp{--srcdir}; this is a safety check. @xref{Invoking configure}, +for more information. @end defmac Packages that do manual configuration or use the @code{install} program @@ -873,7 +877,7 @@ GNU Coding Standards}, for more information on what to put in @menu * Preset Output Variables:: Output variables that are always set. -* Build Directories:: Compiling in a different directory. +* Build Directories:: Supporting multiple concurrent compiles. * Automatic Remaking:: Makefile rules for configuring. @end menu @@ -896,7 +900,7 @@ reference this variable in a comment at the top of each input file. For example, an input shell script should begin like this: @example -#!/bin/sh +#! /bin/sh # @@configure_input@@ @end example @@ -978,11 +982,9 @@ linking programs to test for C features. @node Build Directories, Automatic Remaking, Preset Output Variables, Makefile Substitutions @subsection Build Directories -You might want to compile a software package in a different directory -from the one that contains the source code. Doing this allows you to -compile the package for several architectures simultaneously from the -same copy of the source code and keep multiple sets of object files on -disk. +You can support compiling a software package for several architectures +simultaneously from the same copy of the source code. The object files +for each architecture are kept in their own directory. To support doing this, @code{make} uses the @code{VPATH} variable to find the files that are in the source directory. GNU @code{make} and @@ -1003,7 +1005,7 @@ Do not set @code{VPATH} to the value of another variable, for example variable substitutions on the value of @code{VPATH}. @code{configure} substitutes in the correct value for @code{srcdir} when -it produces @file{Makefile.in}. +it produces @file{Makefile}. Do not use the @code{make} variable @code{$<}, which expands to the pathname of the file in the source directory (found with @code{VPATH}), @@ -1040,7 +1042,8 @@ recompilation. You should include the file @file{stamp-h.in} your package's distribution, so @code{make} will consider @file{config.h.in} up to date. On some old BSD systems, @code{touch} or any command that results in an empty file does not update the timestamps, so use a -command like @code{date} as a workaround. +command like @code{echo} as a workaround. +@c Using @code{date} would cause needless CVS conflicts. @example @group @@ -1052,7 +1055,7 @@ $@{srcdir@}/config.h.in: stamp-h.in $@{srcdir@}/stamp-h.in: configure.in aclocal.m4 acconfig.h \ config.h.top config.h.bot cd $@{srcdir@} && autoheader - date > $@{srcdir@}/stamp-h.in + echo timestamp > $@{srcdir@}/stamp-h.in config.h: stamp-h stamp-h: config.h.in config.status @@ -1066,10 +1069,10 @@ config.status: configure @end group @end example -In addition, you should pass @samp{date > stamp-h} in the @var{extra-cmds} -argument to @code{AC_OUTPUT}, so @file{config.status} will ensure that -@file{config.h} is considered up to date. @xref{Output}, for more -information about @code{AC_OUTPUT}. +In addition, you should pass @samp{echo timestamp > stamp-h} in the +@var{extra-cmds} argument to @code{AC_OUTPUT}, so @file{config.status} +will ensure that @file{config.h} is considered up to date. +@xref{Output}, for more information about @code{AC_OUTPUT}. @xref{Invoking config.status}, for more examples of handling configuration-related dependencies. @@ -1335,7 +1338,7 @@ particular @code{configure} corresponds to. It is a good idea to call this macro before @code{AC_INIT} so that the revision number is near the top of both @file{configure.in} and @code{configure}. To support doing that, the @code{AC_REVISION} output -begins with @samp{#!/bin/sh}, like the normal start of a +begins with @samp{#! /bin/sh}, like the normal start of a @code{configure} script does. For example, this line in @file{configure.in}: @@ -1349,7 +1352,7 @@ AC_REVISION($@asis{Revision: 1.30 }$)dnl produces this in @code{configure}: @example -#!/bin/sh +#! /bin/sh # From configure.in Revision: 1.30 @end example @end defmac @@ -1577,7 +1580,15 @@ to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}. These macros are used to find programs not covered by the particular test macros. If you need to check the behavior of a program as well as find out whether it is present, you have to write your own test for -it (@pxref{Writing Tests}). +it (@pxref{Writing Tests}). If you need to check for a program that +might not be in the user's @code{PATH}, you can temporarily add to it: + +@example +ac_save_path="$PATH" +PATH=/usr/libexec:/usr/sbin:/usr/etc:/etc +AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd) +PATH="$ac_save_path" +@end example @defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]}) @maindex CHECK_PROG @@ -1598,6 +1609,21 @@ list are found, set @var{variable} to @var{value-if-not-found}; if is not changed. Calls @code{AC_SUBST} for @var{variable}. @end defmac +@defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) +@maindex CHECK_TOOL +Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for} +with a prefix of the host type as determined by @code{AC_CANONICAL_HOST}, +followed by a dash (@pxref{Canonicalizing}). For example, if the user +runs @samp{configure --host=i386-gnu}, then this call: +@example +AC_CHECK_TOOL(RANLIB, ranlib, :) +@end example +@noindent +sets @code{RANLIB} to @file{i386-gnu-ranlib} if that program exists in +@code{PATH}, or to @samp{ranlib} if that program exists in @code{PATH}, +or to @samp{:} if neither program exists. +@end defmac + @defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]}) @maindex PATH_PROG Like @code{AC_CHECK_PROG}, but set @var{variable} to the entire @@ -1633,8 +1659,8 @@ add @samp{-l@var{library}} to @code{LIBS} and define If linking with @var{library} results in unresolved symbols, which would be resolved by linking with additional libraries, give those libraries -as the @var{other-libraries} argument, separated by spaces: @samp{-lX11 --lXt}. Otherwise this macro will fail to detect that @var{library} is +as the @var{other-libraries} argument, separated by spaces: @samp{-lXt +-lX11}. Otherwise this macro will fail to detect that @var{library} is present, because linking the test program will always fail with unresolved symbols. @end defmac @@ -1781,11 +1807,21 @@ to the name of the group that should own the installed program. @defmac AC_FUNC_GETMNTENT @maindex FUNC_GETMNTENT @cvindex HAVE_GETMNTENT -Check for the @code{getmntent} in the @file{sun} and @file{seq} +Check for @code{getmntent} in the @file{sun} and @file{seq} libraries, for Irix 4 and PTX, respectively. Then, if @code{getmntent} is available, define @code{HAVE_GETMNTENT}. @end defmac +@defmac AC_FUNC_GETPGRP +@maindex FUNC_GETPGRP +@cvindex GETPGRP_VOID +If @code{getpgrp} takes no argument (the POSIX.1 version), define +@code{GETPGRP_VOID}. Otherwise, it is the BSD version, which takes a +process ID as an argument. This macro does not check whether +@code{getpgrp} exists at all; if you need to work in that situation, +first call @code{AC_CHECK_FUNC} for @code{getpgrp}. +@end defmac + @defmac AC_FUNC_MEMCMP @maindex FUNC_MEMCMP @ovindex LIBOBJS @@ -1840,7 +1876,9 @@ If @file{vfork.h} is found, define @code{HAVE_VFORK_H}. If a working @code{vfork} is not found, define @code{vfork} to be @code{fork}. This macro checks for several known errors in implementations of @code{vfork} and considers the system to not have a working @code{vfork} if it -detects any of them. +detects any of them. It is not considered to be an implementation error +if a child's invocation of @code{signal} modifies the parent's signal +handler, since child processes rarely change their signal handlers. @end defmac @defmac AC_FUNC_VPRINTF @@ -2395,9 +2433,9 @@ it as empty. @defmac AC_C_INLINE @maindex C_INLINE @cvindex inline -If the C compiler is a version of GCC that supports the keyword -@code{__inline} but not @code{inline} (such as some NeXT versions), -define @code{inline} to be @code{__inline}. +If the C compiler supports the keyword @code{inline}, do nothing. +Otherwise define @code{inline} to @code{__inline__} or @code{__inline} +if it accepts one of those, otherwise define @code{inline} to be empty. @end defmac @defmac AC_C_CHAR_UNSIGNED @@ -2454,7 +2492,7 @@ The following macros check for operating system services or capabilities. @defmac AC_SYS_INTERPRETER @maindex SYS_INTERPRETER Check whether the system supports starting scripts with a line of the -form @samp{#!/bin/csh} to select the interpreter to use for the script. +form @samp{#! /bin/csh} to select the interpreter to use for the script. After running this macro, shell code in @code{configure.in} can check the variable @code{ac_cv_sys_interpreter}; it will be set to @samp{yes} if the system supports @samp{#!}, @samp{no} if not. @@ -2484,16 +2522,21 @@ otherwise set it to the empty string. @ovindex X_LIBS @ovindex X_EXTRA_LIBS @ovindex X_PRE_LIBS -An enhanced version of @code{AC_PATH_X}. Add the C compiler flags that +An enhanced version of @code{AC_PATH_X}. It adds the C compiler flags that X needs to output variable @code{X_CFLAGS}, and the X linker flags to -@code{X_LIBS}. If X is not available, add @samp{-DX_DISPLAY_MISSING} to +@code{X_LIBS}. If X is not available, adds @samp{-DX_DISPLAY_MISSING} to @code{X_CFLAGS}. -Also check for special libraries that some systems need in order to -compile X programs. Add any that the system needs to output variable -@code{X_EXTRA_LIBS}. And check for special X11R6 libraries that need to -be linked with before @samp{-lX11}, and add any found to the output -variable @code{X_PRE_LIBS}. +This macro also checks for special libraries that some systems need in +order to compile X programs. It adds any that the system needs to +output variable @code{X_EXTRA_LIBS}. And it checks for special X11R6 +libraries that need to be linked with before @samp{-lX11}, and adds any +found to the output variable @code{X_PRE_LIBS}. + +@c This is an incomplete kludge. Make a real way to do it. +@c If you need to check for other X functions or libraries yourself, then +@c after calling this macro, add the contents of @code{X_EXTRA_LIBS} to +@c @code{LIBS} temporarily, like this: @end defmac @defmac AC_SYS_LONG_FILE_NAMES @@ -2601,6 +2644,10 @@ any messages, for the same reason. The checks for particular kinds of C features call these macros and do cache their results and print messages about what they're checking for. +When you write a feature test that could be applicable to more than one +software package, the best thing to do is encapsulate it in a new macro. +@xref{Writing Macros}, for how to do that. + @menu * Examining Declarations:: Detecting header files and declarations. * Examining Syntax:: Detecting language syntax features. @@ -2712,7 +2759,9 @@ there are unresolved functions in the link. This bug makes the configuration scripts produced by Autoconf unusable on those systems. However, some of them can be given options that make the exit status correct. This is a problem that Autoconf does not currently handle -automatically. +automatically. If users encounter this problem, they might be able to +solve it by setting @code{LDFLAGS} in the environment to pass whatever +options the linker needs (for example, @samp{-Wl,-dn} on MIPS RISC/OS). @code{AC_TRY_LINK} is used to compile test programs to test for functions and global variables. It is also used (by @@ -2895,7 +2944,14 @@ advantage of features that were added after UNIX version 7, circa 1977. You should not use shell functions, aliases, negated character classes, or other features that are not found in all Bourne-compatible shells; restrict yourself to the lowest common denominator. Even @code{unset} -is not supported by all shells! +is not supported by all shells! Also, include a space after the +exclamation point in interpreter specifications, like this: +@example +#! /usr/bin/perl +@end example +If you omit the space before the path, then 4.2BSD based systems (such +as Sequent DYNIX) will ignore the line, because they interpret @samp{#! /} +as a 4-byte magic number. The set of external programs you should run in a @code{configure} script is fairly small. @xref{Utilities in Makefiles, , Utilities in @@ -3347,7 +3403,7 @@ This macro prints nothing if @code{configure} is run with the @maindex MSG_ERROR Notify the user of an error that prevents @code{configure} from completing. This macro prints an error message on the standard error -stream and exits @code{configure} with a nonzero status. +output and exits @code{configure} with a nonzero status. @var{error-description} should be something like @samp{invalid value $HOME for \$HOME}. @end defmac @@ -3355,7 +3411,7 @@ $HOME for \$HOME}. @defmac AC_MSG_WARN (@var{problem-description}) @maindex MSG_WARN Notify the @code{configure} user of a possible problem. This macro -prints the message on the standard error stream; @code{configure} +prints the message on the standard error output; @code{configure} continues running afterward, so macros that call @code{AC_MSG_WARN} should provide a default (back-up) behavior for the situations they warn about. @var{problem-description} should be something like @samp{ln -s seems to @@ -3656,8 +3712,8 @@ a suggestion for what to use instead of @var{this-macro-name}. A few kinds of features can't be guessed automatically by running test programs. For example, the details of the object file format, or -special options that need to be passed to the compiler or linker. It is -possible to check for such features using ad-hoc means, such as having +special options that need to be passed to the compiler or linker. You +can check for such features using ad-hoc means, such as having @code{configure} check the output of the @code{uname} program, or looking for libraries that are unique to particular systems. However, Autoconf provides a uniform method for handling unguessable features. @@ -3822,6 +3878,10 @@ creates in the current directory @file{host.h}, which is a link to to @file{@var{srcdir}/config/$@{obj_format@}.h}. @end defmac +You can also use the host system type to find cross-compilation tools. +@xref{Generic Programs}, for information about the @code{AC_CHECK_TOOL} +macro which does that. + @node Site Configuration, Invoking configure, Manual Configuration, Top @chapter Site Configuration @@ -3870,17 +3930,19 @@ 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 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{]}) +@defmac AC_ARG_WITH (@var{package}, @var{help-string} @r{[}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]]}) @maindex ARG_WITH If the user gave @code{configure} the option @samp{--with-@var{package}} or @samp{--without-@var{package}}, run shell commands -@var{action-if-true}. Otherwise run shell commands -@var{action-if-false}. The name @var{package} indicates another +@var{action-if-given}. If neither option was given, run shell commands +@var{action-if-not-given}. The name @var{package} indicates another software package that this program should work with. It should consist only of alphanumeric characters and dashes. The option's argument is available to the shell commands -@var{action-if-true} in the shell variable @code{withval}. +@var{action-if-given} in the shell variable @code{withval}, which is +actually just the value of the shell variable @code{with_@var{package}}; +you may use that variable instead, if you wish. The argument @var{help-string} is a description of the option which looks like this: @@ -3894,7 +3956,7 @@ Avoid tabs in the help string. You'll need to enclose it in @samp{[} and @samp{]} in order to produce the leading spaces. @end defmac -@defmac AC_WITH (@var{package}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) +@defmac AC_WITH (@var{package}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]}) @maindex WITH This is an obsolete version of @code{AC_ARG_WITH} that does not support providing a help string. @@ -3930,22 +3992,24 @@ For each optional feature, @file{configure.in} should call to include it. Whether each feature is included or not by default, and 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{]}) +@defmac AC_ARG_ENABLE (@var{feature}, @var{help-string} @r{[}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]]}) @maindex ARG_ENABLE If the user gave @code{configure} the option @samp{--enable-@var{feature}} or @samp{--disable-@var{feature}}, run -shell commands @var{action-if-true}. Otherwise run shell commands -@var{action-if-false}. The name @var{feature} indicates an optional -user-level facility. It should consist only of alphanumeric characters -and dashes. +shell commands @var{action-if-given}. If neither option was given, run +shell commands @var{action-if-not-given}. The name @var{feature} +indicates an optional user-level facility. It should consist only of +alphanumeric characters and dashes. The option's argument is available to the shell commands -@var{action-if-true} in the shell variable @code{enableval}. +@var{action-if-given} in the shell variable @code{enableval}, which is +actually just the value of the shell variable @code{enable_@var{package}}; +you may use that variable instead, if you wish. The @var{help-string} argument is like that of @code{AC_ARG_WITH} (@pxref{External Software}). @end defmac -@defmac AC_ENABLE (@var{feature}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) +@defmac AC_ENABLE (@var{feature}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]}) @maindex ENABLE This is an obsolete version of @code{AC_ARG_ENABLE} that does not support providing a help string. @@ -3966,11 +4030,11 @@ edited @emph{only by users}, not by programs. The location of the file can either be based on the @code{prefix} variable, or be a standard location such as the user's home directory. It could even be specified by an environment variable. The programs should examine that file at -run time, rather than at compile time. That approach is more convenient -for users and makes the configuration process simpler than getting the -information while configuring. @xref{Directory Variables, , Variables -for Installation Directories, standards, GNU Coding Standards}, for more -information on where to put data files. +run time, rather than at compile time. Run time configuration is more +convenient for users and makes the configuration process simpler than +getting the information while configuring. @xref{Directory Variables, , +Variables for Installation Directories, standards, GNU Coding +Standards}, for more information on where to put data files. @node Transforming Names, Site Defaults, Site Details, Site Configuration @section Transforming Program Names When Installing @@ -3994,7 +4058,7 @@ is used as a prefix. Otherwise, no program name transformation is done. @end defmac @menu -* Transformation Options:: @code{configure} options to transforme names. +* Transformation Options:: @code{configure} options to transform names. * Transformation Examples:: Sample uses of transforming names. * Transformation Rules:: @file{Makefile} uses of transforming names. @end menu @@ -4032,7 +4096,7 @@ same name. For example, if you configure GNU @code{diff} with @samp{--program-prefix=g}, then when you run @samp{make install} it is installed as @file{/usr/local/bin/gdiff}. -As a more sophistocated example, you could use +As a more sophisticated example, you could use @example --program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/' @end example @@ -4115,6 +4179,17 @@ file in a site file, it is a good idea to also set the output variable @code{CC} in that site file, because the cache file is only valid for a particular compiler, but many systems have several available. +You can examine or override the value set by a command line option to +@code{configure} in a site file; options set shell variables that have +the same names as the options, with any dashes turned into underscores. +The exceptions are that @samp{--without-} and @samp{--disable-} options +are like giving the corresponding @samp{--with-} or @samp{--enable-} +option and the value @samp{no}. Thus, @samp{--cache-file=localcache} +sets the variable @code{cache_file} to the value @samp{localcache}; +@samp{--enable-warnings=no} or @samp{--disable-warnings} sets the variable +@code{enable_warnings} to the value @samp{no}; @samp{--prefix=/usr} sets the +variable @code{prefix} to the value @samp{/usr}; etc. + Site files are also good places to set default values for other output variables, such as @code{CFLAGS}, if you need to give them non-default values: anything you would normally do, repetitively, on the command @@ -4169,7 +4244,7 @@ may use comes with Autoconf. @menu * Basic Installation:: Instructions for typical cases. * Compilers and Options:: Selecting compilers and optimization. -* Build Directory:: Configuring in a different directory. +* Multiple Architectures:: Compiling for multiple architectures at once. * Installation Names:: Installing in different directories. * Optional Features:: Selecting optional features. * System Type:: Specifying the system type. @@ -4367,14 +4442,12 @@ database would be a maintenance nightmare. Autoconf may appear to be this kind of database, but in fact it is not. Instead of listing host dependencies, it lists program requirements. -Imake is special-purpose. It is directed at building the X11 -distribution. By comparison to the GNU tools, this is a simple problem. If you view the GNU suite as a collection of native tools, then the -problems are similar. But the GNU tools are more powerful than that. -The development tools can be configured as cross tools in almost any -host+target permutation. All of these configurations can be installed -concurrently. They can even be configured to share host independent -files across hosts. Imake doesn't address these issues. +problems are similar. But the GNU development tools can be configured +as cross tools in almost any host+target permutation. All of these +configurations can be installed concurrently. They can even be +configured to share host independent files across hosts. Imake doesn't +address these issues. Imake templates are a form of standardization. The GNU coding standards address the same issues without necessarily imposing the same @@ -4406,7 +4479,7 @@ might wrongly assume that all source files are in one big directory tree, or the Imake configuration might assume one compiler whereas the package or the installer needs to use another, or there might be a version mismatch between the Imake expected by the package and the Imake -suported by the host. These problems are much rarer with Autoconf, +supported by the host. These problems are much rarer with Autoconf, where each package comes with its own independent configuration processor. @@ -4421,7 +4494,7 @@ standard way. Finally, Mark Eichin notes: Imake isn't all that extensible, either. In order to add new features to -Imake, you need to provide you own project template, and duplicate most +Imake, you need to provide your own project template, and duplicate most of the features of the existing one. This means that for a sophisticated project, using the vendor-provided Imake templates fails to provide any leverage---since they don't cover anything that your own project needs @@ -4474,7 +4547,7 @@ in a particular package's source directory), you must rename it to @file{acsite.m4}. @xref{Invoking autoconf}. If you distribute @file{install.sh} with your package, rename it to -@file{install-sh} so @code{make} builtin rules won't inadvertantly +@file{install-sh} so @code{make} builtin rules won't inadvertently create a file called @file{install} from it. @code{AC_PROG_INSTALL} looks for the script under both names, but it is best to use the new name. @@ -4490,7 +4563,8 @@ your @file{Makefile.in} files, so they can take advantage of the values of those variables in the environment when @code{configure} is run. Doing this isn't necessary, but it's a convenience for users. -Also add @samp{@@configure_input@@} in a comment to each input file for +Also add @samp{@@configure_input@@} in a comment to each non-@file{Makefile} +input file for @code{AC_OUTPUT}, so that the output files will contain a comment saying they were produced by @code{configure}. Automatically selecting the right comment syntax for all the kinds of files that people call @@ -4515,7 +4589,7 @@ exec_prefix = @@exec_prefix@@ @end example @noindent -The old feature of replacing those variables without @samp{@@} +The old behavior of replacing those variables without @samp{@@} characters around them has been removed. @node Changed Macros, Invoking autoupdate, Changed Makefiles, Upgrading diff --git a/src/util/autoconf/autoheader.sh b/src/util/autoconf/autoheader.sh index 354d4d09d..3fbec2c07 100644 --- a/src/util/autoconf/autoheader.sh +++ b/src/util/autoconf/autoheader.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # autoheader -- create `config.h.in' from `configure.in' # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. @@ -217,9 +217,10 @@ if test -n "$libs"; then done fi +# Handle the case where @BOTTOM@ is the first line of acconfig.h. test -r $localdir/acconfig.h && grep @BOTTOM@ $localdir/acconfig.h >/dev/null && - sed '1,/@BOTTOM@/d' $localdir/acconfig.h + sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h test -f ${config_h}.bot && cat ${config_h}.bot status=0 diff --git a/src/util/autoconf/autoreconf.sh b/src/util/autoconf/autoreconf.sh index b9c35ecf7..538a754c2 100644 --- a/src/util/autoconf/autoreconf.sh +++ b/src/util/autoconf/autoreconf.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # autoreconf - remake all Autoconf configure scripts in a directory tree # Copyright (C) 1994 Free Software Foundation, Inc. @@ -111,7 +111,7 @@ while read dir; do test ! -f $aclocal && aclocal= if test $force = no && test -f configure && - ls -Llt configure configure.in $aclocal | sed 1q | + ls -lt configure configure.in $aclocal | sed 1q | grep 'configure$' > /dev/null then : diff --git a/src/util/autoconf/autoscan.pl b/src/util/autoconf/autoscan.pl index 9f26bfb2d..7b272ed46 100644 --- a/src/util/autoconf/autoscan.pl +++ b/src/util/autoconf/autoscan.pl @@ -1,4 +1,4 @@ -#!@PERL@ +#! @PERL@ # autoscan - Create configure.scan (a preliminary configure.in) for a package. # Copyright (C) 1994 Free Software Foundation, Inc. diff --git a/src/util/autoconf/autoupdate.sh b/src/util/autoconf/autoupdate.sh index 8fd14429d..522d3a598 100644 --- a/src/util/autoconf/autoupdate.sh +++ b/src/util/autoconf/autoupdate.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # autoupdate - modernize a configure.in # Copyright (C) 1994 Free Software Foundation, Inc. diff --git a/src/util/autoconf/config.guess b/src/util/autoconf/config.guess index bc2cbcb0b..19066fbac 100644 --- a/src/util/autoconf/config.guess +++ b/src/util/autoconf/config.guess @@ -1,6 +1,6 @@ -#!/bin/sh +#! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -59,6 +59,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # 1.2 uses "1.2" for uname -r. echo alpha-dec-osf${UNAME_RELEASE} exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; @@ -72,6 +78,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sun4*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but @@ -79,12 +88,26 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; @@ -124,9 +147,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; - *:IRIX:*:*) - echo mips-sgi-irix${UNAME_RELEASE} + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i[34]86:AIX:*:*) echo i386-ibm-aix exit 0 ;; @@ -170,6 +196,12 @@ EOF *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; @@ -234,6 +266,9 @@ EOF hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; @@ -252,19 +287,22 @@ EOF C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:UNICOS:*:*) + CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; - CRAY*Y-MP:UNICOS:*:*) - echo ymp-cray-unicos - exit 0 ;; - CRAY-2:UNICOS:*:*) + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*C90:*:*:*) + echo c90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; - i[34]86:BSD/386:*:*) + i[34]86:BSD/386:*:* | *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) @@ -277,8 +315,29 @@ EOF echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux - exit 0 ;; + # Systems without a BFD linker + if test -d /usr/lib/ldscripts/. ; then + : + else + echo "${UNAME_MACHINE}-unknown-linuxoldld" + exit 0 + fi + # Determine whether the default compiler is a.out or elf + cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i[34]86:DYNIX/ptx:4*:*) @@ -292,13 +351,13 @@ EOF fi exit 0 ;; i[34]86:*:3.2:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL - elif test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 @@ -365,7 +427,14 @@ main () I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else - printf ("m68k-sony-newsos\n"); exit (0); +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); #endif #endif diff --git a/src/util/autoconf/config.sub b/src/util/autoconf/config.sub index bf932cb9d..93371be14 100644 --- a/src/util/autoconf/config.sub +++ b/src/util/autoconf/config.sub @@ -1,6 +1,6 @@ -#!/bin/sh +#! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -42,6 +42,15 @@ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # It is wrong to echo any other type of specification. +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + # First pass through any local machine types. case $1 in *local*) @@ -104,7 +113,7 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` ;; - -lynx) + -lynx*) os=-lynxos ;; -ptx*) @@ -119,11 +128,13 @@ esac case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ + tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \ + | arme[lb] | pyramid \ | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ - | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel ) + | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ + | pdp11 | mips64el | mips64orion | mips64orionel \ + | sparc) basic_machine=$basic_machine-unknown ;; # Object if more than one company name word. @@ -134,12 +145,12 @@ case $basic_machine in # Recognize the basic CPU types with company name. vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* ) + | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -407,17 +418,43 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium-*) - # We will change tis to say i586 once there has been - # time for various packages to start to recognize that. - basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` + pentium | p5 | p6) + # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium + basic_machine=i586-intel + ;; + pentium-* | p5-* | p6-*) + # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + k5) + # We don't have specific support for AMD's K5 yet, so just call it a Pentium + basic_machine=i586-amd + ;; + nexen) + # We don't have specific support for Nexgen yet, so just call it a Pentium + basic_machine=i586-nexgen ;; pn) basic_machine=pn-gould ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; + rm[46]00) + basic_machine=mips-siemens + ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; @@ -462,6 +499,10 @@ case $basic_machine in basic_machine=sparc-sun os=-sunos4 ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; sun3 | sun3-*) basic_machine=m68k-sun ;; @@ -478,6 +519,10 @@ case $basic_machine in tower | tower-32) basic_machine=m68k-ncr ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; ultra3) basic_machine=a29k-nyu os=-sym1 @@ -498,6 +543,10 @@ case $basic_machine in basic_machine=m68k-wrs os=-vxworks ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -572,12 +621,15 @@ case $os in -solaris) os=-solaris2 ;; + -unixware* | svr4*) + os=-sysv4 + ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux|'` ;; # First accept the basic system types. # The portable systems comes first. - # Each alternative must end in a *, to match a version number. + # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ @@ -587,7 +639,9 @@ case $os in | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -winnt*) + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* ) + # Remember, each alternative MUST END IN *, to match a version number. ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` @@ -613,6 +667,13 @@ case $os in -ctix* | -uts*) os=-sysv ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; -triton*) os=-sysv3 ;; @@ -659,12 +720,18 @@ case $basic_machine in *-acorn) os=-riscix1.2 ;; + arm*-semi) + os=-aout + ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; + m68*-apollo) + os=-domain + ;; i386-sun) os=-sunos4.0.2 ;; @@ -734,6 +801,9 @@ case $basic_machine in *-sgi) os=-irix ;; + *-siemens) + os=-sysv4 + ;; *-masscomp) os=-rtu ;; @@ -785,6 +855,9 @@ case $basic_machine in -ptx*) vendor=sequent ;; + -vxworks*) + vendor=wrs + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; diff --git a/src/util/autoconf/configure b/src/util/autoconf/configure index adff411cc..cd17c0645 100644 --- a/src/util/autoconf/configure +++ b/src/util/autoconf/configure @@ -1,8 +1,7 @@ -#!/bin/sh - +#! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.1 +# Generated automatically using autoconf version 2.4 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -217,7 +216,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.1" + echo "configure generated by autoconf version 2.4" exit 0 ;; -with-* | --with-*) @@ -280,19 +279,20 @@ if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi -trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: -# 0 unused; standard input +# 0 standard input # 1 file creation # 2 errors and warnings -# 3 unused; some systems may open it to /dev/tty -# 4 checking for... messages and results +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then - exec 4>/dev/null + exec 6>/dev/null else - exec 4>&1 + exec 6>&1 fi exec 5>./config.log @@ -382,8 +382,8 @@ fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5' -ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -421,9 +421,9 @@ for ac_prog in gm4 gnum4 m4 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>&4 -if eval "test \"`echo '${'ac_cv_path_M4'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&4 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else case "$M4" in /*) @@ -444,21 +444,53 @@ esac fi M4="$ac_cv_path_M4" if test -n "$M4"; then - echo "$ac_t""$M4" 1>&4 + echo "$ac_t""$M4" 1>&6 else - echo "$ac_t""no" 1>&4 + echo "$ac_t""no" 1>&6 fi test -n "$M4" && break done test -n "$M4" || M4="m4" +for ac_prog in mawk gawk nawk awk +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 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AWK" && break +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>&4 -if eval "test \"`echo '${'ac_cv_path_PERL'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&4 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else case "$PERL" in /*) @@ -480,9 +512,9 @@ esac fi PERL="$ac_cv_path_PERL" if test -n "$PERL"; then - echo "$ac_t""$PERL" 1>&4 + echo "$ac_t""$PERL" 1>&6 else - echo "$ac_t""no" 1>&4 + echo "$ac_t""no" 1>&6 fi if test "$PERL" != no; then @@ -501,15 +533,16 @@ fi # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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>&4 +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 if test -z "$INSTALL"; then -if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&4 +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do - case "$ac_dir" in - ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;; + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. for ac_prog in ginstall installbsd scoinst install; do @@ -534,7 +567,7 @@ else fi INSTALL="$ac_cv_path_install" fi -echo "$ac_t""$INSTALL" 1>&4 +echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -549,7 +582,7 @@ if test -f $srcdir/standards.texi; then fi trap '' 1 2 15 -cat > $cache_file.$$ <<\EOF +cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. @@ -565,26 +598,24 @@ cat > $cache_file.$$ <<\EOF # --recheck option to rerun configure. # EOF -# Ultrix sh set writes to stderr and can't be redirected directly. -# Ultrix sh set also returns variables that were read in from the config file -# with their high bit set. -(set) 2>&1 | tr '\201-\377' '\001-\177' | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \ - >> $cache_file.$$ -if cmp -s $cache_file $cache_file.$$; then - true +# 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. +(set) 2>&1 | + sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ + >> confcache +if cmp -s $cache_file confcache; then + : else if test -w $cache_file; then echo "updating cache $cache_file" - cat $cache_file.$$ > $cache_file + cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" - diff $cache_file $cache_file.$$ fi fi -rm -f $cache_file.$$ +rm -f confcache -trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15 +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. @@ -619,7 +650,7 @@ rm -f conftest.defs echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS < +# and Paul Eggert . usage="\ Usage: ifnames [-h] [--help] [-m dir] [--macrodir=dir] [--version] [file...]" show_version=no -test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@ +: ${AC_MACRODIR=@datadir@} while test $# -gt 0; do case "$1" in @@ -55,39 +56,45 @@ if test $show_version = yes; then exit 0 fi -if test $# -eq 0; then - cat > stdin - set stdin - trap 'rm -f stdin' 0 - trap 'rm -f stdin; exit 1' 1 3 15 -fi +@AWK@ ' + # Record that sym was found in FILENAME. + function file_sym(sym, i, fs) { + if (sym ~ /^[A-Za-z_]/) { + if (!found[sym,FILENAME]) { + found[sym,FILENAME] = 1 + + # Insert FILENAME into files[sym], keeping the list sorted. + i = 1 + fs = files[sym] + while (match(substr(fs, i), /^ [^ ]*/) \ + && substr(fs, i + 1, RLENGTH - 1) < FILENAME) { + i += RLENGTH + } + files[sym] = substr(fs, 1, i - 1) " " FILENAME substr(fs, i) + } + } + } + + /^[\t ]*#/ { + if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0)) { + sub(/[^A-Za-z_0-9].*/, "", $0) + file_sym($0) + } + if (sub(/^[\t ]*#[\t ]*(el)?if[\t ]+/, "", $0)) { + # Remove comments. Not perfect, but close enough. + gsub(/\/\*[^\/]*(\*\/)?/, "", $0) + + for (i = split($0, field, /[^A-Za-z_0-9]+/); 1 <= i; i--) { + if (field[i] != "defined") { + file_sym(field[i]) + } + } + } + } -for arg -do -# The first two substitutions remove comments. Not perfect, but close enough. -# The second is for comments that end on a later line. The others do: -# Enclose identifiers in @ and a space. -# Handle "#if 0" -- there are no @s to trigger removal. -# Remove non-identifiers. -# Remove any spaces at the end. -# Translate any other spaces to newlines. -sed -n ' -s%/\*[^/]*\*/%%g -s%/\*[^/]*%%g -/^[ ]*#[ ]*ifn*def[ ][ ]*\([A-Za-z0-9_]*\).*/s//\1/p -/^[ ]*#[ ]*e*l*if[ ]/{ - s/// - s/@//g - s/\([A-Za-z_][A-Za-z_0-9]*\)/@\1 /g - s/$/@ / - s/@defined //g - s/[^@]*@\([^ ]* \)[^@]*/\1/g - s/ *$// - s/ /\ -/g - p -} -' $arg | sort -u | sed 's%$% '$arg'%' -done | awk ' -{ files[$1] = files[$1] " " $2 } -END { for (sym in files) print sym files[sym] }' | sort + END { + for (sym in files) { + print sym files[sym] + } + } +' ${1+"$@"} | sort diff --git a/src/util/autoconf/install-sh b/src/util/autoconf/install-sh index ab74c882e..89fc9b098 100644 --- a/src/util/autoconf/install-sh +++ b/src/util/autoconf/install-sh @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5. diff --git a/src/util/autoconf/install.texi b/src/util/autoconf/install.texi index bff0738b8..0d9483116 100644 --- a/src/util/autoconf/install.texi +++ b/src/util/autoconf/install.texi @@ -55,10 +55,13 @@ Type @samp{make install} to install the programs and any data files and documentation. @item -You can remove the program binaries and object files from the source +You can remove the program binaries and object files from the source code directory by typing @samp{make clean}. To also remove the files that @code{configure} created (so you can compile the package for a different -kind of computer), type @samp{make distclean}. +kind of computer), type @samp{make distclean}. There is also a +@samp{make maintainer-clean} target, but that is intended mainly for the +package's developers. If you use it, you may have to get all sorts of +other programs in order to regenerate files that came with the distribution. @end enumerate @node Compilers and Options @@ -79,17 +82,23 @@ Or on systems that have the @code{env} program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure @end example -@node Build Directory -@section Using a Different Build Directory +@node Multiple Architectures +@section Compiling For Multiple Architectures -You can compile the package in a different directory from the one -containing the source code. Doing so allows you to compile it on more -than one kind of computer at the same time. To do this, you must use a -version of @code{make} that supports the @code{VPATH} variable, such as -GNU @code{make}. @code{cd} to the directory where you want the object -files and executables to go and run the @code{configure} script. -@code{configure} automatically checks for the source code in the -directory that @code{configure} is in and in @file{..}. +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of @code{make} that +supports the @code{VPATH} variable, such as GNU @code{make}. @code{cd} +to the directory where you want the object files and executables to go +and run the @code{configure} script. @code{configure} automatically +checks for the source code in the directory that @code{configure} is in +and in @file{..}. + +If you have to use a @code{make} that does not supports the @code{VPATH} +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use @samp{make distclean} before reconfiguring for +another architecture. @node Installation Names @section Installation Names @@ -168,8 +177,8 @@ operates. @table @code @item --cache-file=@var{file} -Save the results of the tests in @var{file} instead of -@file{config.cache}. Set @var{file} to @file{/dev/null} to disable +Use and save the results of the tests in @var{file} instead of +@file{./config.cache}. Set @var{file} to @file{/dev/null} to disable caching, for debugging @code{configure}. @item --help diff --git a/src/util/autoconf/make-stds.texi b/src/util/autoconf/make-stds.texi index 95a42ec78..887b7ade2 100644 --- a/src/util/autoconf/make-stds.texi +++ b/src/util/autoconf/make-stds.texi @@ -163,6 +163,11 @@ the file names where they should reside for actual use. If there is a simple test to verify that a program is properly installed, this target should run that test. +If possible, write the @code{install} target rule so that it does not +modify anything in the directory where the program was built, provided +@samp{make all} has just been done. This is convenient for building the +program under one user name and installing it under another. + The commands should create all the directories in which files are to be installed, if they don't already exist. This includes the directories specified as the values of the variables @code{prefix} and @@ -205,6 +210,9 @@ Delete all the installed files that the @samp{install} target would create (but not the noninstalled files such as @samp{make all} would create). +This rule should not modify the directories where compilation is done, +only the directories where files are installed. + @comment The gratuitous blank line here is to make the table look better @comment in the printed Make manual. Please leave it in. @item clean @@ -228,17 +236,34 @@ normally don't want to recompile. For example, the @samp{mostlyclean} target for GCC does not delete @file{libgcc.a}, because recompiling it is rarely necessary and takes a lot of time. -@item realclean -Delete everything from the current directory that can be reconstructed -with this Makefile. This typically includes everything deleted by -@code{distclean}, plus more: C source files produced by Bison, tags tables, -Info files, and so on. +@item maintainer-clean +Delete almost everything from the current directory that can be +reconstructed with this Makefile. This typically includes everything +deleted by @code{distclean}, plus more: C source files produced by +Bison, tags tables, Info files, and so on. + +The reason we say ``almost everything'' is that @samp{make +maintainer-clean} should not delete @file{configure} even if +@file{configure} can be remade using a rule in the Makefile. More +generally, @samp{make maintainer-clean} should not delete anything that +needs to exist in order to run @file{configure} and then begin to build +the program. This is the only exception; @code{maintainer-clean} should +delete everything else that can be rebuilt. + +The @samp{maintainer-clean} is intended to be used by a maintainer of +the package, not by ordinary users. You may need special tools to +reconstruct some of the files that @samp{make maintainer-clean} deletes. +Since these files are normally included in the distribution, we don't +take care to make them easy to reconstruct. If you find you need to +unpack the full distribution again, don't blame us. + +To help make users aware of this, the commands for +@code{maintainer-clean} should start with these two: -One exception, however: @samp{make realclean} should not delete -@file{configure} even if @file{configure} can be remade using a rule in -the Makefile. More generally, @samp{make realclean} should not delete -anything that needs to exist in order to run @file{configure} -and then begin to build the program. +@example +@@echo "This command is intended for maintainers to use;" +@@echo "it deletes files that may require special tools to rebuild." +@end example @item TAGS Update a tags table for this program. @@ -327,6 +352,9 @@ installdirs: mkinstalldirs $(libdir) $(infodir) \ $(mandir) @end smallexample + +This rule should not modify the directories where compilation is done. +It should do nothing but create installation directories. @end table @node Command Variables @@ -401,7 +429,9 @@ installed. Installation directories should always be named by variables, so it is easy to install in a nonstandard place. The standard names for these -variables are as follows. +variables are described below. They are based on a standard filesystem +layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and +other modern operating systems. These two variables set the root for the installation. All the other installation directories should be subdirectories of one of these two, @@ -411,7 +441,8 @@ and nothing should be directly installed into these two directories. @item prefix A prefix used in constructing the default values of the variables listed below. The default value of @code{prefix} should be @file{/usr/local} -(at least for now). +When building the complete GNU system, the prefix will be empty and +@file{/usr} will be a symbolic link to @file{/}. @item exec_prefix A prefix used in constructing the default values of some of the diff --git a/src/util/autoconf/mkinstalldirs b/src/util/autoconf/mkinstalldirs index 91f6d04e1..0801ec2c9 100644 --- a/src/util/autoconf/mkinstalldirs +++ b/src/util/autoconf/mkinstalldirs @@ -1,4 +1,4 @@ -#!/bin/sh +#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 diff --git a/src/util/autoconf/standards.info b/src/util/autoconf/standards.info index 7f3dda81f..6252e51ae 100644 --- a/src/util/autoconf/standards.info +++ b/src/util/autoconf/standards.info @@ -1,5 +1,5 @@ -This is Info file ../standards.info, produced by Makeinfo-1.55 from the -input file ../standards.texi. +This is Info file standards.info, produced by Makeinfo-1.55 from the +input file standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. @@ -24,37 +24,43 @@ translation approved by the Free Software Foundation.  Indirect: -standards.info-1: 960 -standards.info-2: 49450 +standards.info-1: 954 +standards.info-2: 48207 +standards.info-3: 95193  Tag Table: (Indirect) -Node: Top960 -Node: Preface2096 -Node: Reading Non-Free Code3138 -Node: Contributions4868 -Node: Change Logs6466 -Node: Compatibility10182 -Node: Makefile Conventions11821 -Node: Makefile Basics12178 -Node: Utilities in Makefiles14522 -Node: Standard Targets16219 -Node: Command Variables23328 -Node: Directory Variables26158 -Node: Configuration35220 -Node: Source Language42244 -Node: Formatting43374 -Node: Comments46664 -Node: Syntactic Conventions49450 -Node: Names52342 -Node: Using Extensions53632 -Node: System Functions55373 -Node: Semantics60176 -Node: Errors63464 -Node: Libraries64667 -Node: Portability65891 -Node: User Interfaces69178 -Node: Documentation85106 -Node: Releases89040 +Node: Top954 +Node: Preface2091 +Node: Reading Non-Free Code3127 +Node: Contributions4857 +Node: Change Logs6455 +Node: Compatibility10181 +Node: Makefile Conventions11820 +Node: Makefile Basics12177 +Node: Utilities in Makefiles14521 +Node: Standard Targets16218 +Node: Command Variables24726 +Node: Directory Variables27556 +Node: Configuration36859 +Node: Source Language43787 +Node: Formatting44917 +Node: Comments48207 +Node: Syntactic Conventions50994 +Node: Names53886 +Node: Using Extensions55623 +Node: System Functions57364 +Node: Semantics62167 +Node: Errors65800 +Node: Libraries67004 +Node: Portability68228 +Node: User Interfaces71515 +Node: Documentation88583 +Node: GNU Manuals89090 +Node: Manual Structure Details91101 +Node: NEWS File92506 +Node: Man Pages93185 +Node: Reading other Manuals94409 +Node: Releases95193  End Tag Table diff --git a/src/util/autoconf/standards.info-1 b/src/util/autoconf/standards.info-1 index 05178a025..2430ade4a 100644 --- a/src/util/autoconf/standards.info-1 +++ b/src/util/autoconf/standards.info-1 @@ -1,5 +1,5 @@ -This is Info file ../standards.info, produced by Makeinfo-1.55 from the -input file ../standards.texi. +This is Info file standards.info, produced by Makeinfo-1.55 from the +input file standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. @@ -28,7 +28,7 @@ File: standards.info, Node: Top, Next: Preface, Prev: (dir), Up: (dir) Version ******* - Last updated 21 September 1994. + Last updated 16 May 1995. * Menu: @@ -43,7 +43,7 @@ Version * Formatting:: Formatting Your Source Code * Comments:: Commenting Your Work * Syntactic Conventions:: Clean Use of C Constructs -* Names:: Naming Variables and Functions +* Names:: Naming Variables, Functions and Files * Using Extensions:: Using Non-standard Features * System Functions:: Portability and "standard" library functions * Semantics:: Program Behavior for All Programs @@ -74,8 +74,8 @@ suggested new wording for it; our time is limited. We prefer a context diff to the `standards.texi' or `make-stds.texi' files, but if you don't have those files, please mail your suggestion anyway. - This release of the GNU Coding Standards was last updated 21 -September 1994. + This release of the GNU Coding Standards was last updated 16 May +1995.  File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Prev: Preface, Up: Top @@ -165,11 +165,11 @@ eliminate conceptual inconsistencies between different parts of a program; they can give you a history of how the conflicting concepts arose. - Use the Emacs command `M-x add-change' to start a new entry in the -change log. An entry should have an asterisk, the name of the changed -file, and then in parentheses the name of the changed functions, -variables or whatever, followed by a colon. Then describe the changes -you made to that function or variable. + Use the Emacs command `M-x add-change-log-entry' to start a new +entry in the change log. An entry should have an asterisk, the name of +the changed file, and then in parentheses the name of the changed +functions, variables or whatever, followed by a colon. Then describe +the changes you made to that function or variable. Separate unrelated entries with blank lines. When two entries represent parts of the same change, so that they work together, then @@ -408,6 +408,12 @@ Makefiles: there is a simple test to verify that a program is properly installed, this target should run that test. + If possible, write the `install' target rule so that it does not + modify anything in the directory where the program was built, + provided `make all' has just been done. This is convenient for + building the program under one user name and installing it under + another. + The commands should create all the directories in which files are to be installed, if they don't already exist. This includes the directories specified as the values of the variables `prefix' and @@ -446,6 +452,9 @@ Makefiles: create (but not the noninstalled files such as `make all' would create). + This rule should not modify the directories where compilation is + done, only the directories where files are installed. + `clean' Delete all files from the current directory that are normally created by building the program. Don't delete the files that @@ -468,17 +477,32 @@ Makefiles: target for GCC does not delete `libgcc.a', because recompiling it is rarely necessary and takes a lot of time. -`realclean' - Delete everything from the current directory that can be +`maintainer-clean' + Delete almost everything from the current directory that can be reconstructed with this Makefile. This typically includes everything deleted by `distclean', plus more: C source files produced by Bison, tags tables, Info files, and so on. - One exception, however: `make realclean' should not delete - `configure' even if `configure' can be remade using a rule in the - Makefile. More generally, `make realclean' should not delete - anything that needs to exist in order to run `configure' and then - begin to build the program. + The reason we say "almost everything" is that `make + maintainer-clean' should not delete `configure' even if + `configure' can be remade using a rule in the Makefile. More + generally, `make maintainer-clean' should not delete anything that + needs to exist in order to run `configure' and then begin to build + the program. This is the only exception; `maintainer-clean' should + delete everything else that can be rebuilt. + + The `maintainer-clean' is intended to be used by a maintainer of + the package, not by ordinary users. You may need special tools to + reconstruct some of the files that `make maintainer-clean' deletes. + Since these files are normally included in the distribution, we + don't take care to make them easy to reconstruct. If you find you + need to unpack the full distribution again, don't blame us. + + To help make users aware of this, the commands for + `maintainer-clean' should start with these two: + + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." `TAGS' Update a tags table for this program. @@ -554,6 +578,9 @@ programs in which they are useful. $(libdir) $(infodir) \ $(mandir) + This rule should not modify the directories where compilation is + done. It should do nothing but create installation directories. +  File: standards.info, Node: Command Variables, Next: Directory Variables, Prev: Standard Targets, Up: Makefile Conventions @@ -627,7 +654,9 @@ Variables for Installation Directories Installation directories should always be named by variables, so it is easy to install in a nonstandard place. The standard names for these -variables are as follows. +variables are described below. They are based on a standard filesystem +layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and +other modern operating systems. These two variables set the root for the installation. All the other installation directories should be subdirectories of one of these two, @@ -636,7 +665,8 @@ and nothing should be directly installed into these two directories. `prefix' A prefix used in constructing the default values of the variables listed below. The default value of `prefix' should be `/usr/local' - (at least for now). + When building the complete GNU system, the prefix will be empty and + `/usr' will be a symbolic link to `/'. `exec_prefix' A prefix used in constructing the default values of some of the @@ -901,11 +931,10 @@ like this: The `configure' script needs to be able to decode all plausible alternatives for how to describe a machine. Thus, `sun3-sunos4.1' -would be a valid alias. So would `sun3-bsd4.2', since SunOS is -basically BSD and no other BSD system is used on a Sun. For many -programs, `vax-dec-ultrix' would be an alias for `vax-dec-bsd', simply -because the differences between Ultrix and BSD are rarely noticeable, -but a few programs might need to distinguish them. +would be a valid alias. For many programs, `vax-dec-ultrix' would be +an alias for `vax-dec-bsd', simply because the differences between +Ultrix and BSD are rarely noticeable, but a few programs might need to +distinguish them. There is a shell script called `config.sub' that you can use as a subroutine to validate system types and canonicalize aliases. @@ -1119,70 +1148,3 @@ pages at logical places (but not within a function). It does not matter just how long the pages are, since they do not have to fit on a printed page. The formfeeds should appear alone on lines by themselves. - -File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Top - -Commenting Your Work -******************** - - Every program should start with a comment saying briefly what it is -for. Example: `fmt - filter for simple filling of text'. - - Please put a comment on each function saying what the function does, -what sorts of arguments it gets, and what the possible values of -arguments mean and are used for. It is not necessary to duplicate in -words the meaning of the C argument declarations, if a C type is being -used in its customary fashion. If there is anything nonstandard about -its use (such as an argument of type `char *' which is really the -address of the second character of a string, not the first), or any -possible values that would not work the way one would expect (such as, -that strings containing newlines are not guaranteed to work), be sure -to say so. - - Also explain the significance of the return value, if there is one. - - Please put two spaces after the end of a sentence in your comments, -so that the Emacs sentence commands will work. Also, please write -complete sentences and capitalize the first word. If a lower-case -identifer comes at the beginning of a sentence, don't capitalize it! -Changing the spelling makes it a different identifier. If you don't -like starting a sentence with a lower case letter, write the sentence -differently (e.g., "The identifier lower-case is ..."). - - The comment on a function is much clearer if you use the argument -names to speak about the argument values. The variable name itself -should be lower case, but write it in upper case when you are speaking -about the value rather than the variable itself. Thus, "the inode -number NODE_NUM" rather than "an inode". - - There is usually no purpose in restating the name of the function in -the comment before it, because the reader can see that for himself. -There might be an exception when the comment is so long that the -function itself would be off the bottom of the screen. - - There should be a comment on each static variable as well, like this: - - /* Nonzero means truncate lines in the display; - zero means continue them. */ - int truncate_lines; - - Every `#endif' should have a comment, except in the case of short -conditionals (just a few lines) that are not nested. The comment should -state the condition of the conditional that is ending, *including its -sense*. `#else' should have a comment describing the condition *and -sense* of the code that follows. For example: - - #ifdef foo - ... - #else /* not foo */ - ... - #endif /* not foo */ - -but, by contrast, write the comments this way for a `#ifndef': - - #ifndef foo - ... - #else /* foo */ - ... - #endif /* foo */ - diff --git a/src/util/autoconf/standards.info-2 b/src/util/autoconf/standards.info-2 index 25570a041..f80c78e86 100644 --- a/src/util/autoconf/standards.info-2 +++ b/src/util/autoconf/standards.info-2 @@ -1,5 +1,5 @@ -This is Info file ../standards.info, produced by Makeinfo-1.55 from the -input file ../standards.texi. +This is Info file standards.info, produced by Makeinfo-1.55 from the +input file standards.texi. START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. @@ -22,6 +22,73 @@ manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. + +File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Top + +Commenting Your Work +******************** + + Every program should start with a comment saying briefly what it is +for. Example: `fmt - filter for simple filling of text'. + + Please put a comment on each function saying what the function does, +what sorts of arguments it gets, and what the possible values of +arguments mean and are used for. It is not necessary to duplicate in +words the meaning of the C argument declarations, if a C type is being +used in its customary fashion. If there is anything nonstandard about +its use (such as an argument of type `char *' which is really the +address of the second character of a string, not the first), or any +possible values that would not work the way one would expect (such as, +that strings containing newlines are not guaranteed to work), be sure +to say so. + + Also explain the significance of the return value, if there is one. + + Please put two spaces after the end of a sentence in your comments, +so that the Emacs sentence commands will work. Also, please write +complete sentences and capitalize the first word. If a lower-case +identifier comes at the beginning of a sentence, don't capitalize it! +Changing the spelling makes it a different identifier. If you don't +like starting a sentence with a lower case letter, write the sentence +differently (e.g., "The identifier lower-case is ..."). + + The comment on a function is much clearer if you use the argument +names to speak about the argument values. The variable name itself +should be lower case, but write it in upper case when you are speaking +about the value rather than the variable itself. Thus, "the inode +number NODE_NUM" rather than "an inode". + + There is usually no purpose in restating the name of the function in +the comment before it, because the reader can see that for himself. +There might be an exception when the comment is so long that the +function itself would be off the bottom of the screen. + + There should be a comment on each static variable as well, like this: + + /* Nonzero means truncate lines in the display; + zero means continue them. */ + int truncate_lines; + + Every `#endif' should have a comment, except in the case of short +conditionals (just a few lines) that are not nested. The comment should +state the condition of the conditional that is ending, *including its +sense*. `#else' should have a comment describing the condition *and +sense* of the code that follows. For example: + + #ifdef foo + ... + #else /* not foo */ + ... + #endif /* not foo */ + +but, by contrast, write the comments this way for a `#ifndef': + + #ifndef foo + ... + #else /* foo */ + ... + #endif /* foo */ +  File: standards.info, Node: Syntactic Conventions, Next: Names, Prev: Comments, Up: Top @@ -130,8 +197,8 @@ pointer constant.  File: standards.info, Node: Names, Next: Using Extensions, Prev: Syntactic Conventions, Up: Top -Naming Variables and Functions -****************************** +Naming Variables, Functions, and Files +************************************** Please use underscores to separate words in a name, so that the Emacs word commands can be useful within them. Stick to lower case; reserve @@ -158,6 +225,14 @@ this. `doschk' also tests for potential name conflicts if the files were loaded onto an MS-DOS file system--something you may or may not care about. + In general, use `-' to separate words in file names, not `_'. Make +all letters in file names be lower case, except when following specific +conventions that call for upper case in certain kinds of names. +Conventional occasions for using upper case letters in file names +include `Makefile', `ChangeLog', `COPYING' and `README'. It is common +to name other `README'-like documentation files in all upper case just +like `README'. +  File: standards.info, Node: Using Extensions, Next: System Functions, Prev: Names, Up: Top @@ -310,9 +385,10 @@ Program Behavior for All Programs ********************************* Avoid arbitrary limits on the length or number of *any* data -structure, including filenames, lines, files, and symbols, by allocating -all data structures dynamically. In most Unix utilities, "long lines -are silently truncated". This is not acceptable in a GNU utility. +structure, including file names, lines, files, and symbols, by +allocating all data structures dynamically. In most Unix utilities, +"long lines are silently truncated". This is not acceptable in a GNU +utility. Utilities reading files should not drop NUL characters, or any other nonprinting characters *including those with codes above 0177*. The @@ -372,6 +448,12 @@ comments in the source. The relevant data will be in variables, which are easy to examine with the debugger, so there is no point moving them elsewhere. + Do not use a count of errors as the exit status for a program. +*That does not work*, because exit status values are limited to 8 bits +(0 through 255). A single run of the program might have 256 errors; if +you try to return 256 as the exit status, the parent process will see 0 +as the status, and it will appear that the program succeeded. +  File: standards.info, Node: Errors, Next: Libraries, Prev: Semantics, Up: Top @@ -401,8 +483,8 @@ input from a source other than a terminal, it is not interactive and would do best to print error messages using the noninteractive style.) The string MESSAGE should not begin with a capital letter when it -follows a program name and/or filename. Also, it should not end with a -period. +follows a program name and/or file name. Also, it should not end with +a period. Error messages from interactive programs, and other messages such as usage messages, should start with a capital letter. But they should not @@ -576,12 +658,6 @@ output and exits successfully. These options should inhibit the normal function of the command; they should do nothing except print the requested information. -`auto-check' - `-a' in `recode'. - -`auto-reference' - `-A' in `ptx'. - `after-date' `-N' in `tar'. @@ -609,14 +685,29 @@ requested information. `ascii' `-a' in `diff'. +`assign' + `-v' in Gawk. + `assume-new' `-W' in Make. `assume-old' `-o' in Make. +`auto-check' + `-a' in `recode'. + +`auto-pager' + `-a' in `wdiff'. + +`auto-reference' + `-A' in `ptx'. + +`avoid-wraps' + `-n' in `wdiff'. + `backward-search' - `-B' in etags. + `-B' in `ctags'. `basename' `-f' in `shar'. @@ -675,6 +766,9 @@ requested information. `compare' `-d' in `tar'. +`compat' + Used in gawk (no corresponding single-letter option). + `compress' `-Z' in `tar' and `shar'. @@ -687,8 +781,12 @@ requested information. `context' Used in `diff'. +`copyleft' + Used in gawk (no corresponding single-letter option). + `copyright' - `-C' in `ptx' and `recode'. + `-C' in `ptx', `recode', and `wdiff'. Also used in gawk (no + corresponding single-letter option). `core' Used in GDB. @@ -706,7 +804,7 @@ requested information. `-c' in `shar'. `cxref' - `-x' in `etags'. + `-x' in `ctags'. `date' `-d' in `touch'. @@ -718,7 +816,7 @@ requested information. `-D' in `m4'. `defines' - `-d' in Bison and `etags'. + `-d' in Bison and `ctags'. `delete' `-D' in `tar'. @@ -753,9 +851,6 @@ requested information. `discard-locals' `-X' in `strip'. -`diversions' - `-N' in `m4'. - `dry-run' `-n' in Make. @@ -765,6 +860,12 @@ requested information. `elide-empty-files' `-z' in `csplit'. +`end-delete' + `-x' in `wdiff'. + +`end-insert' + `-z' in `wdiff'. + `entire-new-file' `-N' in `diff'. @@ -819,9 +920,12 @@ requested information. `fatal-warnings' `-E' in `m4'. +`field-separator' + p`-F' in Gawk. + `file' - `-f' in `info', Make, `mt', and `tar'; `-n' in `sed'; `-r' in - `touch'. + `-f' in Gawk, `info', Make, `mt', and `tar'; `-n' in `sed'; `-r' + in `touch'. `file-prefix' `-b' in Bison. @@ -856,8 +960,8 @@ requested information. `format' Used in `ls', `time', and `ptx'. -`forward-search' - `-F' in `etags'. +`freeze-state' + `-F' in `m4'. `fullname' Used in GDB. @@ -917,7 +1021,7 @@ requested information. `-B' in `diff'. `ignore-case' - `-f' in `look' and `ptx'; `-i' in `diff'. + `-f' in `look' and `ptx'; `-i' in `diff' and `wdiff'. `ignore-errors' `-i' in Make. @@ -926,7 +1030,7 @@ requested information. `-i' in `ptx'. `ignore-indentation' - `-S' in `etags'. + `-I' in `etags'. `ignore-init-file' `-f' in Oleo. @@ -986,6 +1090,12 @@ requested information. `kilobytes' `-k' in `du' and `ls'. +`language' + `-l' in `etags'. + +`less-mode' + `-l' in `wdiff'. + `level-for-gzip' `-g' in `shar'. @@ -998,6 +1108,9 @@ requested information. `link' `-l' in `cpio'. +`lint' + Used in gawk (no corresponding single-letter option). + `list' `-t' in `cpio'; `-l' in `recode'. @@ -1089,15 +1202,24 @@ requested information. `no-check-existing' `-x' in `shar'. +`no-common' + `-3' in `wdiff'. + `no-create' `-c' in `touch'. `no-defines' `-D' in `etags'. +`no-deleted' + `-1' in `wdiff'. + `no-dereference' `-d' in `cp'. +`no-inserted' + `-2' in `wdiff'. + `no-keep-going' `-S' in Make. @@ -1110,6 +1232,9 @@ requested information. `no-prof' `-e' in `gprof'. +`no-regex' + `-R' in `etags'. + `no-sort' `-p' in `nm'. @@ -1128,9 +1253,6 @@ requested information. `no-validate' Used in Makeinfo. -`no-verbose' - `-v' in `shar'. - `no-warn' Used in various programs to inhibit warnings. @@ -1218,6 +1340,9 @@ requested information. `portability' `-c' in `cpio' and `tar'. +`posix' + Used in gawk (no corresponding single-letter option). + `prefix-builtins' `-P' in `m4'. @@ -1257,6 +1382,12 @@ requested information. `print-symdefs' `-s' in `nm'. +`printer' + `-p' in `wdiff'. + +`prompt' + `-p' in `ed'. + `query-user' `-X' in `shar'. @@ -1267,6 +1398,9 @@ requested information. Used in many programs to inhibit the usual output. *Note:* every program accepting `--quiet' should accept `--silent' as a synonym. +`quiet-unshar' + `-Q' in `shar' + `quote-name' `-Q' in `ls'. @@ -1295,11 +1429,14 @@ requested information. `-r' in `ptx'. `regex' - `-r' in `tac'. + `-r' in `tac' and `etags'. `release' `-r' in `uname'. +`reload-state' + `-R' in `m4'. + `relocation' `-r' in `objdump'. @@ -1376,6 +1513,9 @@ requested information. `sort' Used in `ls'. +`source' + Used in gawk (no corresponding single-letter option). + `sparse' `-S' in `tar'. @@ -1391,10 +1531,19 @@ requested information. `squeeze-blank' `-s' in `cat'. +`start-delete' + `-w' in `wdiff'. + +`start-insert' + `-y' in `wdiff'. + `starting-file' Used in `tar' and `diff' to specify which file within a directory to start processing with. +`statistics' + `-s' in `wdiff'. + `stdin-file-list' `-S' in `shar'. @@ -1447,7 +1596,7 @@ requested information. `-T' in `ls'. `terminal' - `-T' in `tput' and `ul'. + `-T' in `tput' and `ul'. `-t' in `wdiff'. `text' `-a' in `diff'. @@ -1471,16 +1620,16 @@ requested information. `-t' in `m4'. `traditional' - `-t' in `hello'; `-G' in `m4' and `ptx'. + `-t' in `hello'; `-G' in `ed', `m4', and `ptx'. `tty' Used in GDB. `typedefs' - `-t' in `etags'. + `-t' in `ctags'. `typedefs-and-c++' - `-T' in `etags'. + `-T' in `ctags'. `typeset-mode' `-t' in `ptx'. @@ -1498,7 +1647,10 @@ requested information. `-u' in `nm'. `update' - `-u' in `cp', `etags', `mv', `tar'. + `-u' in `cp', `ctags', `mv', `tar'. + +`usage' + Used in gawk (no corresponding single-letter option). `uuencode' `-B' in `shar'. @@ -1519,7 +1671,7 @@ requested information. `-V' in `cp', `ln', `mv'. `vgrind' - `-v' in `etags'. + `-v' in `ctags'. `volume' `-V' in `tar'. @@ -1548,10 +1700,62 @@ File: standards.info, Node: Documentation, Next: Releases, Prev: User Interfa Documenting Programs ******************** - Please use Texinfo for documenting GNU programs. See the Texinfo -manual, either the hardcopy or the version in the GNU Emacs Info -subsystem (`C-h i'). See existing GNU Texinfo files (e.g., those under -the `man/' directory in the GNU Emacs distribution) for examples. +* Menu: + +* GNU Manuals:: Writing proper manuals. +* Manual Structure Details:: Specific structure conventions. +* NEWS File:: NEWS files supplement manuals. +* Man Pages:: Man pages are secondary. +* Reading other Manuals:: How far you can go in learning + from other manuals. + + +File: standards.info, Node: GNU Manuals, Next: Manual Structure Details, Up: Documentation + +GNU Manuals +=========== + + The preferred way to document part of the GNU system is to write a +manual in the Texinfo formatting language. See the Texinfo manual, +either the hardcopy or the version in the Emacs Info subsystem (`C-h +i'). + + The manual should document all of the program's command-line options +and all of its commands. It should give examples of their use. But +don't organize the manual as a list of features. Instead, organize it +logically, by subtopics. Address the goals that a user will have in +mind, and explain how to accomplish them. + + In general, a GNU manual should serve both as tutorial and reference. +It should be set up for convenient access to each topic through Info, +and for reading straight through (appendixes aside). A GNU manual +should give a good introduction to a beginner reading through from the +start, and should also provide all the details that hackers want. + + That is not as hard as it sounds at first. Arrange each chapter as a +logical breakdown of its topic, but order the sections, and write their +text, so that reading the chapter straight through makes sense. Do +likewise when structuring the book into chapters, and when structuring a +section into paragraphs. The watchword is, *at each point, address the +most fundamental and important issue raised by the preceding text.* + + If necessary, add extra chapters at the beginning of the manual which +are purely tutorial and cover the basics of the subject. These provide +the framework for a beginner to understand the rest of the manual. The +Bison manual provides a good example of how to do this. + + Don't use Unix man pages as a model for how to write GNU +documentation; they are a bad example to follow. + + Please do not use the term "pathname" that is used in Unix +documentation; use "file name" (two words) instead. We use the term +"path" only for search paths, which are lists of file names. + + +File: standards.info, Node: Manual Structure Details, Next: NEWS File, Prev: GNU Manuals, Up: Documentation + +Manual Structure Details +======================== The title page of the manual should state the version of the program which the manual applies to. The Top node of the manual should also @@ -1559,14 +1763,6 @@ contain this information. If the manual is changing more frequently than or independent of the program, also state a version number for the manual in both of these places. - The manual should document all command-line arguments and all -commands. It should give examples of their use. But don't organize -the manual as a list of features. Instead, organize it by the concepts -a user will have before reaching that point in the manual. Address the -goals that a user will have in mind, and explain how to accomplish -them. Don't use Unix man pages as a model for how to write GNU -documentation; they are a bad example to follow. - The manual should have a node named `PROGRAM Invocation' or `Invoking PROGRAM', where PROGRAM stands for the name of the program being described, as you would type it in the shell to run the program. @@ -1586,6 +1782,12 @@ quickly reading just this part of its manual. If one manual describes several programs, it should have such a node for each program described. + +File: standards.info, Node: NEWS File, Next: Man Pages, Prev: Manual Structure Details, Up: Documentation + +The NEWS File +============= + In addition to its manual, the package should have a file named `NEWS' which contains a list of user-visible changes worth mentioning. In each new release, add items to the front of the file and identify @@ -1597,9 +1799,11 @@ previous version can see what is new. a file named `ONEWS' and put a note at the end referring the user to that file. - Please do not use the term "pathname" that is used in Unix -documentation; use "file name" (two words) instead. We use the term -"path" only for search paths, which are lists of file names. + +File: standards.info, Node: Man Pages, Next: Reading other Manuals, Prev: NEWS File, Up: Documentation + +Man Pages +========= It is ok to supply a man page for the program as well as a Texinfo manual if you wish to. But keep in mind that supporting a man page @@ -1622,70 +1826,20 @@ that the Texinfo manual is more authoritative, and describing how to access the Texinfo documentation.  -File: standards.info, Node: Releases, Prev: Documentation, Up: Top - -Making Releases -*************** - - Package the distribution of Foo version 69.96 in a gzipped tar file -named `foo-69.96.tar.gz'. It should unpack into a subdirectory named -`foo-69.96'. - - Building and installing the program should never modify any of the -files contained in the distribution. This means that all the files -that form part of the program in any way must be classified into "source -files" and "non-source files". Source files are written by humans and -never changed automatically; non-source files are produced from source -files by programs under the control of the Makefile. - - Naturally, all the source files must be in the distribution. It is -okay to include non-source files in the distribution, provided they are -up-to-date and machine-independent, so that building the distribution -normally will never modify them. We commonly include non-source files -produced by Bison, Lex, TeX, and Makeinfo; this helps avoid unnecessary -dependencies between our distributions, so that users can install -whichever packages they want to install. - - Non-source files that might actually be modified by building and -installing the program should *never* be included in the distribution. -So if you do distribute non-source files, always make sure they are up -to date when you make a new distribution. - - Make sure that the directory into which the distribution unpacks (as -well as any subdirectories) are all world-writable (octal mode 777). -This is so that old versions of `tar' which preserve the ownership and -permissions of the files from the tar archive will be able to extract -all the files even if the user is unprivileged. - - Make sure that all the files in the distribution are world-readable. - - Make sure that no file name in the distribution is more than 14 -characters long. Likewise, no file created by building the program -should have a name longer than 14 characters. The reason for this is -that some systems adhere to a foolish interpretation of the POSIX -standard, and refuse to open a longer name, rather than truncating as -they did in the past. - - Don't include any symbolic links in the distribution itself. If the -tar file contains symbolic links, then people cannot even unpack it on -systems that don't support symbolic links. Also, don't use multiple -names for one file in different directories, because certain file -systems cannot handle this and that prevents unpacking the distribution. - - Try to make sure that all the file names will be unique on MS-DOG. A -name on MS-DOG consists of up to 8 characters, optionally followed by a -period and up to three characters. MS-DOG will truncate extra -characters both before and after the period. Thus, `foobarhacker.c' -and `foobarhacker.o' are not ambiguous; they are truncated to -`foobarha.c' and `foobarha.o', which are distinct. - - Include in your distribution a copy of the `texinfo.tex' you used to -test print any `*.texinfo' files. - - Likewise, if your program uses small GNU software packages like -regex, getopt, obstack, or termcap, include them in the distribution -file. Leaving them out would make the distribution file a little -smaller at the expense of possible inconvenience to a user who doesn't -know what other files to get. - +File: standards.info, Node: Reading other Manuals, Prev: Man Pages, Up: Documentation + +Reading other Manuals +===================== + + There may be non-free books or documentation files that describe the +program you are documenting. + + It is ok to use these documents for reference, just as the author of +a new algebra textbook can read other books on algebra. A large portion +of any non-fiction book consists of facts, in this case facts about how +a certain program works, and these facts are necessarily the same for +everyone who writes about the subject. But be careful not to copy your +outline structure, wording, tables or examples from preexisting non-free +documentation. Copying from free documentation may be ok; please check +with the FSF about the individual case. diff --git a/src/util/autoconf/standards.info-3 b/src/util/autoconf/standards.info-3 new file mode 100644 index 000000000..f674266a2 --- /dev/null +++ b/src/util/autoconf/standards.info-3 @@ -0,0 +1,92 @@ +This is Info file standards.info, produced by Makeinfo-1.55 from the +input file standards.texi. + +START-INFO-DIR-ENTRY +* Standards: (standards). GNU coding standards. +END-INFO-DIR-ENTRY + + GNU Coding Standards Copyright (C) 1992, 1993, 1994 Free Software +Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of this +manual provided the copyright notice and this permission notice are +preserved on all copies. + + Permission is granted to copy and distribute modified versions of +this manual under the conditions for verbatim copying, provided that +the entire resulting derived work is distributed under the terms of a +permission notice identical to this one. + + Permission is granted to copy and distribute translations of this +manual into another language, under the above conditions for modified +versions, except that this permission notice may be stated in a +translation approved by the Free Software Foundation. + + +File: standards.info, Node: Releases, Prev: Documentation, Up: Top + +Making Releases +*************** + + Package the distribution of Foo version 69.96 in a gzipped tar file +named `foo-69.96.tar.gz'. It should unpack into a subdirectory named +`foo-69.96'. + + Building and installing the program should never modify any of the +files contained in the distribution. This means that all the files +that form part of the program in any way must be classified into "source +files" and "non-source files". Source files are written by humans and +never changed automatically; non-source files are produced from source +files by programs under the control of the Makefile. + + Naturally, all the source files must be in the distribution. It is +okay to include non-source files in the distribution, provided they are +up-to-date and machine-independent, so that building the distribution +normally will never modify them. We commonly include non-source files +produced by Bison, Lex, TeX, and Makeinfo; this helps avoid unnecessary +dependencies between our distributions, so that users can install +whichever packages they want to install. + + Non-source files that might actually be modified by building and +installing the program should *never* be included in the distribution. +So if you do distribute non-source files, always make sure they are up +to date when you make a new distribution. + + Make sure that the directory into which the distribution unpacks (as +well as any subdirectories) are all world-writable (octal mode 777). +This is so that old versions of `tar' which preserve the ownership and +permissions of the files from the tar archive will be able to extract +all the files even if the user is unprivileged. + + Make sure that all the files in the distribution are world-readable. + + Make sure that no file name in the distribution is more than 14 +characters long. Likewise, no file created by building the program +should have a name longer than 14 characters. The reason for this is +that some systems adhere to a foolish interpretation of the POSIX +standard, and refuse to open a longer name, rather than truncating as +they did in the past. + + Don't include any symbolic links in the distribution itself. If the +tar file contains symbolic links, then people cannot even unpack it on +systems that don't support symbolic links. Also, don't use multiple +names for one file in different directories, because certain file +systems cannot handle this and that prevents unpacking the distribution. + + Try to make sure that all the file names will be unique on MS-DOG. A +name on MS-DOG consists of up to 8 characters, optionally followed by a +period and up to three characters. MS-DOG will truncate extra +characters both before and after the period. Thus, `foobarhacker.c' +and `foobarhacker.o' are not ambiguous; they are truncated to +`foobarha.c' and `foobarha.o', which are distinct. + + Include in your distribution a copy of the `texinfo.tex' you used to +test print any `*.texinfo' files. + + Likewise, if your program uses small GNU software packages like +regex, getopt, obstack, or termcap, include them in the distribution +file. Leaving them out would make the distribution file a little +smaller at the expense of possible inconvenience to a user who doesn't +know what other files to get. + + diff --git a/src/util/autoconf/standards.texi b/src/util/autoconf/standards.texi index e50b367f1..17e312f0c 100644 --- a/src/util/autoconf/standards.texi +++ b/src/util/autoconf/standards.texi @@ -3,7 +3,7 @@ @setfilename standards.info @settitle GNU Coding Standards @c UPDATE THIS DATE WHENEVER YOU MAKE CHANGES! -@set lastupdate 21 September 1994 +@set lastupdate 16 May 1995 @c %**end of header @ifinfo @@ -49,7 +49,7 @@ by the Free Software Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 1993 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 1993, 1994 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -85,7 +85,7 @@ Last updated @value{lastupdate}. * Formatting:: Formatting Your Source Code * Comments:: Commenting Your Work * Syntactic Conventions:: Clean Use of C Constructs -* Names:: Naming Variables and Functions +* Names:: Naming Variables, Functions and Files * Using Extensions:: Using Non-standard Features * System Functions:: Portability and ``standard'' library functions * Semantics:: Program Behavior for All Programs @@ -197,7 +197,8 @@ can help eliminate conceptual inconsistencies between different parts of a program; they can give you a history of how the conflicting concepts arose. -Use the Emacs command @kbd{M-x add-change} to start a new entry in the +Use the Emacs command @kbd{M-x add-change-log-entry} to start a new +entry in the change log. An entry should have an asterisk, the name of the changed file, and then in parentheses the name of the changed functions, variables or whatever, followed by a colon. Then describe the changes @@ -369,12 +370,11 @@ For example, a Sun 3 might be @samp{m68k-sun-sunos4.1}. The @code{configure} script needs to be able to decode all plausible alternatives for how to describe a machine. Thus, @samp{sun3-sunos4.1} -would be a valid alias. So would @samp{sun3-bsd4.2}, since SunOS is -basically @sc{BSD} and no other @sc{BSD} system is used on a Sun. For many -programs, @samp{vax-dec-ultrix} would be an alias for -@samp{vax-dec-bsd}, simply because the differences between Ultrix and -@sc{BSD} are rarely noticeable, but a few programs might need to distinguish -them. +would be a valid alias. For many programs, @samp{vax-dec-ultrix} would +be an alias for @samp{vax-dec-bsd}, simply because the differences +between Ultrix and @sc{BSD} are rarely noticeable, but a few programs +might need to distinguish them. +@c Real 4.4BSD now runs on some Suns. There is a shell script called @file{config.sub} that you can use as a subroutine to validate system types and canonicalize aliases. @@ -463,7 +463,6 @@ Some programs have ways of configuring themselves automatically. If your program is set up to do this, your @code{configure} script can simply ignore most of its arguments. - @node Source Language @chapter Using Languages Other Than C @@ -636,7 +635,7 @@ Also explain the significance of the return value, if there is one. Please put two spaces after the end of a sentence in your comments, so that the Emacs sentence commands will work. Also, please write complete sentences and capitalize the first word. If a lower-case -identifer comes at the beginning of a sentence, don't capitalize it! +identifier comes at the beginning of a sentence, don't capitalize it! Changing the spelling makes it a different identifier. If you don't like starting a sentence with a lower case letter, write the sentence differently (e.g., ``The identifier lower-case is @dots{}''). @@ -812,7 +811,7 @@ casts to @code{void}. Zero without a cast is perfectly fine as a null pointer constant. @node Names -@chapter Naming Variables and Functions +@chapter Naming Variables, Functions, and Files Please use underscores to separate words in a name, so that the Emacs word commands can be useful within them. Stick to lower case; reserve @@ -842,6 +841,13 @@ this. @code{doschk} also tests for potential name conflicts if the files were loaded onto an MS-DOS file system---something you may or may not care about. +In general, use @samp{-} to separate words in file names, not @samp{_}. +Make all letters in file names be lower case, except when following +specific conventions that call for upper case in certain kinds of names. +Conventional occasions for using upper case letters in file names +include @file{Makefile}, @file{ChangeLog}, @file{COPYING} and +@file{README}. It is common to name other @file{README}-like +documentation files in all upper case just like @file{README}. @node Using Extensions @chapter Using Non-standard Features @@ -998,7 +1004,7 @@ One way to get them properly defined is to use Autoconf. @chapter Program Behavior for All Programs Avoid arbitrary limits on the length or number of @emph{any} data -structure, including filenames, lines, files, and symbols, by allocating +structure, including file names, lines, files, and symbols, by allocating all data structures dynamically. In most Unix utilities, ``long lines are silently truncated''. This is not acceptable in a GNU utility. @@ -1060,6 +1066,11 @@ comments in the source. The relevant data will be in variables, which are easy to examine with the debugger, so there is no point moving them elsewhere. +Do not use a count of errors as the exit status for a program. +@emph{That does not work}, because exit status values are limited to 8 +bits (0 through 255). A single run of the program might have 256 +errors; if you try to return 256 as the exit status, the parent process +will see 0 as the status, and it will appear that the program succeeded. @node Errors @chapter Formatting Error Messages @@ -1094,7 +1105,7 @@ input from a source other than a terminal, it is not interactive and would do best to print error messages using the noninteractive style.) The string @var{message} should not begin with a capital letter when -it follows a program name and/or filename. Also, it should not end +it follows a program name and/or file name. Also, it should not end with a period. Error messages from interactive programs, and other messages such as @@ -1267,6 +1278,7 @@ standard output and exits successfully. These options should inhibit the normal function of the command; they should do nothing except print the requested information. +@c longopts begin here (keyword for isearch) @c Please leave newlines between items in this table; it's much easier @c to update when it isn't completely squashed together and unreadable. @c When there is more than one short option for a long option name, put @@ -1275,12 +1287,6 @@ the requested information. @table @samp -@item auto-check -@samp{-a} in @code{recode}. - -@item auto-reference -@samp{-A} in @code{ptx}. - @item after-date @samp{-N} in @code{tar}. @@ -1310,14 +1316,29 @@ and @code{unexpand}. @item ascii @samp{-a} in @code{diff}. +@item assign +@samp{-v} in Gawk. + @item assume-new @samp{-W} in Make. @item assume-old @samp{-o} in Make. +@item auto-check +@samp{-a} in @code{recode}. + +@item auto-pager +@samp{-a} in @code{wdiff}. + +@item auto-reference +@samp{-A} in @code{ptx}. + +@item avoid-wraps +@samp{-n} in @code{wdiff}. + @item backward-search -@samp{-B} in etags. +@samp{-B} in @code{ctags}. @item basename @samp{-f} in @code{shar}. @@ -1377,6 +1398,9 @@ Used in various programs to specify the directory to use. @item compare @samp{-d} in @code{tar}. +@item compat +Used in gawk (no corresponding single-letter option). + @item compress @samp{-Z} in @code{tar} and @code{shar}. @@ -1389,8 +1413,12 @@ Used in various programs to specify the directory to use. @item context Used in @code{diff}. +@item copyleft +Used in gawk (no corresponding single-letter option). + @item copyright -@samp{-C} in @code{ptx} and @code{recode}. +@samp{-C} in @code{ptx}, @code{recode}, and @code{wdiff}. +Also used in gawk (no corresponding single-letter option). @item core Used in GDB. @@ -1408,7 +1436,7 @@ Used in @code{tar} and @code{cpio}. @samp{-c} in @code{shar}. @item cxref -@samp{-x} in @code{etags}. +@samp{-x} in @code{ctags}. @item date @samp{-d} in @code{touch}. @@ -1421,7 +1449,7 @@ Used in @code{tar} and @code{cpio}. @samp{-D} in @code{m4}. @item defines -@samp{-d} in Bison and @code{etags}. +@samp{-d} in Bison and @code{ctags}. @item delete @samp{-D} in @code{tar}. @@ -1457,9 +1485,6 @@ specially. @item discard-locals @samp{-X} in @code{strip}. -@item diversions -@samp{-N} in @code{m4}. - @item dry-run @samp{-n} in Make. @@ -1469,6 +1494,12 @@ specially. @item elide-empty-files @samp{-z} in @code{csplit}. +@item end-delete +@samp{-x} in @code{wdiff}. + +@item end-insert +@samp{-z} in @code{wdiff}. + @item entire-new-file @samp{-N} in @code{diff}. @@ -1524,8 +1555,11 @@ Used in GDB. @item fatal-warnings @samp{-E} in @code{m4}. +@item field-separator +p@samp{-F} in Gawk. + @item file -@samp{-f} in @code{info}, Make, @code{mt}, and @code{tar}; +@samp{-f} in Gawk, @code{info}, Make, @code{mt}, and @code{tar}; @samp{-n} in @code{sed}; @samp{-r} in @code{touch}. @@ -1562,8 +1596,8 @@ Used in Makeinfo. @item format Used in @code{ls}, @code{time}, and @code{ptx}. -@item forward-search -@samp{-F} in @code{etags}. +@item freeze-state +@samp{-F} in @code{m4}. @item fullname Used in GDB. @@ -1625,7 +1659,7 @@ Used to ask for brief usage information. @item ignore-case @samp{-f} in @code{look} and @code{ptx}; -@samp{-i} in @code{diff}. +@samp{-i} in @code{diff} and @code{wdiff}. @item ignore-errors @samp{-i} in Make. @@ -1634,7 +1668,7 @@ Used to ask for brief usage information. @samp{-i} in @code{ptx}. @item ignore-indentation -@samp{-S} in @code{etags}. +@samp{-I} in @code{etags}. @item ignore-init-file @samp{-f} in Oleo. @@ -1697,6 +1731,12 @@ Used to ask for brief usage information. @item kilobytes @samp{-k} in @code{du} and @code{ls}. +@item language +@samp{-l} in @code{etags}. + +@item less-mode +@samp{-l} in @code{wdiff}. + @item level-for-gzip @samp{-g} in @code{shar}. @@ -1709,6 +1749,9 @@ Used in @code{split}, @code{head}, and @code{tail}. @item link @samp{-l} in @code{cpio}. +@item lint +Used in gawk (no corresponding single-letter option). + @item list @samp{-t} in @code{cpio}; @samp{-l} in @code{recode}. @@ -1802,15 +1845,24 @@ Used in GDB. @item no-check-existing @samp{-x} in @code{shar}. +@item no-common +@samp{-3} in @code{wdiff}. + @item no-create @samp{-c} in @code{touch}. @item no-defines @samp{-D} in @code{etags}. +@item no-deleted +@samp{-1} in @code{wdiff}. + @item no-dereference @samp{-d} in @code{cp}. +@item no-inserted +@samp{-2} in @code{wdiff}. + @item no-keep-going @samp{-S} in Make. @@ -1823,6 +1875,9 @@ Used in GDB. @item no-prof @samp{-e} in @code{gprof}. +@item no-regex +@samp{-R} in @code{etags}. + @item no-sort @samp{-p} in @code{nm}. @@ -1841,9 +1896,6 @@ Used in Makeinfo. @item no-validate Used in Makeinfo. -@item no-verbose -@samp{-v} in @code{shar}. - @item no-warn Used in various programs to inhibit warnings. @@ -1931,6 +1983,9 @@ Used in Makeinfo. @item portability @samp{-c} in @code{cpio} and @code{tar}. +@item posix +Used in gawk (no corresponding single-letter option). + @item prefix-builtins @samp{-P} in @code{m4}. @@ -1970,6 +2025,12 @@ Used in @code{tar} and @code{cp}. @item print-symdefs @samp{-s} in @code{nm}. +@item printer +@samp{-p} in @code{wdiff}. + +@item prompt +@samp{-p} in @code{ed}. + @item query-user @samp{-X} in @code{shar}. @@ -1981,6 +2042,9 @@ Used in many programs to inhibit the usual output. @strong{Note:} every program accepting @samp{--quiet} should accept @samp{--silent} as a synonym. +@item quiet-unshar +@samp{-Q} in @code{shar} + @item quote-name @samp{-Q} in @code{ls}. @@ -2010,11 +2074,14 @@ Used in Makeinfo. @samp{-r} in @code{ptx}. @item regex -@samp{-r} in @code{tac}. +@samp{-r} in @code{tac} and @code{etags}. @item release @samp{-r} in @code{uname}. +@item reload-state +@samp{-R} in @code{m4}. + @item relocation @samp{-r} in @code{objdump}. @@ -2092,6 +2159,9 @@ Used in many programs to inhibit the usual output. @item sort Used in @code{ls}. +@item source +Used in gawk (no corresponding single-letter option). + @item sparse @samp{-S} in @code{tar}. @@ -2107,10 +2177,19 @@ Used in @code{ls}. @item squeeze-blank @samp{-s} in @code{cat}. +@item start-delete +@samp{-w} in @code{wdiff}. + +@item start-insert +@samp{-y} in @code{wdiff}. + @item starting-file Used in @code{tar} and @code{diff} to specify which file within a directory to start processing with. +@item statistics +@samp{-s} in @code{wdiff}. + @item stdin-file-list @samp{-S} in @code{shar}. @@ -2164,6 +2243,7 @@ Used in GDB and @code{objdump}. @item terminal @samp{-T} in @code{tput} and @code{ul}. +@samp{-t} in @code{wdiff}. @item text @samp{-a} in @code{diff}. @@ -2188,16 +2268,16 @@ Used in @code{ls} and @code{touch}. @item traditional @samp{-t} in @code{hello}; -@samp{-G} in @code{m4} and @code{ptx}. +@samp{-G} in @code{ed}, @code{m4}, and @code{ptx}. @item tty Used in GDB. @item typedefs -@samp{-t} in @code{etags}. +@samp{-t} in @code{ctags}. @item typedefs-and-c++ -@samp{-T} in @code{etags}. +@samp{-T} in @code{ctags}. @item typeset-mode @samp{-t} in @code{ptx}. @@ -2215,7 +2295,10 @@ Used in GDB. @samp{-u} in @code{nm}. @item update -@samp{-u} in @code{cp}, @samp{etags}, @samp{mv}, @samp{tar}. +@samp{-u} in @code{cp}, @code{ctags}, @code{mv}, @code{tar}. + +@item usage +Used in gawk (no corresponding single-letter option). @item uuencode @samp{-B} in @code{shar}. @@ -2236,7 +2319,7 @@ Print the version number. @samp{-V} in @code{cp}, @code{ln}, @code{mv}. @item vgrind -@samp{-v} in @code{etags}. +@samp{-v} in @code{ctags}. @item volume @samp{-V} in @code{tar}. @@ -2260,15 +2343,61 @@ Print the version number. @samp{-z} in @code{gprof}. @end table +@c longopts end here (keyword for isearch) @node Documentation @chapter Documenting Programs -Please use Texinfo for documenting GNU programs. See the Texinfo -manual, either the hardcopy or the version in the GNU Emacs Info -subsystem (@kbd{C-h i}). See existing GNU Texinfo files (e.g., those -under the @file{man/} directory in the GNU Emacs distribution) for -examples. +@menu +* GNU Manuals:: Writing proper manuals. +* Manual Structure Details:: Specific structure conventions. +* NEWS File:: NEWS files supplement manuals. +* Man Pages:: Man pages are secondary. +* Reading other Manuals:: How far you can go in learning + from other manuals. +@end menu + +@node GNU Manuals +@section GNU Manuals + +The preferred way to document part of the GNU system is to write a +manual in the Texinfo formatting language. See the Texinfo manual, +either the hardcopy or the version in the Emacs Info subsystem (@kbd{C-h +i}). + +The manual should document all of the program's command-line options and +all of its commands. It should give examples of their use. But don't +organize the manual as a list of features. Instead, organize it +logically, by subtopics. Address the goals that a user will have in +mind, and explain how to accomplish them. + +In general, a GNU manual should serve both as tutorial and reference. +It should be set up for convenient access to each topic through Info, +and for reading straight through (appendixes aside). A GNU manual +should give a good introduction to a beginner reading through from the +start, and should also provide all the details that hackers want. + +That is not as hard as it sounds at first. Arrange each chapter as a +logical breakdown of its topic, but order the sections, and write their +text, so that reading the chapter straight through makes sense. Do +likewise when structuring the book into chapters, and when structuring a +section into paragraphs. The watchword is, @emph{at each point, address +the most fundamental and important issue raised by the preceding text.} + +If necessary, add extra chapters at the beginning of the manual which +are purely tutorial and cover the basics of the subject. These provide +the framework for a beginner to understand the rest of the manual. The +Bison manual provides a good example of how to do this. + +Don't use Unix man pages as a model for how to write GNU documentation; +they are a bad example to follow. + +Please do not use the term ``pathname'' that is used in Unix +documentation; use ``file name'' (two words) instead. We use the term +``path'' only for search paths, which are lists of file names. + +@node Manual Structure Details +@section Manual Structure Details The title page of the manual should state the version of the program which the manual applies to. The Top node of the manual should also @@ -2276,14 +2405,6 @@ contain this information. If the manual is changing more frequently than or independent of the program, also state a version number for the manual in both of these places. -The manual should document all command-line arguments and all -commands. It should give examples of their use. But don't organize -the manual as a list of features. Instead, organize it by the -concepts a user will have before reaching that point in the manual. -Address the goals that a user will have in mind, and explain how to -accomplish them. Don't use Unix man pages as a model for how to -write GNU documentation; they are a bad example to follow. - The manual should have a node named @samp{@var{program} Invocation} or @samp{Invoking @var{program}}, where @var{program} stands for the name of the program being described, as you would type it in the shell to run @@ -2303,6 +2424,9 @@ quickly reading just this part of its manual. If one manual describes several programs, it should have such a node for each program described. +@node NEWS File +@section The NEWS File + In addition to its manual, the package should have a file named @file{NEWS} which contains a list of user-visible changes worth mentioning. In each new release, add items to the front of the file and @@ -2314,9 +2438,8 @@ If the @file{NEWS} file gets very long, move some of the older items into a file named @file{ONEWS} and put a note at the end referring the user to that file. -Please do not use the term ``pathname'' that is used in Unix -documentation; use ``file name'' (two words) instead. We use the term -``path'' only for search paths, which are lists of file names. +@node Man Pages +@section Man Pages It is ok to supply a man page for the program as well as a Texinfo manual if you wish to. But keep in mind that supporting a man page @@ -2338,6 +2461,21 @@ the man page explaining that you don't maintain it and that the Texinfo manual is more authoritative, and describing how to access the Texinfo documentation. +@node Reading other Manuals +@section Reading other Manuals + +There may be non-free books or documentation files that describe the +program you are documenting. + +It is ok to use these documents for reference, just as the author of a +new algebra textbook can read other books on algebra. A large portion +of any non-fiction book consists of facts, in this case facts about how +a certain program works, and these facts are necessarily the same for +everyone who writes about the subject. But be careful not to copy your +outline structure, wording, tables or examples from preexisting non-free +documentation. Copying from free documentation may be ok; please check +with the FSF about the individual case. + @node Releases @chapter Making Releases diff --git a/src/util/autoconf/testsuite/Makefile.in b/src/util/autoconf/testsuite/Makefile.in index 950ec9020..feab545c4 100644 --- a/src/util/autoconf/testsuite/Makefile.in +++ b/src/util/autoconf/testsuite/Makefile.in @@ -69,10 +69,10 @@ uninstall: Makefile: Makefile.in ../config.status cd ..; ./config.status -clean mostlyclean distclean realclean:: +clean mostlyclean distclean maintainer-clean:: rm -f autoconf.log autoconf.sum site.exp site.bak AC* confdummy* -distclean realclean:: +distclean maintainer-clean:: rm -f Makefile config.status config.cache config.log TAGS: diff --git a/src/util/autoconf/testsuite/config/unix.exp b/src/util/autoconf/testsuite/config/unix.exp index ef45d601f..cf4f08afd 100644 --- a/src/util/autoconf/testsuite/config/unix.exp +++ b/src/util/autoconf/testsuite/config/unix.exp @@ -89,9 +89,9 @@ proc autoconf_load { args } { } # Capture only stderr in exec_output, not "creating Makefile" etc. - catch "exec $args >/dev/null" exec_output + catch "exec $args --cache=/dev/null >/dev/null" exec_output if $verbose>1 then { - send_user "Executed $args\n" + send_user "Executed $args --cache=/dev/null\n" } if ![string match "" $exec_output] then { fail "$args, problem with executing" diff --git a/src/util/autoconf/texinfo.tex b/src/util/autoconf/texinfo.tex index e544dc602..dfd57a9ed 100644 --- a/src/util/autoconf/texinfo.tex +++ b/src/util/autoconf/texinfo.tex @@ -22,13 +22,26 @@ %You are forbidden to forbid anyone else to use, share and improve %what you give them. Help stamp out software-hoarding! + +% Send bug reports to bug-texinfo@prep.ai.mit.edu. +% Please include a *precise* test case in each bug report. + + +% Make it possible to create a .fmt file just by loading this file: +% if the underlying format is not loaded, start by loading it now. +% Added by gildea November 1993. +\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi + % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} \deftexinfoversion$Revision$ \message{Loading texinfo package [Version \texinfoversion]:} -% Print the version number if in a .fmt file. -\everyjob{\message{[Texinfo version \texinfoversion]}\message{}} +% If in a .fmt file, print the version number +% and turn on active characters that we couldn't do earlier because +% they might have appeared in the input file name. +\everyjob{\message{[Texinfo version \texinfoversion]}\message{} + \catcode`+=\active \catcode`\_=\active} % Save some parts of plain tex whose names we will redefine. @@ -168,9 +181,14 @@ % Do @cropmarks to get crop marks \def\cropmarks{\let\onepageout=\croppageout } +\newinsert\margin \dimen\margin=\maxdimen + \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi +% marginal hacks, juha@viisa.uucp (Juha Takala) +\ifvoid\margin\else % marginal info is present + \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1 \unvbox#1 \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} @@ -754,7 +772,10 @@ where each line of input produces a line of output.} \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. \fi } -\def\setzzz#1#2 \endsetzzz{\expandafter\xdef\csname SET#1\endcsname{#2}} +% Can't use \xdef to pre-expand #2 and save some time, since \temp or +% \next or other control sequences that we've defined might get us into +% an infinite loop. Consider `@set foo @cite{bar}'. +\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}} % @clear VAR clears (i.e., unsets) the variable VAR. % @@ -899,28 +920,39 @@ where each line of input produces a line of output.} %% Try out Computer Modern fonts at \magstephalf \let\mainmagstep=\magstephalf +% Set the font macro #1 to the font named #2, adding on the +% specified font prefix (normally `cm'). +\def\setfont#1#2{\font#1=\fontprefix#2} + +% Use cm as the default font prefix. +% To specify the font prefix, you must define \fontprefix +% before you read in texinfo.tex. +\ifx\fontprefix\undefined +\def\fontprefix{cm} +\fi + \ifx\bigger\relax \let\mainmagstep=\magstep1 -\font\textrm=cmr12 -\font\texttt=cmtt12 +\setfont\textrm{r12} +\setfont\texttt{tt12} \else -\font\textrm=cmr10 scaled \mainmagstep -\font\texttt=cmtt10 scaled \mainmagstep +\setfont\textrm{r10 scaled \mainmagstep} +\setfont\texttt{tt10 scaled \mainmagstep} \fi % Instead of cmb10, you many want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10. -\font\textbf=cmb10 scaled \mainmagstep -\font\textit=cmti10 scaled \mainmagstep -\font\textsl=cmsl10 scaled \mainmagstep -\font\textsf=cmss10 scaled \mainmagstep -\font\textsc=cmcsc10 scaled \mainmagstep +\setfont\textbf{b10 scaled \mainmagstep} +\setfont\textit{ti10 scaled \mainmagstep} +\setfont\textsl{sl10 scaled \mainmagstep} +\setfont\textsf{ss10 scaled \mainmagstep} +\setfont\textsc{csc10 scaled \mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. -\font\defbf=cmbx10 scaled \magstep1 %was 1314 -\font\deftt=cmtt10 scaled \magstep1 +\setfont\defbf{bx10 scaled \magstep1} %was 1314 +\setfont\deftt{tt10 scaled \magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices and small examples. @@ -928,66 +960,66 @@ where each line of input produces a line of output.} % because texinfo normally uses the slanted fonts for that. % Do not make many font distinctions in general in the index, since they % aren't very useful. -\font\ninett=cmtt9 -\font\indrm=cmr9 -\font\indit=cmsl9 +\setfont\ninett{tt9} +\setfont\indrm{r9} +\setfont\indit{sl9} \let\indsl=\indit \let\indtt=\ninett \let\indsf=\indrm \let\indbf=\indrm -\let\indsc=\indrm +\setfont\indsc{csc10 at 9pt} \font\indi=cmmi9 \font\indsy=cmsy9 % Fonts for headings -\font\chaprm=cmbx12 scaled \magstep2 -\font\chapit=cmti12 scaled \magstep2 -\font\chapsl=cmsl12 scaled \magstep2 -\font\chaptt=cmtt12 scaled \magstep2 -\font\chapsf=cmss12 scaled \magstep2 +\setfont\chaprm{bx12 scaled \magstep2} +\setfont\chapit{ti12 scaled \magstep2} +\setfont\chapsl{sl12 scaled \magstep2} +\setfont\chaptt{tt12 scaled \magstep2} +\setfont\chapsf{ss12 scaled \magstep2} \let\chapbf=\chaprm -\font\chapsc=cmcsc10 scaled\magstep3 +\setfont\chapsc{csc10 scaled\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 -\font\secrm=cmbx12 scaled \magstep1 -\font\secit=cmti12 scaled \magstep1 -\font\secsl=cmsl12 scaled \magstep1 -\font\sectt=cmtt12 scaled \magstep1 -\font\secsf=cmss12 scaled \magstep1 -\font\secbf=cmbx12 scaled \magstep1 -\font\secsc=cmcsc10 scaled\magstep2 +\setfont\secrm{bx12 scaled \magstep1} +\setfont\secit{ti12 scaled \magstep1} +\setfont\secsl{sl12 scaled \magstep1} +\setfont\sectt{tt12 scaled \magstep1} +\setfont\secsf{ss12 scaled \magstep1} +\setfont\secbf{bx12 scaled \magstep1} +\setfont\secsc{csc10 scaled\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 -% \font\ssecrm=cmbx10 scaled \magstep1 % This size an font looked bad. -% \font\ssecit=cmti10 scaled \magstep1 % The letters were too crowded. -% \font\ssecsl=cmsl10 scaled \magstep1 -% \font\ssectt=cmtt10 scaled \magstep1 -% \font\ssecsf=cmss10 scaled \magstep1 +% \setfont\ssecrm{bx10 scaled \magstep1} % This size an font looked bad. +% \setfont\ssecit{cmti10 scaled \magstep1} % The letters were too crowded. +% \setfont\ssecsl{sl10 scaled \magstep1} +% \setfont\ssectt{tt10 scaled \magstep1} +% \setfont\ssecsf{ss10 scaled \magstep1} -%\font\ssecrm=cmb10 scaled 1315 % Note the use of cmb rather than cmbx. -%\font\ssecit=cmti10 scaled 1315 % Also, the size is a little larger than -%\font\ssecsl=cmsl10 scaled 1315 % being scaled magstep1. -%\font\ssectt=cmtt10 scaled 1315 -%\font\ssecsf=cmss10 scaled 1315 +%\setfont\ssecrm{b10 scaled 1315} % Note the use of cmb rather than cmbx. +%\setfont\ssecit{ti10 scaled 1315} % Also, the size is a little larger than +%\setfont\ssecsl{sl10 scaled 1315} % being scaled magstep1. +%\setfont\ssectt{tt10 scaled 1315} +%\setfont\ssecsf{ss10 scaled 1315} %\let\ssecbf=\ssecrm -\font\ssecrm=cmbx12 scaled \magstephalf -\font\ssecit=cmti12 scaled \magstephalf -\font\ssecsl=cmsl12 scaled \magstephalf -\font\ssectt=cmtt12 scaled \magstephalf -\font\ssecsf=cmss12 scaled \magstephalf -\font\ssecbf=cmbx12 scaled \magstephalf -\font\ssecsc=cmcsc10 scaled \magstep1 +\setfont\ssecrm{bx12 scaled \magstephalf} +\setfont\ssecit{ti12 scaled \magstephalf} +\setfont\ssecsl{sl12 scaled \magstephalf} +\setfont\ssectt{tt12 scaled \magstephalf} +\setfont\ssecsf{ss12 scaled \magstephalf} +\setfont\ssecbf{bx12 scaled \magstephalf} +\setfont\ssecsc{csc10 scaled \magstep1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled \magstep1 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % Fonts for title page: -\font\titlerm = cmbx12 scaled \magstep3 +\setfont\titlerm{bx12 scaled \magstep3} \let\authorrm = \secrm % In order for the font changes to affect most math symbols and letters, @@ -1043,9 +1075,9 @@ where each line of input produces a line of output.} \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. -\font\shortcontrm=cmr12 -\font\shortcontbf=cmbx12 -\font\shortcontsl=cmsl12 +\setfont\shortcontrm{r12} +\setfont\shortcontbf{bx12} +\setfont\shortcontsl{sl12} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic @@ -2022,7 +2054,14 @@ July\or August\or September\or October\or November\or December\fi \let\indexbackslash=0 %overridden during \printindex. +\let\SETmarginindex=\relax %initialize! +% workhorse for all \fooindexes +% #1 is name of index, #2 is stuff to put there \def\doind #1#2{% +% Put the index entry in the margin if desired. +\ifx\SETmarginindex\relax\else% +\insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% +\fi% {\count10=\lastpenalty % {\indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\% @@ -2458,7 +2497,7 @@ July\or August\or September\or October\or November\or December\fi \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{\seccheck{chapter}% \secno=0 \subsecno=0 \subsubsecno=0 -\global\advance \chapno by 1 \message{Chapter \the\chapno}% +\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}% \chapmacro {#1}{\the\chapno}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% @@ -2845,6 +2884,7 @@ July\or August\or September\or October\or November\or December\fi \unnumbchapmacro{#1}\def\thischapter{}% \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 + \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. } @@ -3317,6 +3357,9 @@ July\or August\or September\or October\or November\or December\fi \gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 } \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} +% This is used to turn on special parens +% but make & act ordinary (given that it's active). +\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr} % Definitions of (, ) and & used in args for functions. % This is the definition of ( outside of all parentheses. @@ -3525,7 +3568,8 @@ July\or August\or September\or October\or November\or December\fi \def\deftypefunargs #1{% % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. -\functionparens +% Use \boldbraxnoamp, not \functionparens, so that & is not special. +\boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \interlinepenalty=10000 \advance\rightskip by 0pt plus 1fil @@ -3838,7 +3882,7 @@ July\or August\or September\or October\or November\or December\fi % Use \turnoffactive so that punctuation chars such as underscore % work in node names. -\def\dosetq #1#2{{\let\folio=0 \turnoffactive% +\def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat% \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} @@ -3977,6 +4021,7 @@ July\or August\or September\or October\or November\or December\fi \catcode `\{=1 \catcode `\}=2 \catcode `\%=\other \catcode `\'=0 +\catcode`\^=7 % to make ^^e4 etc usable in xref tags \catcode `\\=\other \openin 1 \jobname.aux \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue @@ -4198,8 +4243,8 @@ July\or August\or September\or October\or November\or December\fi % textwidth; \voffset; \hoffset (!); binding offset. All require a dimension; % header is additional; added length extends the bottom of the page. -\def\changepagesizes#1#2#3#4#5 -{\global\vsize= #1 +\def\changepagesizes#1#2#3#4#5{ + \global\vsize= #1 \advance\vsize by \topskip \global\voffset= #3 \global\hsize= #2 @@ -4216,6 +4261,10 @@ July\or August\or September\or October\or November\or December\fi \def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}} +% Use @afourwide to print on European A4 paper in wide format. +\def\afourwide{\afourpaper +\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}} + % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other @@ -4257,6 +4306,7 @@ July\or August\or September\or October\or November\or December\fi \def~{{\tt \char '176}} \chardef\hat=`\^ \catcode`\^=\active +\def\auxhat{\def^{'hat}} \def^{{\tt \hat}} \catcode`\_=\active @@ -4288,6 +4338,15 @@ July\or August\or September\or October\or November\or December\fi {\catcode`\==\active \global\def={{\tt \char 61}}} +\catcode`+=\active +\catcode`\_=\active + +% If a .fmt file is being used, characters that might appear in a file +% name cannot be active until we have parsed the command line. +% So turn them off again, and have \everyjob (or @setfilename) turn them on. +% \otherifyactive is called near the end of this file. +\def\otherifyactive{\catcode`+=\other \catcode`\_=\other} + \catcode`\@=0 % \rawbackslashxx output one backslash character in current font @@ -4330,6 +4389,10 @@ July\or August\or September\or October\or November\or December\fi @let>=@normalgreater @let+=@normalplus} +% Make _ and + \other characters, temporarily. +% This is canceled by @fixbackslash. +@otherifyactive + % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. @@ -4340,8 +4403,11 @@ July\or August\or September\or October\or November\or December\fi % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\{ in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. +% Also back turn on active characters that might appear in the input +% file name, in case not using a pre-dumped format. % -@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi} +@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi + @catcode`+=@active @catcode`@_=@active} %% These look ok in all fonts, so just make them not special. The @rm below %% makes sure that the current font starts out as the newly loaded cmr10