diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/ChangeLog autoconf-2.11/ChangeLog --- autoconf-2.10/ChangeLog Tue May 7 13:21:01 1996 +++ autoconf-2.11/ChangeLog Mon Nov 18 10:28:30 1996 @@ -1,5 +1,222 @@ +Mon Nov 18 10:24:50 1996 David J MacKenzie + + * Version 2.11. + +Sun Nov 17 20:12:05 1996 David J MacKenzie + + * acspecific.m4 (AC_FUNC_STRCOLL): Make the checking message more + accurate. + +Thu Nov 14 11:15:27 1996 David J MacKenzie + + * acheaders: Add entry for malloc.h. Make the strings.h entry + suggest AC_CHECK_HEADERS instead of AC_HEADER_STDC. + + * acgeneral.m4 (AC_INIT_PARSE_ARGS): Move initialization of + ac_max_here_lines here from AC_OUTPUT_HEADER. + + * autoheader.sh: Take the multiple-include protection back out. + It's not needed for a file that just #defines stuff, and, as Ken + Raeburn pointed out in Apr 1994: + Since you don't make it optional, and you don't give the writer of + configure.in much control over the name of the symbol, it also would + prevent one "config.h" file in a subdirectory from including + "../config.h" as a way to avoid duplicating some common tests. + + * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Don't try + running a program, just try linking. + (AC_C_CROSS): Make the wording clearer. + +Wed Nov 13 10:07:14 1996 David J MacKenzie + + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): Check whether the + compiler works before checking whether it's a GNU compiler. + (AC_FUNC_VFORK): Call _exit after perror. + (AC_PATH_XTRA): Go back to using -R, as setting an env var as part + of CC doesn't get eval'd correctly to actually work. + Directly test whether a space is needed after -R. + Don't add "-L" to LDFLAGS if $x_libraries is empty. + (AC_FUNC_STRFTIME): Check for it in -lintl only if it's not in the + normal libraries. + + * Test release 2.10.3. + + * testsuite/Makefile.in (dejacheck): New target, suggested by Tom + Tromey . + (check): Depend on dejacheck. + +Tue Nov 12 00:06:14 1996 David J MacKenzie + + * acgeneral.m4 (AC_OUTPUT_FILES): Split the list of sed commands in + conftest.subs into multiple files named conftest.s[1-9][0-9]*. + Create a pipeline of sed commands that use these files, then delete + the temporary files. From John W. Eaton . + + * acspecific.m4 (AC_AIX, AC_MINIX): Remove warnings about AC_TRY_LINK. + These macros don't change the linkage options. + + * Test release 2.10.2. + + * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX) [GCC]: Use -O2 instead + of -O. Suggested by fnf@ninemoons.com (Fred Fish). + + * acgeneral.m4 (AC_OUTPUT_HEADER): Support passing + AC_CONFIG_HEADER a value containing shell variables. Suggested by + Markku Savela and Julian Onions + . + * acgeneral.m4 (AC_TRY_RUN_NATIVE, AC_TRY_LINK, AC_TRY_COMPILE, + AC_TRY_CPP): Show the test program in config.log if the test fails. + From Karl Berry . + + * testsuite/config/unix.exp: Run the configure script as "./script" + in case the user doesn't have "." in their PATH. + +Mon Nov 11 18:02:58 1996 David J MacKenzie + + * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Deal with smart + compilers that know that an unused function doesn't have to be + linked in: call the function directly from main(). + (Removing a legacy from when they tried to run the code, I think-djm.) + From fnf@ninemoons.com (Fred Fish). + + * acspecific.m4 (AC_FUNC_GETLOADAVG): Rename ac_save_LIBS to avoid + a clash with AC_CHECK_LIB. + From Jim Meyering . + (AC_FUNC_FNMATCH, AC_FUNC_MMAP, AC_FUNC_VFORK, AC_FUNC_WAIT3, + AC_FUNC_STRCOLL, AC_FUNC_MEMCMP): Rename cache variables to avoid + wrong results if someone calls AC_CHECK_FUNC for these functions. + + * autoheader.sh: Don't cmp with config.h.in if it doesn't exist yet. + Don't frob lines 1-@TOP@ or @BOTTOM@-end of acconfig.h's. + Accept TAB as well as SPC after #undef in acconfig.h's. + +Sat Nov 9 01:54:04 1996 David J MacKenzie + + * Test release 2.10.1. + + * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): New macros + adapted from Bruno Haible . + (AC_PROG_CC, AC_PROG_CXX): Use them. + * acgeneral.m4 (AC_TRY_RUN_NATIVE): Split out of AC_TRY_RUN. + (AC_TRY_LINK): Check that the executable exists after linking. + (AC_EGREP_CPP): Disable m4 quote chars around egrep, so [] in regexps + isn't eaten. + + * autoheader.sh: Add multiple-inclusion protection for config.h. + + * acgeneral.m4 (AC_PREFIX_PROGRAM): Pretty up the output. + (AC_CHECK_LIB): Include the function being tested in the message. + (AC_CHECK_PROG, AC_PATH_PROG): Add a dummy variable to force word + splitting on the path. + + * acspecific.m4 (AC_FUNC_MMAP): Remove check and uses of valloc. + It turns out it's a separate issue, for GNU grep. + Replace the test program with a new version from Mike Haertel. + + * acgeneral.m4 (AC_CACHE_SAVE): Accept the HP-UX sh 'set' output + format. From Marcus Daniels . + + * acgeneral.m4 (AC_MSG_CHECKING, AC_CHECKING): Write a message to + config.log also. From "T.E.Dickey" . + (AC_CHECK_LIB, AC_CHECK_HEADER, AC_CHECK_HEADERS): Replace use of + tr with sed, to avoid a bug in the AIX 4.1.3.0 tr reported by + Alain KNAFF . He says that version of + tr interprets \055 as a range specifier, like an unquoted -. + * acspecific.m4 (AC_PROG_MAKE_SET, AC_CHECK_HEADER_DIRENT, + AC_CHECK_HEADERS_DIRENT): Ditto. + + * acspecific.m4 (AC_FUNC_SETPGRP): New macro. + * acconfig.h (SETPGRP_VOID): New entry. + From "T.E.Dickey" . + + * acspecific.m4 (AC_PATH_X_DIRECT): Try /lib/usr/lib/X11 for A/UX. + From Guillermo Gomez . + (AC_PATH_XTRA): Replace -R with adding LD_RUN_PATH to CC in the + Solaris kludge. Suggested by Paul Eggert . + Define X_DISPLAY_MISSING with AC_DEFINE, and + if not using X, clear out the X variables. + Check system-dependent libs before system-independent ones. + Check for more system-dependent libs. + From Karl Berry. + Use AC_CHECK_FUNC in the system-dependent libs tests. + From Larry Schwimmer . + Wart removal: Don't require AC_ISC_POSIX. + (AC_ISC_POSIX): Require AC_PROG_CC, since it uses $GCC. + From gvran@uddeborg.pp.se. + Don't blather about being called before AC_TRY_LINK, + which is now called in AC_PROG_CC. Don't encourage using this macro. + * acconfig.h (X_DISPLAY_MISSING): Add entry. + +Fri Nov 8 16:02:08 1996 David J MacKenzie + + * acspecific.m4 (AC_PATH_X_DIRECT): Search for /usr/X11 before + /usr/X11Rn, etc. From bostic@bsdi.com (Keith Bostic). + + * acgeneral.m4 (AC_CHECK_TYPE) [STDC_HEADERS]: Check in stddef.h, too. + From "Glenn P. Davis" . + Don't require the second char after the type name to be a space. + (AC_TRY_RUN): Remove the test files before executing the "failure" + case code. + + * acspecific.m4 (AC_PROG_CXX): Check for cc++ for NexT. + From Carl Edman . + (AC_PROG_CC, AC_PROG_CXX): Check whether -g works even if + C[XX]FLAGS is set. From T.E.Dickey + (AC_FUNC_FNMATCH): New macro. + * acconfig.h (HAVE_FNMATCH): New entry. + + * acgeneral.m4 (AC_REPLACE_FUNCS): Call AC_CHECK_FUNCS to do the work. + +Tue Oct 29 13:03:44 1996 Doug Evans + + * acgeneral.m4 (AC_OUTPUT_SUBDIRS): Fix thinko in computation of + ac_sub_srcdir in relative but not "." case. + +Thu Oct 10 22:29:37 1996 David J MacKenzie + + * acgeneral.m4 (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, + AC_CANONICAL_BUILD): Allow the os part of the string returned by + config.sub to contain dashes, as in "linux-gnu". + +Fri Jul 19 16:59:00 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_TYPE): Add dnl so regexp doesn't have a + leading newline. + +Wed Jun 12 13:56:57 1996 David J MacKenzie + + * acgeneral.m4 (AC_CHECK_TYPE): Remove extra ')'. + + * Many files: Update the FSF street address. + +Sun Jun 9 17:54:23 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Add missing \ in last change. + +Fri Jun 7 11:54:58 1996 Roland McGrath + + * acgeneral.m4 (AC_CHECK_LIB): Identifierize lib name in $ac_tr_lib. + +Mon May 27 13:49:02 1996 Roland McGrath + + * acspecific.m4 (AC_SYS_LONG_FILE_NAMES): If $TMPDIR names an + existing, writable directory, then test it instead of /tmp, /var/tmp, + and /usr/tmp for long file name support. + + * acgeneral.m4 (AC_PREREQ): Prepend "FATAL ERROR: " to msg. + +Sun May 26 19:07:15 1996 Roland McGrath + + * acspecific.m4 (AC_PROG_MAKE_SET): Sanitize $MAKE for use as + identifier. + + * acgeneral.m4 (AC_CHECK_TYPE): Tighten regexp so ulong doesn't match + ulong_t. + + * autoheader.sh: Put $syms in a temporary file and use fgrep -f. + Tue May 7 13:20:33 1996 Roland McGrath - * acgeneral.m4: Verion 2.10 released. + * acgeneral.m4: Version 2.10 released. Tue Mar 26 13:03:12 1996 Roland McGrath @@ -1464,6 +1681,4 @@ (AC_CACHE_WRITE): Set the cache values only if not already set. (AC_PARSEARGS, AC_OUTPUT): Allow giving an empty prefix or exec_prefix. - - AC_CONFIG_AUXDIR*. * acgeneral.m4, acspecific.m4: Rename AC_CONFIG_AUX* to diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/Makefile.in autoconf-2.11/Makefile.in --- autoconf-2.10/Makefile.in Wed Nov 22 13:09:44 1995 +++ autoconf-2.11/Makefile.in Sun Jul 14 12:37:05 1996 @@ -14,5 +14,6 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. #### Start of system configuration section. #### diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/NEWS autoconf-2.11/NEWS --- autoconf-2.10/NEWS Thu Mar 21 11:14:22 1996 +++ autoconf-2.11/NEWS Mon Nov 18 10:28:31 1996 @@ -1,2 +1,15 @@ +Major changes in release 2.11: + +* AC_PROG_CC and AC_PROG_CXX check whether the compiler works. + They also default CFLAGS/CXXFLAGS to "-g -O2" for gcc, instead of "-g -O". +* AC_REPLACE_FUNCS defines HAVE_foo if the system has the function `foo'. +* AC_CONFIG_HEADER expands shell variables in its argument. +* New macros: AC_FUNC_FNMATCH, AC_FUNC_SETPGRP. +* The "checking..." messages and the source code for test programs that + fail are saved in config.log. +* Another workaround has been added for seds with small command length limits. +* config.sub and config.guess recognize more system types. +* Bug fixes. + Major changes in release 2.10: diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/TODO autoconf-2.11/TODO --- autoconf-2.10/TODO Wed Jul 26 01:39:57 1995 +++ autoconf-2.11/TODO Thu Nov 14 19:07:25 1996 @@ -39,5 +39,5 @@ ------------------------------------------------------------------------------ -* Doc: Add concept index. +* Doc: Add a concept index. ------------------------------------------------------------------------------ @@ -53,15 +53,8 @@ will be less of a problem than it was with the long lines used for creating a header file. - There has also been a report that HPUX and OSF/1 seds only allow 100 - commands. ------------------------------------------------------------------------------ -* Allow [ and ] in egrep patterns and AC_DEFINE args. - ------------------------------------------------------------------------------- - -* Add a Makefile generator that supports the standard GNU targets. - (Being worked on.) +* Allow [ and ] in AC_DEFINE args. ------------------------------------------------------------------------------ @@ -78,7 +71,4 @@ *** Distribute a config.site corresponding to a hypothetical bare POSIX system with c89. -*** Cache consistency checking: ignore cache if environment -(CC or PATH) differs. - ** Site defaults: @@ -95,5 +85,4 @@ prototypes IEEE double precision math - shared libraries ------------------------------------------------------------------------------ @@ -109,9 +98,4 @@ ------------------------------------------------------------------------------ -Support a way of including makefile fragments that then have @var@ -substitutions done on them. - ------------------------------------------------------------------------------- - Have AC_CANONICAL_* cache the host/build/target types. They have to be overridden by the command line arguments, @@ -122,10 +106,4 @@ ------------------------------------------------------------------------------ -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 ... @@ -146,13 +124,4 @@ ------------------------------------------------------------------------------ -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 ]) @@ -180,4 +149,14 @@ From: kwzh@gnu.ai.mit.edu (Karl Heuer) +The test for the isascii function was failing because that function is +also a macro. He proposed that the test file look like this: + +/* Remove any macro definition. */ +#undef isascii +/* Override any gcc2 internal prototype to avoid an error. */ +char isascii(); isascii(); + +Andreas Schwab + ------------------------------------------------------------------------------ @@ -308,5 +287,5 @@ ------------------------------------------------------------------------------ -Make easy macros for checking for X functions and libraries. +Make easy macros for checking for X functions and libraries, such as Motif. ------------------------------------------------------------------------------ @@ -329,2 +308,304 @@ ------------------------------------------------------------------------------ + +Autoheader in autoconf-2.4 doesn't produce entries for: + + AC_CHECK_TYPE(ssize_t, int) + +and it seems like it could easily do so. + +In general, it seems to me like autoconf isn't set up to +let me periodically run autoheader, and then include my +"local" tests -- autoheader gets most stuff right, I'd like +to rerun it periodically without losing my local changes +to config.h.in. + +One of the things that I need is to know is the type to use +for a fixed size on disk, e.g., what is the system's name +for an unsigned-32-bit integer? + +I can use: + + AC_CHECK_SIZEOF(unsigned int) + +and, in fact, that's what I do. But I still have to build +sets of #if tests to get from there to the name of the type. + +From: bostic@bsdi.com (Keith Bostic) + +------------------------------------------------------------------------------ + +There are basically three ways to lock files + lockf, fnctl, flock +I'd be interested in adding a macro to pick the "right one" if you're +interested. + +From: Rich Salz + +------------------------------------------------------------------------------ + +It is IMHO a bug that `config.status' cannot handle multiple +simultaneous invocations. It should include the process id (`$$' in sh) +as part of the name of any temporary files it creates. + +From: fjh@kryten.cs.mu.oz.au (Fergus Henderson) + +------------------------------------------------------------------------------ + +Timezone calculations checks. + +------------------------------------------------------------------------------ + +Support different default filesystem layouts, e.g. SVR4, Linux. +Of course, this can be done locally with config.site. + +------------------------------------------------------------------------------ + +Mention automake, libtool, etc. in the autoconf manual. + +------------------------------------------------------------------------------ + +configure-time pasting together of output files from multiple pieces. +AC_OUTPUT(Makefile:$pre_in:Makefile.in:$pre_out) + +This would concatenate the files $pre_in, Makefile.in, and $pre_out +before running sed to do the substitutions. +From: "Theodore Ts'o" + +Support a way of including makefile fragments that then have @var@ +substitutions done on them. + +Or ac_include? + +------------------------------------------------------------------------------ + +I wonder if it is possible to get the path for X11's app-defaults +directory by autoconf. Moreover, I'd like to have a general way of +accessing imake variables by autoconf, something like + +AC_DEFINE(WINE_APP_DEFAULTS, AC_IMAKE_VAR(XAPPLOADDIR)) + +Slaven Rezic + +------------------------------------------------------------------------------ + +Whichever AC_LINK_FILES directive comes last is that one that gets +done. + +From Jim Meyering + +This is trivial, but I'm unsure of the m4 quoting reality. Is it: + +AC_DEFUN(AC_LINK_FILES, +[define([AC_LIST_FILES], ifdef([AC_LIST_FILES], AC_LIST_FILES ,)[$1])dnl +define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], AC_LIST_LINKS ,)[$2])]) + +Roland McGrath + +------------------------------------------------------------------------------ + +Question: at least one common UNIX variant has a "cc" that is old K&R +and "c89" for ANSI C. Is there any reason why AC_PROG_CC couldn't +check for c89 before cc if it can't find gcc? + +hpa@yggdrasil.com (H. Peter Anvin) + +------------------------------------------------------------------------------ + +Modify the meaning of autoheader --localdir to add an additional +directory to look for acconfig.h instead of replacing the directory +containing configure.in. Also, autoreconf recurses on all +subdirectories containing a configure.in, not just those given by an +AC_CONFIG_SUBDIRS directive, so you can't have both directories that +are parts of a large package, and directories that are independent +packages. + +Marc Horowitz + +------------------------------------------------------------------------------ + +Cache consistency checking: ignore cache if environment +(CC or PATH) differs. +From Mike Haertel + +So we need a general mechanism for storing variables' values in the cache, +and checking if they are the same after reading the cache. Then we can add +to the list of variables as we come across the need. So far we want +LD_LIBRARY_PATH and the internal variables for some of (all?) the args. +From: roland@gnu.ai.mit.edu (Roland McGrath) + +Hmm. That list might include LD_LIBRARY_PATH, LD_RUN_PATH (for solaris), +and PATH. I can't think of any others so far. +From: friedman@splode.com (Noah Friedman) + +------------------------------------------------------------------------------ + +So how about an option to configure --reset-cache, that says to ignore all +existing cached values for tests that configure runs, and then update the +cache normally. This should be utterly trivial to do in AC_CACHE_VAL; +check the flag variable and always compute the value if it's set. + +------------------------------------------------------------------------------ + +A number of people have tried to fix configuration problems by editing +acconfig.h. (Despite comments at the top of the file.) I think they're +confused because anything.h looks like a regular source file name. +Maybe acconfig.h could be called acconfig.extra or something? + +From: kb@cs.umb.edu (K. Berry) + +------------------------------------------------------------------------------ + +Every user running +X11 usually has a directory like *X11* in his PATH variable. By replacing +bin by include, you can find good places to look for the include files +or libraries. + +From: rcb5@win.tue.nl (Richard Verhoeven) + +------------------------------------------------------------------------------ + +in order to use the AC_CANONICAL_SYSTEM macro, I have to +have install-sh somewhere nearby --- why is this? I have no real +reason to distribute install-sh, other than that its absence breaks +this code. + +Shouldn't the above loop be looking for config.sub and config.guess? +From: jimb@totoro.bio.indiana.edu (Jim Blandy) + +adding AC_CANONICAL_HOST to my configure.in script caused +all sorts of odd/unexplained errors. Obviously, I had to go +get copies of config.guess, config.sub and install-sh from the +autoconf distribution, but the error messages and autoconf docs +didn't explain that very well. +From: bostic@bsdi.com (Keith Bostic) + +------------------------------------------------------------------------------ + +Combine AC_PROG_CC_WORKS with AC_C_CROSS. If the compiler exits with +a 0 status and produces a non-empty output file, consider it working. +If the output file is runnable, consider it native, also. +Perhaps also have AC_PROG_CC_WORKS try to link an invalid program, and +die if the compiler seemed to succeed--in which case it's not usable +with autoconf scripts. + +------------------------------------------------------------------------------ + +When using CONFIG_FILES= and CONFIG_HEADERS= for controlling +partial configuration, any AC_LINK_FILES is repeated in each case +(that is, usually, once for config.h and once per subdirectory). +This is not elegant. + +Maybe Autoconf could use some kind of CONFIG_LINKS=, +having all such AC_LINK(ed)_FILES by default, but usable by each +Makefile.in in rules for updating the particular links they need. + +From: pinard@iro.umontreal.ca + +------------------------------------------------------------------------------ + +Perhaps autoconf could have a single @magic@ frob that gets replaced with +assignments for all the *dir variables? There is quite a plethora for each +Makefile.in to have foodir = @foodir@. + +From: Roland McGrath + +------------------------------------------------------------------------------ + +In most cases, when autoscan suggests something, using the search +or index command into the Info reader for autoconf manual quickly +explains me what the test is about. However, for header files +and functions, the search might fail, because the test is not of +the specific kind. The Autoconf manual should reflect somewhere +all header files or functions (non-specific features, generally) +triggering autoscan to generate tests, and tell in a few words +what is the problem, and the suggested approach for a solution; +that is, how one should use the result of testing the feature. + +From: pinard@iro.umontreal.ca + +------------------------------------------------------------------------------ + +It would be nice if the configure script would handle an option such as +--x-libraries="/usr/openwin/lib /usr/dt/lib". + +Rick Boykin + +Under Solaris 2.4, the regular X includes and libs and the Motif +includes and libs are in different places. The Emacs configure script +actually allows dir1:dir2:dir3 -- + + if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then + LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` + LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` + fi + if test "${x_includes}" != NONE && test -n "${x_includes}"; then + C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` + fi + +------------------------------------------------------------------------------ + + What messages should be produced by default, if any? + +Probably only the few most important ones, like which configuration +name was used, whether X or Xt are in use, etc. The specific +decisions, and progress messages, should be recorded on the terminal +only if --verbose is used. + + --silent just supresses the "checking for...result" + messages, not the "creating FOO" messages. + +I think the default should be to suppress both. +From: Richard Stallman + +There is no distinction now between +important decisions (we have X) vs minor decisions (we have lstat). +However, there are probably only a few things you deem important enough to +announce and only those few things will need to be changed. +Perhaps config.status could be written with comments saying what was +decided. +From: Roland McGrath + +------------------------------------------------------------------------------ + +Use automake to generate autoconf's Makefile.in's? + +------------------------------------------------------------------------------ + +about the idea of using small configure.in/aclocal.m4 snippets: +this is the one idea in metaconfig (the autoconf-like program used by +Perl) that I like. metaconfig looks for a "U" directory, and includes +each ".U" file into the generated Configure script (according to +various complicated rules). +From: Tom Tromey + +------------------------------------------------------------------------------ + +It would be nice if there were some way for an autoconf macro to add +code to be run at the same time as the `EXTRA-CMDS' argument to +AC_OUTPUT. +it would be most useful if it could be +run any number of times (and have all the command concatenated). + +From: Tom Tromey + +------------------------------------------------------------------------------ + +I'd much prefer to see the absolute paths substituted for all the +standard "dir" variables. It would be nice to have variables in +configure that held the absolute paths. And it is nice to be able to +substitute them into other files without relying on the destination +file supporting ${...} syntax. (It works in Perl, sh, and make -- +but not guile) + +From: Tom Tromey + +------------------------------------------------------------------------------ + +Another thing I wish for is a macro which figures out which libraries are +needed for BSD-sytle sockets. AC_PATH_X already detects this +correctly...so it's just a matter of seperating out the socket-related code. +From: "Joel N. Weber II" + +------------------------------------------------------------------------------ + diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/acconfig.h autoconf-2.11/acconfig.h --- autoconf-2.10/acconfig.h Thu Feb 9 17:44:35 1995 +++ autoconf-2.11/acconfig.h Mon Nov 11 19:15:05 1996 @@ -68,4 +68,7 @@ #undef HAVE_DOPRNT +/* Define if your system has a working fnmatch function. */ +#undef HAVE_FNMATCH + /* Define if your system has its own `getloadavg' function. */ #undef HAVE_GETLOADAVG @@ -180,4 +183,7 @@ #undef RETSIGTYPE +/* Define if the `setpgrp' function takes no argument. */ +#undef SETPGRP_VOID + /* Define if the setvbuf function takes the buffering type as its second argument and the buffer pointer as the third, as on System V @@ -243,4 +249,7 @@ byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN + +/* Define if the X Window System is missing or not being used. */ +#undef X_DISPLAY_MISSING /* Define if lex declares yytext as a char * by default, not a char[]. */ diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/acgeneral.m4 autoconf-2.11/acgeneral.m4 --- autoconf-2.10/acgeneral.m4 Tue May 7 13:20:38 1996 +++ autoconf-2.11/acgeneral.m4 Mon Nov 18 10:28:34 1996 @@ -16,5 +16,6 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. dnl dnl As a special exception, the Free Software Foundation gives unlimited @@ -52,5 +53,5 @@ changequote([, ]) -define(AC_ACVERSION, 2.10) +define(AC_ACVERSION, 2.11) dnl Some old m4's don't support m4exit. But they provide @@ -185,4 +186,8 @@ x_libraries=NONE dnl Installation directory options. +dnl These are left unexpanded so users can "make install exec_prefix=/foo" +dnl and all the variables that are supposed to be based on exec_prefix +dnl by default will actually change. +dnl Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' @@ -201,4 +206,6 @@ subdirs= MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= @@ -805,5 +812,6 @@ [ifelse(builtin([eval], [$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1, -[errprint(Autoconf version $7 or higher is required for this script +[errprint(dnl +FATAL ERROR: Autoconf version $7 or higher is required for this script )m4exit(3)])]) @@ -916,8 +924,10 @@ dnl Set the other host vars. +changequote(<<, >>)dnl host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($host) AC_SUBST(host)dnl @@ -944,8 +954,10 @@ dnl Set the other target vars. +changequote(<<, >>)dnl target=`$ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($target) AC_SUBST(target)dnl @@ -972,8 +984,10 @@ dnl Set the other build vars. +changequote(<<, >>)dnl build=`$ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($build) AC_SUBST(build)dnl @@ -1040,6 +1054,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. +# HP-UX 10.01 sh prints single quotes around any value that contains spaces. (set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ +sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)='*\([^']*\)'*/\1=\${\1='\2'}/p"\ >> confcache changequote([, ])dnl @@ -1127,9 +1142,11 @@ dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION) define(AC_MSG_CHECKING, -[echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG]) +[echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG +echo "configure:__oline__: checking $1" >&AC_FD_CC]) dnl AC_CHECKING(FEATURE-DESCRIPTION) define(AC_CHECKING, -[echo "checking $1" 1>&AC_FD_MSG]) +[echo "checking $1" 1>&AC_FD_MSG +echo "configure:__oline__: checking $1" >&AC_FD_CC]) dnl AC_MSG_RESULT(RESULT-DESCRIPTION) @@ -1242,5 +1259,8 @@ ifelse([$6], , , [ ac_prog_rejected=no ])dnl - for ac_dir in ifelse([$5], , $PATH, [$5]); do +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl bash word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + for ac_dir in ifelse([$5], , $PATH, [$5$ac_dummy]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then @@ -1303,5 +1323,8 @@ *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in ifelse([$4], , $PATH, [$4]); do +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl bash word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + for ac_dir in ifelse([$4], , $PATH, [$4$ac_dummy]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then @@ -1386,5 +1409,6 @@ define(<>, translit($1, [a-z], [A-Z]))dnl changequote([, ])dnl -AC_MSG_CHECKING([for prefix by ]) +dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. +echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG AC_PATH_PROG(AC_VAR_NAME, $1) changequote(<<, >>)dnl @@ -1404,10 +1428,10 @@ dnl [, OTHER-LIBRARIES]]]) AC_DEFUN(AC_CHECK_LIB, -[AC_MSG_CHECKING([for -l$1]) +[AC_MSG_CHECKING([for $2 in -l$1]) dnl Use a cache variable name containing both the library and function name, dnl because the test really is for library $1 defining function $2, not dnl just for library $1. Separate tests with the same $1 and different $2s dnl may have different results. -ac_lib_var=`echo $1['_']$2 | tr './+\055' '__p_'` +ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, [ac_save_LIBS="$LIBS" @@ -1433,5 +1457,6 @@ ifelse([$3], , [changequote(, )dnl - ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_lib) @@ -1499,4 +1524,6 @@ else echo "$ac_err" >&AC_FD_CC + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC ifelse([$3], , , [ rm -rf conftest* $3 @@ -1524,5 +1551,8 @@ dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC | +dnl Prevent m4 from eating character classes: +changequote(, )dnl egrep "$1" >/dev/null 2>&1; then +changequote([, ])dnl ifelse([$3], , :, [rm -rf conftest* $3]) @@ -1548,6 +1578,5 @@ #include "confdefs.h" [$1] -int main() { return 0; } -int t() { +int main() { [$2] ; return 0; } @@ -1556,6 +1585,8 @@ ifelse([$3], , :, [rm -rf conftest* $3]) -ifelse([$4], , , [else - rm -rf conftest* +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$4], , , [ rm -rf conftest* $4 ])dnl @@ -1586,14 +1617,15 @@ #include "confdefs.h" [$1] -int main() { return 0; } -int t() { +int main() { [$2] ; return 0; } EOF -if AC_TRY_EVAL(ac_link); then +if AC_TRY_EVAL(ac_link) && test -s conftest; then ifelse([$3], , :, [rm -rf conftest* $3]) -ifelse([$4], , , [else - rm -rf conftest* +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$4], , , [ rm -rf conftest* $4 ])dnl @@ -1617,5 +1649,12 @@ [$4]) else -cat > conftest.$ac_ext < conftest.$ac_ext </dev/null; then ifelse([$2], , :, [$2]) -ifelse([$3], , , [else +else + echo "configure: failed program was:" >&AC_FD_CC + cat conftest.$ac_ext >&AC_FD_CC +ifelse([$3], , , [ rm -fr conftest* $3 ])dnl fi -fi rm -fr conftest*]) @@ -1643,5 +1684,5 @@ AC_DEFUN(AC_CHECK_HEADER, [dnl Do the transliteration at runtime so arg 1 can be a shell variable. -ac_safe=`echo "$1" | tr './\055' '___'` +ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(ac_cv_header_$ac_safe, @@ -1664,5 +1705,5 @@ AC_CHECK_HEADER($ac_hdr, [changequote(, )dnl - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl @@ -1725,10 +1766,7 @@ ]) -dnl AC_REPLACE_FUNCS(FUNCTION-NAME...) +dnl AC_REPLACE_FUNCS(FUNCTION...) AC_DEFUN(AC_REPLACE_FUNCS, -[for ac_func in $1 -do -AC_CHECK_FUNC($ac_func, , [LIBOBJS="$LIBOBJS ${ac_func}.o"]) -done +[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.o"]) AC_SUBST(LIBOBJS)dnl ]) @@ -1771,7 +1809,11 @@ AC_MSG_CHECKING(for $1) AC_CACHE_VAL(ac_cv_type_$1, -[AC_EGREP_CPP($1, [#include +[AC_EGREP_CPP(dnl +changequote(<<<,>>>)dnl +<<<$1[^a-zA-Z_0-9]>>>dnl +changequote([,]), [#include #if STDC_HEADERS #include +#include #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl AC_MSG_RESULT($ac_cv_type_$1) @@ -1804,5 +1846,5 @@ dnl The big finish. -dnl Produce config.status, config.h, and links, and configure subdirs. +dnl Produce config.status, config.h, and links; and configure subdirs. dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS]) define(AC_OUTPUT, @@ -1896,4 +1938,5 @@ ])dnl +dnl Set the DEFS variable to the -D options determined earlier. dnl This is a subroutine of AC_OUTPUT. dnl It is called inside configure, outside of config.status. @@ -1917,6 +1960,8 @@ ]) +dnl Do the variable substitutions to create the Makefiles or whatever. dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted -dnl here document whose contents are going into config.status. +dnl here document whose contents are going into config.status, but +dnl upon returning, the here document is being quoted. dnl AC_OUTPUT_FILES(FILE...) define(AC_OUTPUT_FILES, @@ -1935,4 +1980,40 @@ CEOF EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS < $ac_file +" $ac_given_srcdir/$ac_file_in | eval "$ac_sed_cmds" > $ac_file dnl This would break Makefile dependencies. dnl if cmp -s $ac_file conftest.out 2>/dev/null; then @@ -2010,7 +2092,8 @@ dnl fi fi; done -rm -f conftest.subs +rm -f conftest.s* ]) +dnl Create the config.h files from the config.h.in files. dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted dnl here document whose contents are going into config.status. @@ -2038,5 +2121,12 @@ changequote([, ])dnl -CONFIG_HEADERS=${CONFIG_HEADERS-"$1"} +if test -z "$CONFIG_HEADERS"; then +EOF +dnl Support passing AC_CONFIG_HEADER a value containing shell variables. +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile]", defaulting infile="outfile.in". @@ -2084,6 +2174,4 @@ # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 rm -f conftest.tail @@ -2242,4 +2330,9 @@ cd $ac_config_dir +changequote(, )dnl + # A "../" for each directory in /$ac_config_dir. + ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` +changequote([, ])dnl + case "$srcdir" in .) # No --srcdir option. We are building in place. @@ -2248,5 +2341,5 @@ ac_sub_srcdir=$srcdir/$ac_config_dir ;; *) # Relative path. - ac_sub_srcdir=../$srcdir/$ac_config_dir ;; + ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;; esac @@ -2265,8 +2358,4 @@ # 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 -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'` -changequote([, ])dnl case "$cache_file" in /*) ac_sub_cache_file=$cache_file ;; diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/acheaders autoconf-2.11/acheaders --- autoconf-2.10/acheaders Sat Oct 1 19:13:28 1994 +++ autoconf-2.11/acheaders Thu Nov 14 19:07:30 1996 @@ -6,5 +6,4 @@ sys/mkdev.h AC_HEADER_MAJOR string.h AC_HEADER_STDC -strings.h AC_HEADER_STDC stdlib.h AC_HEADER_STDC stddef.h AC_HEADER_STDC @@ -17,6 +16,8 @@ fcntl.h AC_CHECK_HEADERS limits.h AC_CHECK_HEADERS +malloc.h AC_CHECK_HEADERS paths.h AC_CHECK_HEADERS sgtty.h AC_CHECK_HEADERS +strings.h AC_CHECK_HEADERS sys/file.h AC_CHECK_HEADERS sys/ioctl.h AC_CHECK_HEADERS diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/acoldnames.m4 autoconf-2.11/acoldnames.m4 --- autoconf-2.10/acoldnames.m4 Tue Oct 18 20:30:44 1994 +++ autoconf-2.11/acoldnames.m4 Sun Jul 14 12:37:12 1996 @@ -15,5 +15,6 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. dnl dnl General macros. diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/acspecific.m4 autoconf-2.11/acspecific.m4 --- autoconf-2.10/acspecific.m4 Thu Mar 21 10:52:58 1996 +++ autoconf-2.11/acspecific.m4 Mon Nov 18 10:28:36 1996 @@ -15,5 +15,6 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. dnl dnl As a special exception, the Free Software Foundation gives unlimited @@ -78,4 +79,5 @@ fi +AC_PROG_CC_WORKS AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc, [dnl The semicolon is to pacify NeXT's syntax-checking cpp. @@ -90,8 +92,14 @@ ac_cv_prog_gcc=no fi]) + if test $ac_cv_prog_gcc = yes; then GCC=yes - if test "${CFLAGS+set}" != set; then - AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_gcc_g, +dnl Check whether -g works even if CFLAGS is set, in case the package +dnl plays around with CFLAGS (such as to build both debugging and +dnl normal versions of a library), tasteless as that idea is. + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_gcc_g, [echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -102,9 +110,10 @@ rm -f conftest* ]) - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_gcc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" fi else @@ -116,6 +125,7 @@ AC_DEFUN(AC_PROG_CXX, [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl -AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc) +AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++, gcc) +AC_PROG_CXX_WORKS AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx, [dnl The semicolon is to pacify NeXT's syntax-checking cpp. @@ -132,6 +142,11 @@ if test $ac_cv_prog_gxx = yes; then GXX=yes - if test "${CXXFLAGS+set}" != set; then - AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_gxx_g, +dnl Check whether -g works even if CXXFLAGS is set, in case the package +dnl plays around with CXXFLAGS (such as to build both debugging and +dnl normal versions of a library), tasteless as that idea is. + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_gxx_g, [echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then @@ -143,9 +158,10 @@ ]) dnl - if test $ac_cv_prog_gxx_g = yes; then - CXXFLAGS="-g -O" - else - CXXFLAGS="-O" - fi + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + elif test $ac_cv_prog_gxx_g = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-O2" fi else @@ -155,4 +171,36 @@ ]) +AC_DEFUN(AC_PROG_CC_WORKS, +[AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works]) +AC_LANG_SAVE +AC_LANG_C +dnl We can't try running a program here because we don't know yet if +dnl we're cross-compiling. And we can't check for that first, because the +dnl cross-compiling test being fooled by non-working compiler installations +dnl is the reason we're doing this in the first place. +AC_TRY_LINK(, , ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no) +AC_LANG_RESTORE +AC_MSG_RESULT($ac_cv_prog_cc_works) +if test $ac_cv_prog_cc_works = no; then + AC_MSG_ERROR([Installation or configuration problem: C compiler cannot create executables.]) +fi +]) + +AC_DEFUN(AC_PROG_CXX_WORKS, +[AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works]) +AC_LANG_SAVE +AC_LANG_CPLUSPLUS +dnl We can't try running a program here because we don't know yet if +dnl we're cross-compiling. And we can't check for that first, because the +dnl cross-compiling test being fooled by non-working compiler installations +dnl is the reason we're doing this in the first place. +AC_TRY_LINK(, , ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no) +AC_LANG_RESTORE +AC_MSG_RESULT($ac_cv_prog_cxx_works) +if test $ac_cv_prog_cxx_works = no; then + AC_MSG_ERROR([Installation or configuration problem: C++ compiler cannot create executables.]) +fi +]) + AC_DEFUN(AC_PROG_GCC_TRADITIONAL, [AC_REQUIRE([AC_PROG_CC])dnl @@ -228,5 +276,5 @@ AC_DEFUN(AC_PROG_MAKE_SET, [AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE}) -set dummy ${MAKE-make}; ac_make=[$]2 +set dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'` AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, [cat > conftestmake <<\EOF @@ -356,5 +404,6 @@ 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"]) +rm -f "${LEX_OUTPUT_ROOT}.c" +]) dnl if test $ac_cv_prog_lex_yytext_pointer = yes; then @@ -544,5 +593,5 @@ dnl AC_CHECK_HEADER_DIRENT(HEADER-FILE, ACTION-IF-FOUND) AC_DEFUN(AC_CHECK_HEADER_DIRENT, -[ac_safe=`echo "$1" | tr './\055' '___'` +[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` AC_MSG_CHECKING([for $1 that defines DIR]) AC_CACHE_VAL(ac_cv_header_dirent_$ac_safe, @@ -567,5 +616,5 @@ AC_CHECK_HEADER_DIRENT($ac_hdr, [changequote(, )dnl - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl @@ -765,9 +814,42 @@ ]) +AC_DEFUN(AC_FUNC_FNMATCH, +[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works, +# Some versions of Solaris or SCO have a broken fnmatch function. +# So we run a test program. If we are cross-compiling, take no chance. +# Thanks to John Oleynick and Franc,ois Pinard for this test. +[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }], +ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no, +ac_cv_func_fnmatch_works=no)]) +if test $ac_cv_func_fnmatch_works = yes; then + AC_DEFINE(HAVE_FNMATCH) +fi +]) + AC_DEFUN(AC_FUNC_MMAP, -[AC_CHECK_FUNCS(valloc getpagesize) -AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap, +[AC_CHECK_FUNCS(getpagesize) +AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, [AC_TRY_RUN([ -/* Thanks to Mike Haertel and Jim Avera for this test. */ +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the filesystem buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propogated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ #include #include @@ -794,12 +876,8 @@ #endif -#ifndef HAVE_VALLOC -# define valloc malloc -#endif - #ifdef __cplusplus -extern "C" { void *valloc(unsigned), *malloc(unsigned); } +extern "C" { void *malloc(unsigned); } #else -char *valloc(), *malloc(); +char *malloc(); #endif @@ -807,32 +885,67 @@ main() { - char *buf1, *buf2, *buf3; - int i = getpagesize(), j; - int i2 = i * 2; - int fd; - - buf1 = (char *)valloc(i2); - buf2 = (char *)valloc(i); - buf3 = (char *)malloc(i2); - for (j = 0; j < i2; ++j) - *(buf1 + j) = rand(); - fd = open("conftestmmap", O_CREAT | O_RDWR, 0666); - write(fd, buf1, i2); - mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0); - for (j = 0; j < i; ++j) - if (*(buf1 + j) != *(buf2 + j)) - exit(1); - lseek(fd, (long)i, 0); - read(fd, buf2, i); /* read into mapped memory -- file should not change */ - /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */ - lseek(fd, (long)0, 0); - read(fd, buf3, i2); - for (j = 0; j < i2; ++j) - if (*(buf1 + j) != *(buf3 + j)) - exit(1); - exit(0); + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize(); + + /* + * First, make a file with some known garbage in it. + */ + data = malloc(pagesize); + if (!data) + exit(1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand(); + umask(0); + fd = creat("conftestmmap", 0600); + if (fd < 0) + exit(1); + if (write(fd, data, pagesize) != pagesize) + exit(1); + close(fd); + + /* + * Next, try to mmap the file at a fixed address which + * already has something else allocated at it. If we can, + * also make sure that we see the same garbage. + */ + fd = open("conftestmmap", O_RDWR); + if (fd < 0) + exit(1); + data2 = malloc(2 * pagesize); + if (!data2) + exit(1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit(1); + + /* + * Finally, make sure that changes to the mapped area + * do not percolate back to the file as seen by read(). + * (This is a bug on some variants of i386 svr4.0.) + */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = malloc(pagesize); + if (!data3) + exit(1); + if (read(fd, data3, pagesize) != pagesize) + exit(1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit(1); + close(fd); + unlink("conftestmmap"); + exit(0); } -], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)]) -if test $ac_cv_func_mmap = yes; then +], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no, +ac_cv_func_mmap_fixed_mapped=no)]) +if test $ac_cv_func_mmap_fixed_mapped = yes; then AC_DEFINE(HAVE_MMAP) fi @@ -900,4 +1013,26 @@ ]) +AC_DEFUN(AC_FUNC_SETPGRP, +[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, +AC_TRY_RUN([ +/* + * If this system has a BSD-style setpgrp, which takes arguments, exit + * successfully. + */ +main() +{ + if (setpgrp(1,1) == -1) + exit(0); + else + exit(1); +} +], ac_cv_func_setpgrp_void=no, ac_cv_func_setpgrp_void=yes, + AC_MSG_ERROR(cannot check setpgrp if cross compiling)) +) +if test $ac_cv_func_setpgrp_void = yes; then + AC_DEFINE(SETPGRP_VOID) +fi +]) + AC_DEFUN(AC_FUNC_VPRINTF, [AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF)) @@ -910,5 +1045,5 @@ [AC_REQUIRE([AC_TYPE_PID_T])dnl AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H)) -AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork, +AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, [AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */ #include @@ -937,6 +1072,8 @@ if (!child) { child = vfork (); - if (child < 0) + if (child < 0) { perror ("vfork"); + _exit(2); + } if (!child) { arg = getpid(); @@ -1001,6 +1138,6 @@ } }], -ac_cv_func_vfork=yes, ac_cv_func_vfork=no, AC_CHECK_FUNC(vfork))]) -if test $ac_cv_func_vfork = no; then +ac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork))]) +if test $ac_cv_func_vfork_works = no; then AC_DEFINE(vfork, fork) fi @@ -1008,5 +1145,5 @@ AC_DEFUN(AC_FUNC_WAIT3, -[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3, +[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage, [AC_TRY_RUN([#include #include @@ -1036,6 +1173,7 @@ && 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)]) -if test $ac_cv_func_wait3 = yes; then +}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no, +ac_cv_func_wait3_rusage=no)]) +if test $ac_cv_func_wait3_rusage = yes; then AC_DEFINE(HAVE_WAIT3) fi @@ -1053,5 +1191,5 @@ fi -AC_CACHE_CHECK([for alloca], ac_cv_func_alloca, +AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, [AC_TRY_LINK([ #ifdef __GNUC__ @@ -1071,10 +1209,10 @@ #endif ], [char *p = (char *) alloca(1);], - ac_cv_func_alloca=yes, ac_cv_func_alloca=no)]) -if test $ac_cv_func_alloca = yes; then + ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)]) +if test $ac_cv_func_alloca_works = yes; then AC_DEFINE(HAVE_ALLOCA) fi -if test $ac_cv_func_alloca = no; then +if test $ac_cv_func_alloca_works = no; then # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or @@ -1137,7 +1275,7 @@ # 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_getloadavg_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS" AC_CHECK_LIB(getloadavg, getloadavg, - LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS") + LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS") fi @@ -1244,5 +1382,5 @@ AC_DEFUN(AC_FUNC_STRCOLL, -[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll, +[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, [AC_TRY_RUN([#include main () @@ -1251,6 +1389,7 @@ strcoll ("ABC", "DEF") >= 0 || strcoll ("123", "456") >= 0); -}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)]) -if test $ac_cv_func_strcoll = yes; then +}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no, +ac_cv_func_strcoll_works=no)]) +if test $ac_cv_func_strcoll_works = yes; then AC_DEFINE(HAVE_STRCOLL) fi @@ -1285,10 +1424,12 @@ AC_DEFUN(AC_FUNC_STRFTIME, +[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)], [# strftime is in -lintl on SCO UNIX. -AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS") -AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])]) +AC_CHECK_LIB(intl, strftime, +[AC_DEFINE(HAVE_STRFTIME) +LIBS="-lintl $LIBS"])])]) AC_DEFUN(AC_FUNC_MEMCMP, -[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp, +[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean, [AC_TRY_RUN([ main() @@ -1297,6 +1438,7 @@ exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1); } -], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)]) -test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o" +], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no, +ac_cv_func_memcmp_clean=no)]) +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" AC_SUBST(LIBOBJS)dnl ]) @@ -1392,6 +1534,6 @@ AC_DEFUN(AC_C_CROSS, -[# If we cannot run a trivial program, we must be cross compiling. -AC_CACHE_CHECK(whether cross-compiling, ac_cv_c_cross, +[# If we cannot run a trivial program, we are probably using a cross compiler. +AC_CACHE_CHECK(whether using a cross-compiler, ac_cv_c_cross, [AC_TRY_RUN([main(){return(0);}], ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)]) @@ -1594,11 +1736,18 @@ # Test for long file names in all the places we know might matter: # . the current directory, where building will happen -# /tmp where it might want to write temporary files -# /var/tmp likewise -# /usr/tmp likewise # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # eval it to expand exec_prefix. -for ac_dir in `eval echo . /tmp /var/tmp /usr/tmp $prefix/lib $exec_prefix/lib` ; do +# $TMPDIR if set, where it might want to write temporary files +# if $TMPDIR is not set: +# /tmp where it might want to write temporary files +# /var/tmp likewise +# /usr/tmp likewise +if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then + ac_tmpdirs="$TMPDIR" +else + ac_tmpdirs='/tmp /var/tmp /usr/tmp' +fi +for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do test -d $ac_dir || continue test -w $ac_dir || continue # It is less confusing to not echo anything here. @@ -1711,5 +1860,7 @@ fi done - # Screen out bogus values from the imake configuration. + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; @@ -1738,26 +1889,26 @@ ac_x_includes=], [# Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ + /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ + /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ + /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ + /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ - /usr/X11/include \ - /usr/include/X11 \ - /usr/local/X11/include \ - /usr/local/include/X11 \ - \ /usr/X386/include \ /usr/x386/include \ @@ -1798,26 +1949,26 @@ [LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ + /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ + /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ + /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ - /usr/X11/lib \ - /usr/lib/X11 \ - /usr/local/X11/lib \ - /usr/local/lib/X11 \ - \ /usr/X386/lib \ /usr/x386/lib \ @@ -1830,4 +1981,5 @@ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ \ /usr/openwin/lib \ @@ -1835,5 +1987,5 @@ ; \ do -dnl XXX Shouldn't this really use AC_TRY_LINK to be portable & robust?? +dnl Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then @@ -1848,9 +2000,9 @@ dnl Find additional X libraries, magic flags, etc. AC_DEFUN(AC_PATH_XTRA, -[AC_REQUIRE([AC_ISC_POSIX])dnl -AC_REQUIRE([AC_PATH_X])dnl +[AC_REQUIRE([AC_PATH_X])dnl if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. - X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING" + AC_DEFINE(X_DISPLAY_MISSING) + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then @@ -1858,30 +2010,35 @@ fi - # It would be nice to have a more robust check for the -R ld option than - # just checking for Solaris. # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" - if test "`(uname) 2>/dev/null`" = SunOS && - uname -r | grep '^5' >/dev/null; then - X_LIBS="$X_LIBS -R $x_libraries" - fi +dnl FIXME banish uname from this macro! + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + AC_MSG_CHECKING(whether -R must be followed by a space) + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + AC_TRY_LINK(, , ac_R_nospace=yes, ac_R_nospace=no) + if test $ac_R_nospace = yes; then + AC_MSG_RESULT(no) + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + AC_TRY_LINK(, , ac_R_space=yes, ac_R_space=no) + if test $ac_R_space = yes; then + AC_MSG_RESULT(yes) + X_LIBS="$X_LIBS -R $x_libraries" + else + AC_MSG_RESULT(neither works) + fi + fi + LIBS="$ac_xsave_LIBS" + esac fi - # Check for libraries that X11R6 Xt/Xaw programs need. - - ac_save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # 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, IceConnectionNumber, - [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"]) - LDFLAGS="$ac_save_LDFLAGS" - # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then @@ -1894,20 +2051,57 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then AC_CHECK_LIB(dnet_stub, dnet_ntoa, - [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) + [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. - # Not sure which flavor of 386 UNIX this is, but it seems harmless to - # check for it. - AC_CHECK_LIB(nsl, t_accept, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"]) + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + AC_CHECK_FUNC(gethostbyname) + if test $ac_cv_func_gethostbyname = no; then + AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") + fi # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT 2.0. - # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch. - if test "`(uname) 2>/dev/null`" != IRIX; then - AC_CHECK_LIB(socket, socket, [X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"]) + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + AC_CHECK_FUNC(connect) + if test $ac_cv_func_connect = no; then + AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , + $X_EXTRA_LIBS) + fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + AC_CHECK_FUNC(remove) + if test $ac_cv_func_remove = no; then + AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + AC_CHECK_FUNC(shmat) + if test $ac_cv_func_shmat = no; then + AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc") fi fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # 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, IceConnectionNumber, + [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"]) + LDFLAGS="$ac_save_LDFLAGS" + fi AC_SUBST(X_CFLAGS)dnl @@ -1925,5 +2119,4 @@ AC_DEFUN(AC_AIX, [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 AIX) @@ -1937,5 +2130,4 @@ AC_DEFUN(AC_MINIX, [AC_BEFORE([$0], [AC_TRY_COMPILE])dnl -AC_BEFORE([$0], [AC_TRY_LINK])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) @@ -1948,6 +2140,6 @@ AC_DEFUN(AC_ISC_POSIX, -[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl -AC_BEFORE([$0], [AC_TRY_LINK])dnl +[AC_REQUIRE([AC_PROG_CC])dnl +AC_BEFORE([$0], [AC_TRY_COMPILE])dnl AC_BEFORE([$0], [AC_TRY_RUN])dnl AC_MSG_CHECKING(for POSIXized ISC) diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/autoconf.m4 autoconf-2.11/autoconf.m4 --- autoconf-2.10/autoconf.m4 Tue Aug 30 16:24:50 1994 +++ autoconf-2.11/autoconf.m4 Sun Jul 14 12:37:15 1996 @@ -16,5 +16,6 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. dnl dnl Written by David MacKenzie. diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/autoconf.sh autoconf-2.11/autoconf.sh --- autoconf-2.10/autoconf.sh Tue Jan 16 17:07:41 1996 +++ autoconf-2.11/autoconf.sh Mon Nov 11 19:15:12 1996 @@ -15,5 +15,6 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # If given no args, create `configure' from template file `configure.in'. @@ -122,5 +123,5 @@ # You could add your own prefixes to pattern if you wanted to check for -# them too, e.g. pattern="AC_\|ILT_", except that UNIX sed doesn't do +# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do # alternation. pattern="AC_" diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/autoconf.texi autoconf-2.11/autoconf.texi --- autoconf-2.10/autoconf.texi Fri Mar 8 15:04:47 1996 +++ autoconf-2.11/autoconf.texi Mon Nov 18 10:28:40 1996 @@ -7,7 +7,7 @@ @c %**end of header -@set EDITION 2.8 -@set VERSION 2.8 -@set UPDATED January 1996 +@set EDITION 2.11 +@set VERSION 2.11 +@set UPDATED November 1996 @iftex @@ -115,5 +115,5 @@ * Upgrading:: Tips for upgrading from version 1. * History:: History of Autoconf. -* Old Macro Names:: Backward compatibility macros. +* Old Macro Names:: Backward compatibility macros. * Environment Variable Index:: Index of environment variables used. * Output Variable Index:: Index of variables set in output files. @@ -125,8 +125,8 @@ Making @code{configure} Scripts -* Writing configure.in:: What to put in an Autoconf input file. +* Writing configure.in:: What to put in an Autoconf input file. * Invoking autoscan:: Semi-automatic @file{configure.in} writing. * Invoking ifnames:: Listing the conditionals in source code. -* Invoking autoconf:: How to create configuration scripts. +* Invoking autoconf:: How to create configuration scripts. * Invoking autoreconf:: Remaking multiple @code{configure} scripts. @@ -134,5 +134,5 @@ * Input:: Where Autoconf should find files. -* Output:: Creating output files. +* Output:: Creating output files. * Makefile Substitutions:: Using output variables in @file{Makefile}s. * Configuration Headers:: Creating a configuration header file. @@ -143,24 +143,24 @@ Substitutions in Makefiles -* Preset Output Variables:: Output variables that are always set. -* Build Directories:: Supporting multiple concurrent compiles. -* Automatic Remaking:: Makefile rules for configuring. +* Preset Output Variables:: Output variables that are always set. +* Build Directories:: Supporting multiple concurrent compiles. +* Automatic Remaking:: Makefile rules for configuring. Configuration Header Files * Header Templates:: Input for the configuration headers. -* Invoking autoheader:: How to create configuration templates. +* Invoking autoheader:: How to create configuration templates. Existing Tests -* Alternative Programs:: Selecting between alternative programs. +* Alternative Programs:: Selecting between alternative programs. * Libraries:: Library archives that might be missing. -* Library Functions:: C library functions that might be missing. -* Header Files:: Header files that might be missing. -* Structures:: Structures or members that might be missing. -* Typedefs:: @code{typedef}s that might be missing. -* Compiler Characteristics:: C compiler or machine architecture features. -* System Services:: Operating system services. -* UNIX Variants:: Special kludges for specific UNIX variants. +* Library Functions:: C library functions that might be missing. +* Header Files:: Header files that might be missing. +* Structures:: Structures or members that might be missing. +* Typedefs:: @code{typedef}s that might be missing. +* Compiler Characteristics:: C compiler or machine architecture features. +* System Services:: Operating system services. +* UNIX Variants:: Special kludges for specific UNIX variants. Alternative Programs @@ -186,11 +186,11 @@ Writing Tests -* Examining Declarations:: Detecting header files and declarations. +* Examining Declarations:: Detecting header files and declarations. * Examining Syntax:: Detecting language syntax features. * Examining Libraries:: Detecting functions and global variables. -* Run Time:: Testing for run-time features. +* Run Time:: Testing for run-time features. * Portable Shell:: Shell script portability pitfalls. * Testing Values and Files:: Checking strings and files. -* Multiple Cases:: Tests for several possible values. +* Multiple Cases:: Tests for several possible values. * Language Choice:: Selecting which language to use for testing. @@ -198,11 +198,11 @@ * Test Programs:: Running test programs. -* Guidelines:: General rules for writing test programs. -* Test Functions:: Avoiding pitfalls in test programs. +* Guidelines:: General rules for writing test programs. +* Test Functions:: Avoiding pitfalls in test programs. Results of Tests * Defining Symbols:: Defining C preprocessor symbols. -* Setting Output Variables:: Replacing variables in output files. +* Setting Output Variables:: Replacing variables in output files. * Caching Results:: Speeding up subsequent @code{configure} runs. * Printing Messages:: Notifying users of progress or problems. @@ -211,17 +211,17 @@ * Cache Variable Names:: Shell variables used in caches. -* Cache Files:: Files @code{configure} uses for caching. +* Cache Files:: Files @code{configure} uses for caching. Writing Macros -* Macro Definitions:: Basic format of an Autoconf macro. +* Macro Definitions:: Basic format of an Autoconf macro. * Macro Names:: What to call your new macros. -* Quoting:: Protecting macros from unwanted expansion. -* Dependencies Between Macros:: What to do when macros depend on other macros. +* Quoting:: Protecting macros from unwanted expansion. +* Dependencies Between Macros:: What to do when macros depend on other macros. Dependencies Between Macros -* Prerequisite Macros:: Ensuring required information. -* Suggested Ordering:: Warning about possible ordering problems. +* Prerequisite Macros:: Ensuring required information. +* Suggested Ordering:: Warning about possible ordering problems. * Obsolete Macros:: Warning about old ways of doing things. @@ -276,9 +276,9 @@ History of Autoconf -* Genesis:: Prehistory and naming of @code{configure}. -* Exodus:: The plagues of @code{m4} and Perl. -* Leviticus:: The priestly code of portability arrives. -* Numbers:: Growth and contributors. -* Deuteronomy:: Approaching the promises of easy configuration. +* Genesis:: Prehistory and naming of @code{configure}. +* Exodus:: The plagues of @code{m4} and Perl. +* Leviticus:: The priestly code of portability arrives. +* Numbers:: Growth and contributors. +* Deuteronomy:: Approaching the promises of easy configuration. @end menu @@ -438,8 +438,8 @@ @menu -* Writing configure.in:: What to put in an Autoconf input file. +* Writing configure.in:: What to put in an Autoconf input file. * Invoking autoscan:: Semi-automatic @file{configure.in} writing. * Invoking ifnames:: Listing the conditionals in source code. -* Invoking autoconf:: How to create configuration scripts. +* Invoking autoconf:: How to create configuration scripts. * Invoking autoreconf:: Remaking multiple @code{configure} scripts. @end menu @@ -704,5 +704,6 @@ @item --localdir=@var{dir} @itemx -l @var{dir} -Look for the package files @file{aclocal.m4} and @file{acconfig.h} (but +Have @code{autoconf} and @code{autoheader} look for the package files +@file{aclocal.m4} and (@code{autoheader} only) @file{acconfig.h} (but not @file{@var{file}.top} and @file{@var{file}.bot}) in directory @var{dir} instead of in the directory containing each @file{configure.in}. @@ -735,5 +736,5 @@ @menu * Input:: Where Autoconf should find files. -* Output:: Creating output files. +* Output:: Creating output files. * Makefile Substitutions:: Using output variables in @file{Makefile}s. * Configuration Headers:: Creating a configuration header file. @@ -791,5 +792,6 @@ @defmac AC_OUTPUT (@r{[}@var{file}@dots{}@r{] [,}@var{extra-cmds}@r{] [,}@var{init-cmds}@r{]}) @maindex OUTPUT -Create output files. The @var{file}@dots{} argument is a +Create output files. Call this macro once, at the end of @file{configure.in}. +The @var{file}@dots{} argument is a whitespace-separated list of output files; it may be empty. This macro creates each file @file{@var{file}} by copying an input file (by default @@ -878,7 +880,7 @@ @menu -* Preset Output Variables:: Output variables that are always set. -* Build Directories:: Supporting multiple concurrent compiles. -* Automatic Remaking:: Makefile rules for configuring. +* Preset Output Variables:: Output variables that are always set. +* Build Directories:: Supporting multiple concurrent compiles. +* Automatic Remaking:: Makefile rules for configuring. @end menu @@ -1186,10 +1188,10 @@ @end example @noindent -Doing this allows you to keep your filenames acceptable to MS-DOS. +Doing this allows you to keep your file names acceptable to MS-DOS. @end defmac @menu * Header Templates:: Input for the configuration headers. -* Invoking autoheader:: How to create configuration templates. +* Invoking autoheader:: How to create configuration templates. @end menu @@ -1442,13 +1444,13 @@ @menu -* Alternative Programs:: Selecting between alternative programs. +* Alternative Programs:: Selecting between alternative programs. * Libraries:: Library archives that might be missing. -* Library Functions:: C library functions that might be missing. -* Header Files:: Header files that might be missing. -* Structures:: Structures or members that might be missing. -* Typedefs:: @code{typedef}s that might be missing. -* Compiler Characteristics:: C compiler or machine architecture features. -* System Services:: Operating system services. -* UNIX Variants:: Special kludges for specific UNIX variants. +* Library Functions:: C library functions that might be missing. +* Header Files:: Header files that might be missing. +* Structures:: Structures or members that might be missing. +* Typedefs:: @code{typedef}s that might be missing. +* Compiler Characteristics:: C compiler or machine architecture features. +* System Services:: Operating system services. +* UNIX Variants:: Special kludges for specific UNIX variants. @end menu @@ -1537,7 +1539,7 @@ @code{CXX} or @code{CCC} (in that order) is set; if so, set output variable @code{CXX} to its value. Otherwise search for a C++ compiler -under likely names (@code{c++}, @code{g++}, @code{gcc}, @code{CC}, and -@code{cxx}). If none of those checks succeed, as a last resort set -@code{CXX} to @code{gcc}. +under likely names (@code{c++}, @code{g++}, @code{gcc}, @code{CC}, +@code{cxx}, and @code{cc++}). If none of those checks succeed, as a +last resort set @code{CXX} to @code{gcc}. If using the GNU C++ compiler, set shell variable @code{GXX} to @@ -1623,4 +1625,21 @@ and filesystem support symbolic links), set output variable @code{LN_S} to @samp{ln -s}, otherwise set it to @samp{ln}. + +If the link is put in a directory other than the current directory, its +meaning depends on whether @samp{ln} or @samp{ln -s} is used. To safely +create links using @samp{$(LN_S)}, either find out which form is used +and adjust the arguments, or always invoke @code{ln} in the directory +where the link is to be created. + +In other words, it does not work to do +@example +$(LN_S) foo /x/bar +@end example + +Instead, do + +@example +(cd /x && $(LN_S) foo bar) +@end example @end defmac @@ -1827,4 +1846,11 @@ @end defmac +@defmac AC_FUNC_FNMATCH +@maindex FUNC_FNMATCH +@ovindex LIBOBJS +If the @code{fnmatch} function is available and works (unlike the one on +SunOS 5.4), define @code{HAVE_FNMATCH}. +@end defmac + @defmac AC_FUNC_GETLOADAVG @maindex FUNC_GETLOADAVG @@ -1903,6 +1929,17 @@ @maindex FUNC_MMAP @cvindex HAVE_MMAP -If the @code{mmap} function exists and works correctly on memory mapped -files, define @code{HAVE_MMAP}. +If the @code{mmap} function exists and works correctly, define +@code{HAVE_MMAP}. Only checks private fixed mapping of already-mapped +memory. +@end defmac + +@defmac AC_FUNC_SETPGRP +@maindex FUNC_SETPGRP +@cvindex SETPGRP_VOID +If @code{setpgrp} takes no argument (the POSIX.1 version), define +@code{SETPGRP_VOID}. Otherwise, it is the BSD version, which takes two +process ID as arguments. This macro does not check whether +@code{setpgrp} exists at all; if you need to work in that situation, +first call @code{AC_CHECK_FUNC} for @code{setpgrp}. @end defmac @@ -2002,10 +2039,14 @@ @end defmac -@defmac AC_REPLACE_FUNCS (@var{function-name}@dots{}) +@defmac AC_REPLACE_FUNCS (@var{function}@dots{}) @maindex REPLACE_FUNCS @ovindex LIBOBJS -For each given @var{function-name} in the whitespace-separated argument -list that is not in the C library, add @samp{@var{function-name}.o} to -the value of the output variable @code{LIBOBJS}. +Like calling @code{AC_CHECK_FUNCS} using an @var{action-if-not-found} +that adds @samp{@var{function}.o} to the value of the output variable +@code{LIBOBJS}. You can declare a function for which your replacement +version is used by enclosing the prototype in @samp{#ifndef +HAVE_@var{function}}. If the system has the function, it probably +declares it in a header file you should be including, so you shouldn't +redeclare it, lest your declaration conflict. @end defmac @@ -2468,7 +2509,8 @@ @defmac AC_CHECK_TYPE (@var{type}, @var{default}) @maindex CHECK_TYPE -If the type @var{type} is not defined in @file{sys/types.h} or -@file{stdlib.h} (if it exists), define it to be the C (or C++) -builtin type @var{default}; e.g., @samp{short} or @samp{unsigned}. +If the type @var{type} is not defined in @file{sys/types.h}, or +@file{stdlib.h} or @file{stddef.h} if they exist, define it to be the +C (or C++) builtin type @var{default}; e.g., @samp{short} or +@samp{unsigned}. @end defmac @@ -2723,11 +2765,11 @@ @menu -* Examining Declarations:: Detecting header files and declarations. +* Examining Declarations:: Detecting header files and declarations. * Examining Syntax:: Detecting language syntax features. * Examining Libraries:: Detecting functions and global variables. -* Run Time:: Testing for run-time features. +* Run Time:: Testing for run-time features. * Portable Shell:: Shell script portability pitfalls. * Testing Values and Files:: Checking strings and files. -* Multiple Cases:: Tests for several possible values. +* Multiple Cases:: Tests for several possible values. * Language Choice:: Selecting which language to use for testing. @end menu @@ -2879,6 +2921,6 @@ @menu * Test Programs:: Running test programs. -* Guidelines:: General rules for writing test programs. -* Test Functions:: Avoiding pitfalls in test programs. +* Guidelines:: General rules for writing test programs. +* Test Functions:: Avoiding pitfalls in test programs. @end menu @@ -2933,4 +2975,7 @@ on the system where @code{configure} is being run, set the shell variable @code{cross_compiling} to @samp{yes}, otherwise @samp{no}. +In other words, this tests whether the build system type is different +from the host system type (the target system type is irrelevant to this +test). @xref{Manual Configuration}, for more on support for cross compiling. @end defmac @@ -3174,5 +3219,5 @@ @menu * Defining Symbols:: Defining C preprocessor symbols. -* Setting Output Variables:: Replacing variables in output files. +* Setting Output Variables:: Replacing variables in output files. * Caching Results:: Speeding up subsequent @code{configure} runs. * Printing Messages:: Notifying users of progress or problems. @@ -3358,5 +3403,5 @@ @menu * Cache Variable Names:: Shell variables used in caches. -* Cache Files:: Files @code{configure} uses for caching. +* Cache Files:: Files @code{configure} uses for caching. @end menu @@ -3456,5 +3501,10 @@ for each kind. The arguments to all of them get enclosed in shell double quotes, so the shell performs variable and backquote substitution -on them. +on them. You can print a message containing a comma by quoting the +message with the @code{m4} quote characters: + +@example +AC_MSG_RESULT([never mind, I found the BASIC compiler]) +@end example These macros are all wrappers around the @code{echo} shell command. @@ -3542,8 +3592,8 @@ @menu -* Macro Definitions:: Basic format of an Autoconf macro. +* Macro Definitions:: Basic format of an Autoconf macro. * Macro Names:: What to call your new macros. -* Quoting:: Protecting macros from unwanted expansion. -* Dependencies Between Macros:: What to do when macros depend on other macros. +* Quoting:: Protecting macros from unwanted expansion. +* Dependencies Between Macros:: What to do when macros depend on other macros. @end menu @@ -3693,6 +3743,6 @@ @menu -* Prerequisite Macros:: Ensuring required information. -* Suggested Ordering:: Warning about possible ordering problems. +* Prerequisite Macros:: Ensuring required information. +* Suggested Ordering:: Warning about possible ordering problems. * Obsolete Macros:: Warning about old ways of doing things. @end menu @@ -4018,4 +4068,13 @@ @samp{--with-@var{package}=no}. +@code{configure} scripts do not complain about +@samp{--with-@var{package}} options that they do not support. +This behavior permits configuring a source tree containing multiple +packages with a top-level @code{configure} script when the packages +support different options, without spurious error messages about options +that some of the packages support. +An unfortunate side effect is that option spelling errors are not diagnosed. +No better approach to this problem has been suggested so far. + For each external software package that may be used, @file{configure.in} should call @code{AC_ARG_WITH} to detect whether the @code{configure} @@ -4081,4 +4140,13 @@ equivalent to @samp{--enable-@var{feature}=no}. +@code{configure} scripts do not complain about +@samp{--enable-@var{feature}} options that they do not support. +This behavior permits configuring a source tree containing multiple +packages with a top-level @code{configure} script when the packages +support different options, without spurious error messages about options +that some of the packages support. +An unfortunate side effect is that option spelling errors are not diagnosed. +No better approach to this problem has been suggested so far. + For each optional feature, @file{configure.in} should call @code{AC_ARG_ENABLE} to detect whether the @code{configure} user asked @@ -4098,5 +4166,5 @@ @var{action-if-given} in the shell variable @code{enableval}, which is actually just the value of the shell variable -@code{enable_@var{package}}, with any @samp{-} characters changed into +@code{enable_@var{feature}}, with any @samp{-} characters changed into @samp{_}. You may use that variable instead, if you wish. The @var{help-string} argument is like that of @code{AC_ARG_WITH} @@ -4315,7 +4383,9 @@ # config.site for configure # -# Default --prefix and --exec-prefix. +# Change some defaults. test "$prefix" = NONE && prefix=/usr/share/local/gnu test "$exec_prefix" = NONE && exec_prefix=/usr/local/gnu +test "$sharedstatedir" = '$@{prefix@}/com' && sharedstatedir=/var +test "$localstatedir" = '$@{prefix@}/var' && localstatedir=/var # # Give Autoconf 2.x generated configure scripts a shared default @@ -4845,9 +4915,9 @@ @menu -* Genesis:: Prehistory and naming of @code{configure}. -* Exodus:: The plagues of @code{m4} and Perl. -* Leviticus:: The priestly code of portability arrives. -* Numbers:: Growth and contributors. -* Deuteronomy:: Approaching the promises of easy configuration. +* Genesis:: Prehistory and naming of @code{configure}. +* Exodus:: The plagues of @code{m4} and Perl. +* Leviticus:: The priestly code of portability arrives. +* Numbers:: Growth and contributors. +* Deuteronomy:: Approaching the promises of easy configuration. @end menu diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/autoheader.m4 autoconf-2.11/autoheader.m4 --- autoconf-2.10/autoheader.m4 Wed Nov 22 13:09:58 1995 +++ autoconf-2.11/autoheader.m4 Sun Jul 14 12:37:17 1996 @@ -15,5 +15,6 @@ dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. dnl dnl Written by Roland McGrath. diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/autoheader.sh autoconf-2.11/autoheader.sh --- autoconf-2.10/autoheader.sh Wed Nov 22 13:09:59 1995 +++ autoconf-2.11/autoheader.sh Thu Nov 14 19:07:39 1996 @@ -1,5 +1,5 @@ #! /bin/sh # autoheader -- create `config.h.in' from `configure.in' -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -15,5 +15,6 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # Written by Roland McGrath. @@ -24,6 +25,6 @@ usage="\ -Usage: autoheader [-h] [--help] [-m dir] [--macrodir=dir] - [-l dir] [--localdir=dir] [--version] [template-file]" +Usage: autoheader [-h] [--help] [-m dir] [--macrodir=dir] + [-l dir] [--localdir=dir] [--version] [template-file]" # NLS nuisances. @@ -46,5 +47,5 @@ while test $# -gt 0 ; do - case "${1}" in + case "${1}" in -h | --help | --h* ) echo "${usage}"; exit 0 ;; @@ -60,5 +61,5 @@ AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`" shift ;; - -m | --macrodir | --m* ) + -m | --macrodir | --m* ) shift test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } @@ -151,5 +152,7 @@ # Don't write "do not edit" -- it will get copied into the # config.h, which it's ok to edit. -echo "/* ${config_h_in}. Generated automatically from $infile by autoheader. */" +cat </dev/null && sedscript="1,/@TOP@/d;" + grep @BOTTOM@ $t >/dev/null && sedscript="$sedscript /@BOTTOM@/,\$d;" + # This substitution makes "#undefFOO" in acconfig.h work. + sed -n -e "$sedscript s/ / /g; p" $t + echo; echo + done | + # The sed script is suboptimal because it has to take care of + # some broken seds (e.g. AIX) that remove '\n' from the + # pattern/hold space if the line is empty. (junio@twinsun.com). + sed -n -e ' /^[ ]*$/{ x @@ -176,7 +188,16 @@ } H' | sed -e 's/@@*/@/g' | - # Select each paragraph that refers to a symbol we picked out above. - fgrep "$syms" | - tr @ \\012 + # Select each paragraph that refers to a symbol we picked out above. + # Some fgrep's have limits on the number of lines that can be in the + # pattern on the command line, so use a temporary file containing the + # pattern. + (fgrep_tmp=${TMPDIR-/tmp}/autoh$$ + trap "rm -f $fgrep_tmp; exit 1" 1 2 15 + cat > $fgrep_tmp </dev/null`" = att ; then echo pyramid-pyramid-sysv3 @@ -78,9 +82,12 @@ fi exit 0 ;; - sun4*:SunOS:5.*:*) + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*: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/[^.]*//'` + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) @@ -102,13 +109,28 @@ echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-atari-openbsd${UNAME_RELEASE} + exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-sun-openbsd${UNAME_RELEASE} + exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-apple-openbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} @@ -117,8 +139,25 @@ echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; - mips:*:4*:UMIPS) - echo mips-mips-riscos4sysv - exit 0 ;; - mips:*:5*:RISCos) + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; @@ -138,5 +177,5 @@ # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88100 ] ; then + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then @@ -164,8 +203,8 @@ 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. + ????????: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:*:*) + i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; @@ -212,5 +251,5 @@ exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -230,5 +269,5 @@ 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[679] ) HP_ARCH=hppa1.1 ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; 9000/8?? ) HP_ARCH=hppa1.0 ;; esac @@ -278,4 +317,11 @@ echo hppa1.0-hp-osf exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites @@ -305,15 +351,28 @@ echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; - CRAY*C90:*:*:*) - echo c90-cray-unicos${UNAME_RELEASE} + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; - i[34]86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + hp3[0-9][05]:OpenBSD:*:*) + echo m68k-hp-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) @@ -323,6 +382,9 @@ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; i*:CYGWIN*:*) - echo i386-unknown-cygwin32 + echo i386-pc-cygwin32 exit 0 ;; p*:CYGWIN*:*) @@ -339,21 +401,25 @@ # first see if it will tell us. ld_help_string=`ld --help 2>&1` - if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i[345]86"; then - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86linux"; then - echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i[345]86coff"; then - echo "${UNAME_MACHINE}-unknown-linuxcoff" ; exit 0 + if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then + echo "${UNAME_MACHINE}-pc-linux-gnu" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then + echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then + echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 + echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then - echo "${UNAME_MACHINE}-unknown-linuxaout" ; exit 0 + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 + elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then + echo "powerpc-unknown-linux-gnu" ; exit 0 elif test "${UNAME_MACHINE}" = "alpha" ; then - echo alpha-unknown-linux ; exit 0 + echo alpha-unknown-linux-gnu ; exit 0 + elif test "${UNAME_MACHINE}" = "sparc" ; then + echo sparc-unknown-linux-gnu ; exit 0 else - # Either a pre-BFD a.out linker (linuxoldld) or one that does not give us - # useful --help. Gcc wants to distinguish between linuxoldld and linuxaout. + # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us + # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. test ! -d /usr/lib/ldscripts/. \ - && echo "${UNAME_MACHINE}-unknown-linuxoldld" && exit 0 + && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 # Determine whether the default compiler is a.out or elf cat >dummy.c </dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; - i[34]86:*:3.2:*) + i?86:*:3.2:*) 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/.*= //')` @@ -394,11 +460,11 @@ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else - echo ${UNAME_MACHINE}-unknown-sysv32 + echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; Intel:Mach:3*:*) - echo i386-unknown-mach3 + echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) @@ -416,26 +482,34 @@ echo m68010-convergent-sysv exit 0 ;; - M680[234]0:*:R3V[567]*:*) + m68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0) - uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3 && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - uname -p 2>/dev/null | grep 86 >/dev/null \ + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m680[234]0:LynxOS:2.[23]*:*) - echo m68k-lynx-lynxos${UNAME_RELEASE} + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i[34]86:LynxOS:2.[23]*:*) - echo i386-lynx-lynxos${UNAME_RELEASE} + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - TSUNAMI:LynxOS:2.[23]*:*) - echo sparc-lynx-lynxos${UNAME_RELEASE} + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.[23]*:*) - echo rs6000-lynx-lynxos${UNAME_RELEASE} + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:SINIX-*:*:*) @@ -450,8 +524,17 @@ fi exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; - R3000:*System_V*:*:*) + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} @@ -503,5 +586,5 @@ int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%s\n", __ARCHITECTURE__, version==2 ? "2" : "3"); + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -520,5 +603,5 @@ #if defined (__386BSD__) - printf ("i386-unknown-bsd\n"); exit (0); + printf ("i386-pc-bsd\n"); exit (0); #endif diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/config.sub autoconf-2.11/config.sub --- autoconf-2.10/config.sub Thu Jun 22 22:59:56 1995 +++ autoconf-2.11/config.sub Mon Nov 11 19:15:20 1996 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1991, 92, 93, 94, 95, 1996 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. +# can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify @@ -42,4 +42,6 @@ # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. @@ -63,9 +65,19 @@ esac -# Separate what the user gave into CPU-COMPANY and OS (if any). -basic_machine=`echo $1 | sed 's/-[^-]*$//'` -if [ $basic_machine != $1 ] -then os=`echo $1 | sed 's/.*-/-/'` -else os=; fi +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac ### Let's recognize common machines as not being operating systems so @@ -82,5 +94,6 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) os= basic_machine=$1 @@ -89,23 +102,27 @@ os=-hiuxwe2 ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) @@ -113,5 +130,5 @@ ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) @@ -124,4 +141,7 @@ os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; + -psos*) + os=-psos + ;; esac @@ -130,13 +150,19 @@ # 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 \ + tahoe | 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 | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | we32k | ns16k | clipper | i370 | sh \ + | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ | pdp11 | mips64el | mips64orion | mips64orionel \ - | sparc) + | sparc | sparclet | sparclite | sparc64) basic_machine=$basic_machine-unknown ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[3456]86) + basic_machine=$basic_machine-pc + ;; # Object if more than one company name word. *-*-*) @@ -145,9 +171,9 @@ ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ + vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ @@ -191,4 +217,8 @@ os=-sysv ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; balance) basic_machine=ns32k-sequent @@ -223,4 +253,8 @@ os=-unicos ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; crds | unos) basic_machine=m68k-crds @@ -304,4 +338,7 @@ basic_machine=hppa1.0-hp ;; + hppa-next) + os=-nextstep3 + ;; i370-ibm* | ibm*) basic_machine=i370-ibm @@ -309,18 +346,18 @@ ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[345]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[3456]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[345]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[3456]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[345]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[3456]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[345]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[3456]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; @@ -420,12 +457,16 @@ basic_machine=ns32k-pc532 ;; - pentium | p5 | p6) - # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium + pentium | p5) 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 + pentiumpro | p6) + basic_machine=i686-intel + ;; + pentium-* | p5-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + pentiumpro-* | p6-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; k5) # We don't have specific support for AMD's K5 yet, so just call it a Pentium @@ -616,4 +657,6 @@ then case $os in + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) @@ -627,5 +670,5 @@ ;; -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. @@ -634,15 +677,20 @@ # -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]* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ + | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* ) + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -linux-gnu*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` @@ -669,4 +717,7 @@ os=-sysv ;; + -ns2 ) + os=-nextstep2 + ;; # Preserve the version number of sinix5. -sinix5.*) @@ -776,4 +827,7 @@ os=-luna ;; + *-next ) + os=-nextstep + ;; *-sequent) os=-ptx @@ -827,7 +881,4 @@ vendor=sun ;; - -lynxos*) - vendor=lynx - ;; -aix*) vendor=ibm @@ -857,6 +908,9 @@ vendor=sequent ;; - -vxworks*) + -vxsim* | -vxworks*) vendor=wrs + ;; + -aux*) + vendor=apple ;; esac diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/ifnames.sh autoconf-2.11/ifnames.sh --- autoconf-2.10/ifnames.sh Thu Mar 23 23:13:12 1995 +++ autoconf-2.11/ifnames.sh Sun Jul 14 12:37:25 1996 @@ -15,5 +15,6 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. # Reads from stdin if no files are given. diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/install-sh autoconf-2.11/install-sh --- autoconf-2.10/install-sh Fri Jan 5 17:38:32 1996 +++ autoconf-2.11/install-sh Sun Jul 14 12:37:27 1996 @@ -2,5 +2,17 @@ # # install - install a program, script, or datafile -# This comes from X11R5. +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/install.texi autoconf-2.11/install.texi --- autoconf-2.10/install.texi Tue Jun 27 15:16:06 1995 +++ autoconf-2.11/install.texi Mon Nov 11 19:15:23 1996 @@ -194,4 +194,6 @@ @itemx -q Do not print messages saying which checks are being made. +To suppress all normal output, redirect it to @file{/dev/null} +(any error messages will still be shown). @item --srcdir=@var{dir} diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/make-stds.texi autoconf-2.11/make-stds.texi --- autoconf-2.10/make-stds.texi Tue May 7 13:16:47 1996 +++ autoconf-2.11/make-stds.texi Mon Nov 11 19:15:24 1996 @@ -29,4 +29,6 @@ * Directory Variables:: Variables for Installation Directories * Standard Targets:: Standard Targets for Users +* Install Command Categories:: Three categories of commands in the `install' + rule: normal, pre-install and post-install. @end menu @@ -66,7 +68,8 @@ path is used. -The distinction between @file{./} and @file{$(srcdir)/} is important -when using the @samp{--srcdir} option to @file{configure}. A rule of -the form: +The distinction between @file{./} (the @dfn{build directory}) and +@file{$(srcdir)/} (the @dfn{source directory}) is important because +users can build in a separate directory using the @samp{--srcdir} option +to @file{configure}. A rule of the form: @smallexample @@ -76,7 +79,6 @@ @noindent -will fail when the current directory is not the source directory, -because @file{foo.man} and @file{sedscript} are not in the current -directory. +will fail when the build directory is not the source directory, because +@file{foo.man} and @file{sedscript} are in the the source directory. When using GNU @code{make}, relying on @samp{VPATH} to find the source @@ -110,4 +112,16 @@ @end smallexample +GNU distributions usually contain some files which are not source +files---for example, Info files, and the output from Autoconf, Automake, +Bison or Flex. Since these files normally appear in the source +directory, they should always appear in the source directory, not in the +build directory. So Makefile rules to update them should put the +updated files in the source directory. + +However, if a file does not appear in the distribution, then the +Makefile should not put it in the source directory, because building a +program in ordinary circumstances should not modify the source directory +in any way. + Try to make the build and installation targets, at least (and all their subtargets) work correctly with a parallel @code{make}. @@ -123,9 +137,15 @@ installation should not use any utilities directly except these: +@c dd find +@c gunzip gzip md5sum +@c mkfifo mknod tee uname + @example -cat cmp cp echo egrep expr false grep -ln mkdir mv pwd rm rmdir sed test touch true +cat cmp cp diff echo egrep expr false grep install-info +ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true @end example +The compression program @code{gzip} can be used in the @code{dist} rule. + Stick to the generally supported options for these programs. For example, don't use @samp{mkdir -p}, convenient as it may be, because @@ -141,24 +161,31 @@ @example -ar bison cc flex install ld lex +ar bison cc flex install ld ldconfig lex make makeinfo ranlib texi2dvi yacc @end example -Use the following @code{make} variables: +Use the following @code{make} variables to run those programs: @example -$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX) +$(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) @end example -When you use @code{ranlib}, you should make sure nothing bad happens if -the system does not have @code{ranlib}. Arrange to ignore an error -from that command, and print a message before the command to tell the -user that failure of the @code{ranlib} command does not mean a problem. -(The Autoconf @samp{AC_PROG_RANLIB} macro can help with this.) +When you use @code{ranlib} or @code{ldconfig}, you should make sure +nothing bad happens if the system does not have the program in question. +Arrange to ignore an error from that command, and print a message before +the command to tell the user that failure of this command does not mean +a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with +this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. +Additional utilities that can be used via Make variables are: + +@example +chgrp chmod chown mknod +@end example + It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities @@ -367,4 +394,18 @@ (If you are using Autoconf, write it as @samp{@@infodir@@}.) +@item lispdir +The directory for installing any Emacs Lisp files in this package. By +default, it should be @file{/usr/local/share/emacs/site-lisp}, but it +should be written as @file{$(prefix)/share/emacs/site-lisp}. + +If you are using Autoconf, write the default as @samp{@@lispdir@@}. +In order to make @samp{@@lispdir@@} work, you need the following lines +in your @file{configure.in} file: + +@example +lispdir='$@{datadir@}/emacs/site-lisp' +AC_SUBST(lispdir) +@end example + @item includedir @c rewritten to avoid overfull hbox --roland @@ -528,4 +569,5 @@ @smallexample $(infodir)/foo.info: foo.info + $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ @@ -544,15 +586,22 @@ @end smallexample +When writing the @code{install} target, you must classify all the +commands into three categories: normal ones, @dfn{pre-installation} +commands and @dfn{post-installation} commands. @xref{Install Command +Categories}. + @item uninstall -Delete all the installed files that the @samp{install} target would -create (but not the noninstalled files such as @samp{make all} would -create). +Delete all the installed files---the copies that the @samp{install} +target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. +The uninstallation commands are divided into three categories, just like +the installation commands. @xref{Install Command Categories}. + @item install-strip Like @code{install}, but strip the executable files while installing -them. The definition of this target can be very simple: +them. In many cases, the definition of this target can be very simple: @smallexample @@ -639,4 +688,10 @@ distribution. +Normally a GNU distribution comes with Info files, and that means the +Info files are present in the source directory. Therefore, the Make +rule for an info file should update it in the source directory. When +users build the package, ordinarily Make will not update the Info files +because they will already be up to date. + @item dvi Generate DVI files for all Texinfo documentation. @@ -721,2 +776,118 @@ It should do nothing but create installation directories. @end table + +@node Install Command Categories +@section Install Command Categories + +@cindex pre-installation commands +@cindex post-installation commands +When writing the @code{install} target, you must classify all the +commands into three categories: normal ones, @dfn{pre-installation} +commands and @dfn{post-installation} commands. + +Normal commands move files into their proper places, and set their +modes. They may not alter any files except the ones that come entirely +from the package they belong to. + +Pre-installation and post-installation commands may alter other files; +in particular, they can edit global configuration files or data bases. + +Pre-installation commands are typically executed before the normal +commands, and post-installation commands are typically run after the +normal commands. + +The most common use for a post-installation command is to run +@code{install-info}. This cannot be done with a normal command, since +it alters a file (the Info directory) which does not come entirely and +solely from the package being installed. It is a post-installation +command because it needs to be done after the normal command which +installs the package's Info files. + +Most programs don't need any pre-installation commands, but we have the +feature just in case it is needed. + +To classify the commands in the @code{install} rule into these three +categories, insert @dfn{category lines} among them. A category line +specifies the category for the commands that follow. + +A category line consists of a tab and a reference to a special Make +variable, plus an optional comment at the end. There are three +variables you can use, one for each category; the variable name +specifies the category. Category lines are no-ops in ordinary execution +because these three Make variables are normally undefined (and you +@emph{should not} define them in the makefile). + +Here are the three possible category lines, each with a comment that +explains what it means: + +@smallexample + $(PRE_INSTALL) # @r{Pre-install commands follow.} + $(POST_INSTALL) # @r{Post-install commands follow.} + $(NORMAL_INSTALL) # @r{Normal commands follow.} +@end smallexample + +If you don't use a category line at the beginning of the @code{install} +rule, all the commands are classified as normal until the first category +line. If you don't use any category lines, all the commands are +classified as normal. + +These are the category lines for @code{uninstall}: + +@smallexample + $(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.} + $(POST_UNINSTALL) # @r{Post-uninstall commands follow.} + $(NORMAL_UNINSTALL) # @r{Normal commands follow.} +@end smallexample + +Typically, a pre-uninstall command would be used for deleting entries +from the Info directory. + +If the @code{install} or @code{uninstall} target has any dependencies +which act as subroutines of installation, then you should start +@emph{each} dependency's commands with a category line, and start the +main target's commands with a category line also. This way, you can +ensure that each command is placed in the right category regardless of +which of the dependencies actually run. + +Pre-installation and post-installation commands should not run any +programs except for these: + +@example +[ basename bash cat chgrp chmod chown cmp cp dd diff echo +egrep expand expr false fgrep find getopt grep gunzip gzip +hostname install install-info kill ldconfig ln ls md5sum +mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee +test touch true uname xargs yes +@end example + +@cindex binary packages +The reason for distinguishing the commands in this way is for the sake +of making binary packages. Typically a binary package contains all the +executables and other files that need to be installed, and has its own +method of installing them---so it does not need to run the normal +installation commands. But installing the binary package does need to +execute the pre-installation and post-installation commands. + +Programs to build binary packages work by extracting the +pre-installation and post-installation commands. Here is one way of +extracting the pre-installation commands: + +@smallexample +make -n install -o all \ + PRE_INSTALL=pre-install \ + POST_INSTALL=post-install \ + NORMAL_INSTALL=normal-install \ + | gawk -f pre-install.awk +@end smallexample + +@noindent +where the file @file{pre-install.awk} could contain this: + +@smallexample +$0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@} +on @{print $0@} +$0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@} +@end smallexample + +The resulting file of pre-installation commands is executed as a shell +script as part of installing the binary package. diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/standards.texi autoconf-2.11/standards.texi --- autoconf-2.10/standards.texi Wed Feb 28 04:21:15 1996 +++ autoconf-2.11/standards.texi Thu Oct 10 22:32:48 1996 @@ -4,5 +4,5 @@ @settitle GNU Coding Standards @c UPDATE THIS DATE WHENEVER YOU MAKE CHANGES! -@set lastupdate 27 February 1996 +@set lastupdate 9 September 1996 @c %**end of header @@ -360,4 +360,5 @@ * Errors:: Formatting error messages * User Interfaces:: Standards for command line interfaces +* Option Table:: Table of long options. * Memory Usage:: When and how to care about memory needs @end menu @@ -555,24 +556,115 @@ spelled precisely @samp{--verbose}. To achieve this uniformity, look at the table of common long-option names when you choose the option names -for your program. The table appears below. +for your program (@pxref{Option Table}). -If you use names not already in the table, please send -@samp{gnu@@prep.ai.mit.edu} a list of them, with their meanings, so we -can update the table. - -It is usually a good idea for file names given as ordinary arguments -to be input files only; any output files would be specified using -options (preferably @samp{-o}). Even if you allow an output file name -as an ordinary argument for compatibility, try to provide a suitable -option as well. This will lead to more consistency among GNU -utilities, so that there are fewer idiosyncracies for users to -remember. - -Programs should support an option @samp{--version} which prints the -program's version number on standard output and exits successfully, and -an option @samp{--help} which prints option usage information on -standard output and exits successfully. These options should inhibit -the normal function of the command; they should do nothing except print -the requested information. +It is usually a good idea for file names given as ordinary arguments to +be input files only; any output files would be specified using options +(preferably @samp{-o} or @samp{--output}). Even if you allow an output +file name as an ordinary argument for compatibility, try to provide an +option as another way to specify it. This will lead to more consistency +among GNU utilities, and fewer idiosyncracies for users to remember. + +All programs should support two standard options: @samp{--version} +and @samp{--help}. + +@table @code +@item --version +This option should direct the program to information about its name, +version, origin and legal status, all on standard output, and then exit +successfully. Other options and arguments should be ignored once this +is seen, and the program should not perform its normal function. + +The first line is meant to be easy for a program to parse; the version +number proper starts after the last space. In addition, it contains +the canonical name for this program, in this format: + +@example +GNU Emacs 19.30 +@end example + +@noindent +The program's name should be a constant string; @emph{don't} compute it +from @code{argv[0]}. The idea is to state the standard or canonical +name for the program, not its file name. There are other ways to find +out the precise file name where a command is found in @code{PATH}. + +If the program is a subsidiary part of a larger package, mention the +package name in parentheses, like this: + +@example +emacsserver (GNU Emacs) 19.30 +@end example + +@noindent +If the package has a version number which is different from this +program's version number, you can mention the package version number +just before the close-parenthesis. + +If you @strong{need} to mention the version numbers of libraries which +are distributed separately from the package which contains this program, +you can do so by printing an additional line of version info for each +library you want to mention. Use the same format for these lines as for +the first line. + +Please don't mention all the libraries that the program uses ``just for +completeness''---that would produce a lot of unhelpful clutter. Please +mention library version numbers only if you find in practice that they +are very important to you in debugging. + +The following line, after the version number line or lines, should be a +copyright notice. If more than one copyright notice is called for, put +each on a separate line. + +Next should follow a brief statement that the program is free software, +and that users are free to copy and change it on certain conditions. If +the program is covered by the GNU GPL, say so here. Also mention that +there is no warranty, to the extent permitted by law. + +It is ok to finish the output with a list of the major authors of the +program, as a way of giving credit. + +Here's an example of output that follows these rules: + +@smallexample +GNU Emacs 19.34.5 +Copyright (C) 1996 Free Software Foundation, Inc. +GNU Emacs comes with NO WARRANTY, to the extent permitted by law. +You may redistribute copies of GNU Emacs +under the terms of the GNU General Public License. +For more information about these matters, see the files named COPYING. +@end smallexample + +You should adapt this to your program, of course, filling in the proper +year, copyright holder, name of program, and the references to +distribution terms, and changing the rest of the wording as necessary. + +This copyright notice only needs to mention the most recent year in +which changes were made---there's no need to list the years for previous +versions' changes. You don't have to mention the name of the program in +these notices, if that is inconvenient, since it appeared in the first +line. + +@item --help +This option should output brief documentation for how to invoke the +program, on standard output, then exit successfully. Other options and +arguments should be ignored once this is seen, and the program should +not perform its normal function. + +Near the end of the @samp{--help} option's output there should be a line +that says where to mail bug reports. It should have this format: + +@example +Report bugs to @var{mailing-address}. +@end example +@end table + +@node Option Table +@section Table of Long Options + +Here is a table of long options used by GNU programs. It is surely +incomplete, but we aim to list all the options that a new program might +want to be compatible with. If you use names not already in the table, +please send @samp{gnu@@prep.ai.mit.edu} a list of them, with their +meanings, so we can update the table. @c Please leave newlines between items in this table; it's much easier @@ -582,8 +674,5 @@ @c period. --friedman -Here is the table of long options used by GNU programs. - @table @samp - @item after-date @samp{-N} in @code{tar}. @@ -1196,4 +1285,7 @@ Used in @code{makeinfo}. +@item no-wait +Used in @code{emacsclient}. + @item no-warn Used in various programs to inhibit warnings. @@ -1680,4 +1772,5 @@ * CPU Portability:: Supporting the range of CPU types * System Functions:: Portability and ``standard'' library functions +* Internationalization:: Techniques for internationalization @end menu @@ -2003,5 +2096,5 @@ Don't make the program ugly to placate @code{lint}. Please don't insert any casts to @code{void}. Zero without a cast is perfectly fine as a null -pointer constant. +pointer constant, except when calling a varargs function. @node Names @@ -2097,5 +2190,5 @@ When calling functions, you need not worry about the difference between -pointers of various types, or between pointers an integers. On most +pointers of various types, or between pointers and integers. On most machines, there's no difference anyway. As for the few machines where there is a difference, all of them support @sc{ansi} C, so you can use @@ -2120,5 +2213,6 @@ @noindent In practice, this works on all machines, and it is much simpler than any -``correct'' alternative. +``correct'' alternative. Be sure @emph{not} to use a prototype +for such functions. However, avoid casting pointers to integers unless you really need to. @@ -2245,4 +2339,102 @@ One way to get them properly defined is to use Autoconf. +@node Internationalization +@section Internationalization + +GNU has a library called GNU gettext that makes it easy to translate the +messages in a program into various languages. You should use this +library in every program. Use English for the messages as they appear +in the program, and let gettext provide the way to translate them into +other languages. + +Using GNU gettext involves putting a call to the @code{gettext} macro +around each string that might need translation---like this: + +@example +printf (gettext ("Processing file `%s'...")); +@end example + +@noindent +This permits GNU gettext to replace the string @code{"Processing file +`%s'..."} with a translated version. + +Once a program uses gettext, please make a point of writing calls to +@code{gettext} when you add new strings that call for translation. + +Using GNU gettext in a package involves specifying a @dfn{text domain +name} for the package. The text domain name is used to separate the +translations for this package from the translations for other packages. +Normally, the text domain name should be the same as the name of the +package---for example, @samp{fileutils} for the GNU file utilities. + +To enable gettext to work well, avoid writing code that makes +assumptions about the structure of words or sentences. When you want +the precise text of a sentence to vary depending on the data, use two or +more alternative string constants each containing a complete sentences, +rather than inserting conditionalized words or phrases into a single +sentence framework. + +Here is an example of what not to do: + +@example +printf ("%d file%s processed", nfiles, + nfiles != 1 ? "s" : ""); +@end example + +@noindent +The problem with that example is that it assumes that plurals are made +by adding `s'. If you apply gettext to the format string, like this, + +@example +printf (gettext ("%d file%s processed"), nfiles, + nfiles != 1 ? "s" : ""); +@end example + +@noindent +the message can use different words, but it will still be forced to use +`s' for the plural. Here is a better way: + +@example +printf ((nfiles != 1 ? "%d files processed" + : "%d file processed"), + nfiles); +@end example + +@noindent +This way, you can apply gettext to each of the two strings +independently: + +@example +printf ((nfiles != 1 ? gettext ("%d files processed") + : gettext ("%d file processed")), + nfiles); +@end example + +@noindent +This can any method of forming the plural of the word for ``file'', and +also handles languages that require agreement in the word for +``processed''. + +A similar problem appears at the level of sentence structure with this +code: + +@example +printf ("# Implicit rule search has%s been done.\n", + f->tried_implicit ? "" : " not"); +@end example + +@noindent +Adding @code{gettext} calls to this code cannot give correct results for +all languages, because negation in some languages requires adding words +at more than one place in the sentence. By contrast, adding +@code{gettext} calls does the job straightfowardly if the code starts +out like this: + +@example +printf (f->tried_implicit + ? "# Implicit rule search has been done.\n", + : "# Implicit rule search has not been done.\n"); +@end example + @node Documentation @chapter Documenting Programs @@ -2297,4 +2489,8 @@ ``path'' only for search paths, which are lists of file names. +Please do not use the term ``illegal'' to refer to erroneous input to a +computer program. Use ``invalid'' instead, and reserve the term +``illegal'' for violations of law. + @node Manual Structure Details @section Manual Structure Details @@ -2342,26 +2538,58 @@ @section Change Logs -Keep a change log for each directory, describing the changes made to -source files in that directory. The purpose of this is so that people -investigating bugs in the future will know about the changes that -might have introduced the bug. Often a new bug can be found by -looking at what was recently changed. More importantly, change logs -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-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 -don't put blank lines between them. Then you can omit the file name -and the asterisk when successive entries are in the same file. +Keep a change log to describe all the changes made to program source +files. The purpose of this is so that people investigating bugs in the +future will know about the changes that might have introduced the bug. +Often a new bug can be found by looking at what was recently changed. +More importantly, change logs can help you eliminate conceptual +inconsistencies between different parts of a program, by giving you a +history of how the conflicting concepts arose and who they came from. -Here are some examples: +@menu +* Change Log Concepts:: +* Style of Change Logs:: +* Simple Changes:: +* Conditional Changes:: +@end menu + +@node Change Log Concepts +@subsection Change Log Concepts + +You can think of the change log as a conceptual ``undo list'' which +explains how earlier versions were different from the current version. +People can see the current version; they don't need the change log +to tell them what is in it. What they want from a change log is a +clear explanation of how the earlier version differed. + +The change log file is normally called @file{ChangeLog} and covers an +entire directory. Each directory can have its own change log, or a +directory can use the change log of its parent directory--it's up to +you. + +Another alternative is to record change log information with a version +control system such as RCS or CVS. This can be converted automatically +to a @file{ChangeLog} file. + +There's no need to describe the full purpose of the changes or how they +work together. If you think that a change calls for explanation, you're +probably right. Please do explain it---but please put the explanation +in comments in the code, where people will see it whenever they see the +code. For example, ``New function'' is enough for the change log when +you add a function, because there should be a comment before the +function definition to explain what it does. + +However, sometimes it is useful to write one line to describe the +overall purpose of a batch of changes. + +The easiest way to add an entry to @file{ChangeLog} is with the Emacs +command @kbd{M-x add-change-log-entry}. 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. + +@node Style of Change Logs +@subsection Style of Change Logs + +Here are some examples of change log entries: @example @@ -2382,39 +2610,85 @@ It's important to name the changed function or variable in full. Don't abbreviate function or variable names, and don't combine them. -Subsequent maintainers will often -search for a function name to find all the change log entries that -pertain to it; if you abbreviate the name, they won't find it when they -search. For example, some people are tempted to abbreviate groups of -function names by writing @samp{* register.el -(@{insert,jump-to@}-register)}; this is not a good idea, since searching -for @code{jump-to-register} or @code{insert-register} would not find the -entry. +Subsequent maintainers will often search for a function name to find all +the change log entries that pertain to it; if you abbreviate the name, +they won't find it when they search. + +For example, some people are tempted to abbreviate groups of function +names by writing @samp{* register.el (@{insert,jump-to@}-register)}; +this is not a good idea, since searching for @code{jump-to-register} or +@code{insert-register} would not find that entry. + +Separate unrelated change log entries with blank lines. When two +entries represent parts of the same change, so that they work together, +then don't put blank lines between them. Then you can omit the file +name and the asterisk when successive entries are in the same file. + +@node Simple Changes +@subsection Simple Changes + +Certain simple kinds of changes don't need much detail in the change +log. + +When you change the calling sequence of a function in a simple fashion, +and you change all the callers of the function, there is no need to make +individual entries for all the callers that you changed. Just write in +the entry for the function being called, ``All callers changed.'' -There's no need to describe the full purpose of the changes or how they -work together. It is better to put such explanations in comments in the -code. That's why just ``New function'' is enough; there is a comment -with the function in the source to explain what it does. +@example +* keyboard.c (Fcommand_execute): New arg SPECIAL. +All callers changed. +@end example -However, sometimes it is useful to write one line to describe the -overall purpose of a large batch of changes. +When you change just comments or doc strings, it is enough to write an +entry for the file, without mentioning the functions. Just ``Doc +fixes'' is enough for the change log. -You can think of the change log as a conceptual ``undo list'' which -explains how earlier versions were different from the current version. -People can see the current version; they don't need the change log -to tell them what is in it. What they want from a change log is a -clear explanation of how the earlier version differed. +There's no need to make change log entries for documentation files. +This is because documentation is not susceptible to bugs that are hard +to fix. Documentation does not consist of parts that must interact in a +precisely engineered fashion. To correct an error, you need not know +the history of the erroneous passage; it is enough to compare what the +documentation says with the way the program actually works. -When you change the calling sequence of a function in a simple -fashion, and you change all the callers of the function, there is no -need to make individual entries for all the callers. Just write in -the entry for the function being called, ``All callers changed.'' +@node Conditional Changes +@subsection Conditional Changes -When you change just comments or doc strings, it is enough to write an -entry for the file, without mentioning the functions. Write just, -``Doc fix.'' There's no need to keep a change log for documentation -files. This is because documentation is not susceptible to bugs that -are hard to fix. Documentation does not consist of parts that must -interact in a precisely engineered fashion; to correct an error, you -need not know the history of the erroneous passage. +C programs often contain compile-time @code{#if} conditionals. Many +changes are conditional; sometimes you add a new definition which is +entirely contained in a conditional. It is very useful to indicate in +the change log the conditions for which the change applies. + +Our convention for indicating conditional changes is to use square +brackets around the name of the condition. + +Here is a simple example, describing a change which is conditional but +does not have a function or entity name associated with it: + +@example +* xterm.c [SOLARIS2]: Include string.h. +@end example + +Here is an entry describing a new definition which is entirely +conditional. This new definition for the macro @code{FRAME_WINDOW_P} is +used only when @code{HAVE_X_WINDOWS} is defined: + +@example +* frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. +@end example + +Here is an entry for a change within the function @code{init_display}, +whose definition as a whole is unconditional, but the changes themselves +are contained in a @samp{#ifdef HAVE_LIBNCURSES} conditional: + +@example +* dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. +@end example + +Here is an entry for a change that takes affect only when +a certain macro is @emph{not} defined: + +@example +(gethostname) [!HAVE_SOCKETS]: Replace with winsock version. +@end example @node Man Pages diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/testsuite/Makefile.in autoconf-2.11/testsuite/Makefile.in --- autoconf-2.10/testsuite/Makefile.in Tue Feb 7 17:41:14 1995 +++ autoconf-2.11/testsuite/Makefile.in Wed Nov 13 12:26:53 1996 @@ -41,6 +41,11 @@ dvi: -check: site.exp all - @echo This only works if you have the DejaGNU runtest program installed... +dejacheck: + @if $(SHELL) -c 'runtest --version' > /dev/null 2>&1; then :; else \ + echo ERROR: the autoconf tests require the DejaGNU runtest program; \ + exit 1; \ + fi + +check: dejacheck site.exp all $(RUNTEST) $(RUNTESTFLAGS) --tool autoconf AUTOCONF=${AUTOCONF} \ AUTOCONFFLAGS="${AUTOCONFFLAGS}" --srcdir $(srcdir) diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/testsuite/autoconf.g/sizeof.exp autoconf-2.11/testsuite/autoconf.g/sizeof.exp --- autoconf-2.10/testsuite/autoconf.g/sizeof.exp Wed Dec 31 19:00:00 1969 +++ autoconf-2.11/testsuite/autoconf.g/sizeof.exp Sat Nov 9 17:21:23 1996 @@ -0,0 +1 @@ +autoconf_test AC_SIZEOF_TYPE "AC_SIZEOF_TYPE(long *)" diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/testsuite/autoconf.g/sizeof_type.exp autoconf-2.11/testsuite/autoconf.g/sizeof_type.exp --- autoconf-2.10/testsuite/autoconf.g/sizeof_type.exp Thu Sep 8 16:45:21 1994 +++ autoconf-2.11/testsuite/autoconf.g/sizeof_type.exp Wed Dec 31 19:00:00 1969 @@ -1 +0,0 @@ -autoconf_test AC_SIZEOF_TYPE "AC_SIZEOF_TYPE(long *)" diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/testsuite/config/unix.exp autoconf-2.11/testsuite/config/unix.exp --- autoconf-2.10/testsuite/config/unix.exp Thu Jun 22 23:04:05 1995 +++ autoconf-2.11/testsuite/config/unix.exp Tue Nov 12 02:19:33 1996 @@ -90,5 +90,5 @@ # Capture only stderr in exec_output, not "creating Makefile" etc. - catch "exec $args --cache=/dev/null >/dev/null" exec_output + catch "exec ./$args --cache=/dev/null >/dev/null" exec_output if $verbose>1 then { send_user "Executed $args --cache=/dev/null\n" diff -r --unif=2 --entire --exclude=*.info* --exclude=INSTALL --exclude=configure autoconf-2.10/texinfo.tex autoconf-2.11/texinfo.tex --- autoconf-2.10/texinfo.tex Thu Apr 18 19:33:20 1996 +++ autoconf-2.11/texinfo.tex Mon Nov 18 10:28:45 1996 @@ -1,3 +1,4 @@ -%% TeX macros to handle texinfo files +%% TeX macros to handle Texinfo files. +%% $Id: texinfo.tex,v 2.192 1996/11/17 00:12:46 karl Exp $ % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, @@ -36,5 +37,5 @@ % This automatically updates the version number based on RCS. \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}} -\deftexinfoversion$Revision: 2.172 $ +\deftexinfoversion$Revision: 2.192 $ \message{Loading texinfo package [Version \texinfoversion]:} @@ -47,18 +48,18 @@ % Save some parts of plain tex whose names we will redefine. -\let\ptextilde=\~ -\let\ptexlbrace=\{ -\let\ptexrbrace=\} -\let\ptexdots=\dots -\let\ptexdot=\. -\let\ptexstar=\* -\let\ptexend=\end -\let\ptexbullet=\bullet \let\ptexb=\b +\let\ptexbullet=\bullet \let\ptexc=\c +\let\ptexcomma=\, +\let\ptexdot=\. +\let\ptexdots=\dots +\let\ptexend=\end +\let\ptexequiv = \equiv \let\ptexi=\i +\let\ptexlbrace=\{ +\let\ptexrbrace=\} +\let\ptexstar=\* \let\ptext=\t -\let\ptexl=\l -\let\ptexL=\L +\let\ptextilde=\~ % Be sure we're in horizontal mode when doing a tie, since we make space @@ -75,4 +76,5 @@ \let\~ = \tie % And make it available as @~. + \message{Basics,} \chardef\other=12 @@ -104,8 +106,7 @@ % Margin to add to right of even pages, to left of odd pages. -\newdimen \bindingoffset \bindingoffset=0pt -\newdimen \normaloffset \normaloffset=\hoffset +\newdimen \bindingoffset +\newdimen \normaloffset \newdimen\pagewidth \newdimen\pageheight -\pagewidth=\hsize \pageheight=\vsize % Sometimes it is convenient to have everything in the transcript file @@ -128,5 +129,5 @@ \newdimen \topandbottommargin \newdimen \outerhsize \newdimen \outervsize -\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks +\cornerlong=1pc\cornerthick=.3pt % These set size of cropmarks \outerhsize=7in %\outervsize=9.5in @@ -137,14 +138,40 @@ %---------------------End change----------------------- +% Main output routine. +\chardef\PAGE = 255 +\output = {\onepageout{\pagecontents\PAGE}} + +\newbox\headlinebox \newbox\footlinebox + % \onepageout takes a vbox as an argument. Note that \pagecontents -% does insertions itself, but you have to call it yourself. -\chardef\PAGE=255 \output={\onepageout{\pagecontents\PAGE}} -\def\onepageout#1{\hoffset=\normaloffset -\ifodd\pageno \advance\hoffset by \bindingoffset -\else \advance\hoffset by -\bindingoffset\fi -{\escapechar=`\\\relax % makes sure backslash is used in output files. -\shipout\vbox{{\let\hsize=\pagewidth \makeheadline} \pagebody{#1}% -{\let\hsize=\pagewidth \makefootline}}}% -\advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi} +% does insertions, but you have to call it yourself. +\def\onepageout#1{% + \hoffset=\normaloffset + \ifodd\pageno \advance\hoffset by \bindingoffset + \else \advance\hoffset by -\bindingoffset\fi + % + % Do this outside of the \shipout so @code etc. will be expanded in + % the headline as they should be, not taken literally (outputting ''code). + \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% + \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% + % + {% + % Have to do this stuff outside the \shipout because we want it to + % take effect in \write's, yet the group defined by the \vbox ends + % before the \shipout runs. + % + \escapechar = `\\ % use backslash in output files. + \indexdummies % don't expand commands in the output. + \normalturnoffactive % \ in index entries must not stay \, e.g., if + % the page break happens to be in the middle of an example. + \shipout\vbox{% + \unvbox\headlinebox + \pagebody{#1}% + \unvbox\footlinebox + }% + }% + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi +} %%%% For @cropmarks command %%%% @@ -158,6 +185,6 @@ \def\croppageout#1{\hoffset=0pt % make sure this doesn't mess things up {\escapechar=`\\\relax % makes sure backslash is used in output files. - \shipout - \vbox to \outervsize{\hsize=\outerhsize + \shipout + \vbox to \outervsize{\hsize=\outerhsize \vbox{\line{\ewtop\hfill\ewtop}} \nointerlineskip @@ -167,10 +194,10 @@ \vskip \topandbottommargin \centerline{\ifodd\pageno\hskip\bindingoffset\fi - \vbox{ - {\let\hsize=\pagewidth \makeheadline} - \pagebody{#1} - {\let\hsize=\pagewidth \makefootline}} - \ifodd\pageno\else\hskip\bindingoffset\fi} - \vskip \topandbottommargin plus1fill minus1fill + \vbox{ + {\let\hsize=\pagewidth \makeheadline} + \pagebody{#1} + {\let\hsize=\pagewidth \makefootline}} + \ifodd\pageno\else\hskip\bindingoffset\fi} + \vskip \topandbottommargin plus1fill minus1fill \boxmaxdepth\cornerthick \line{\vbox{\moveleft\cornerthick\nsbot} @@ -179,5 +206,5 @@ \nointerlineskip \vbox{\line{\ewbot\hfill\ewbot}} - }} + }} \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi} @@ -367,9 +394,41 @@ % Used to generate quoted braces. - \def\mylbrace {{\tt \char '173}} \def\myrbrace {{\tt \char '175}} \let\{=\mylbrace \let\}=\myrbrace +\begingroup + % Definitions to produce actual \{ & \} command in an index. + \catcode`\{ = 12 \catcode`\} = 12 + \catcode`\[ = 1 \catcode`\] = 2 + \catcode`\@ = 0 \catcode`\\ = 12 + @gdef@lbracecmd[\{]% + @gdef@rbracecmd[\}]% +@endgroup + +% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent +% Others are defined by plain TeX: @` @' @" @^ @~ @= @v @H. +\let\, = \c +\let\dotaccent = \. +\def\ringaccent#1{{\accent23 #1}} +\let\tieaccent = \t +\let\ubaraccent = \b +\let\udotaccent = \d + +% Other special characters: @questiondown @exclamdown +% Plain TeX defines: @AA @AE @O @OE @L (and lowercase versions) @ss. +\def\questiondown{?`} +\def\exclamdown{!`} + +% Dotless i and dotless j, used for accents. +\def\imacro{i} +\def\jmacro{j} +\def\dotless#1{% + \def\temp{#1}% + \ifx\temp\imacro \ptexi + \else\ifx\temp\jmacro \j + \else \errmessage{@dotless can be used only with i or j}% + \fi\fi +} % @: forces normal size whitespace following. @@ -580,5 +639,5 @@ \def\sp{\parsearg\spxxx} -\def\spxxx #1{\par \vskip #1\baselineskip} +\def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... @@ -593,4 +652,7 @@ \let\c=\comment +% @paragraphindent is defined for the Info formatting commands only. +\let\paragraphindent=\comment + % Prevent errors for section commands. % Used in @ignore and in failing conditionals. @@ -627,4 +689,5 @@ % \def\ignoremorecommands{% + \let\defcodeindex = \relax \let\defcv = \relax \let\deffn = \relax @@ -667,5 +730,4 @@ \let\clear = \relax \let\item = \relax - \let\message = \relax } @@ -682,8 +744,13 @@ \def\direntry{\doignore{direntry}} +% Also ignore @macro ... @end macro. The user must run texi2dvi, +% which runs makeinfo to do macro expansion. Ignore @unmacro, too. +\def\macro{\doignore{macro}} +\let\unmacro = \comment + + % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. - -\def\dircategory{\comment} +\let\dircategory = \comment % Ignore text until a line `@end #1'. @@ -718,4 +785,5 @@ \immediate\write16{If you are running Unix TeX 3.0, kill this TeX process.} \immediate\write16{ Then upgrade your TeX installation if you can.} + \immediate\write16{ (See ftp://ftp.gnu.ai.mit.edu/pub/gnu/TeX.README.)} \immediate\write16{If you are stuck with version 3.0, run the} \immediate\write16{ script ``tex3patch'' from the Texinfo distribution} @@ -801,5 +869,7 @@ % losing inside @example, for instance. % -\def\set{\begingroup\catcode` =10 \parsearg\setxxx} +\def\set{\begingroup\catcode` =10 + \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. + \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% @@ -822,8 +892,14 @@ % @value{foo} gets the text saved in variable foo. % -\def\value#1{\expandafter - \ifx\csname SET#1\endcsname\relax - {\{No value for ``#1''\}} - \else \csname SET#1\endcsname \fi} +\def\value{\begingroup + \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. + \valuexxx} +\def\valuexxx#1{% + \expandafter\ifx\csname SET#1\endcsname\relax + {\{No value for ``#1''\}}% + \else + \csname SET#1\endcsname + \fi +\endgroup} % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined @@ -925,4 +1001,5 @@ \global\let\lastnode=\relax} +% @refill is a no-op. \let\refill=\relax @@ -939,14 +1016,11 @@ } +% @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} -\def\inforef #1{\inforefzzz #1,,,,**} -\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, - node \samp{\ignorespaces#1{}}} - -\def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} -\def\macroxxx#1#2 \end macro{% -\expandafter\gdef\macrotemp#1{#2}% -\endgroup} +% \def\macro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\macroxxx} +% \def\macroxxx#1#2 \end macro{% +% \expandafter\gdef\macrotemp#1{#2}% +% \endgroup} %\def\linemacro#1{\begingroup\ignoresections\catcode`\#=6\def\macrotemp{#1}\parsearg\linemacroxxx} @@ -960,4 +1034,5 @@ %\def\butfirst#1{} + \message{fonts,} @@ -989,5 +1064,5 @@ % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} -\def\rmbshape{bx} %where the normal face is bold +\def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} @@ -1029,5 +1104,5 @@ \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} -% Fonts for indices and small examples. +% Fonts for indices and small examples (9pt). % We actually use the slanted font rather than the italic, % because texinfo normally uses the slanted fonts for that. @@ -1046,5 +1121,5 @@ \font\indsy=cmsy9 -% Fonts for headings +% Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} @@ -1058,4 +1133,5 @@ \font\chapsy=cmsy10 scaled \magstep3 +% Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} @@ -1075,7 +1151,7 @@ % \setfont\ssecsf\sfshape{10}{\magstep1} -%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. -%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than -%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. +%\setfont\ssecrm\bfshape{10}{1315} % Note the use of cmb rather than cmbx. +%\setfont\ssecit\itshape{10}{1315} % Also, the size is a little larger than +%\setfont\ssecsl\slshape{10}{1315} % being scaled magstep1. %\setfont\ssectt\ttshape{10}{1315} %\setfont\ssecsf\sfshape{10}{1315} @@ -1083,4 +1159,5 @@ %\let\ssecbf=\ssecrm +% Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} @@ -1128,20 +1205,21 @@ \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl - \resetmathfonts} + \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl - \resetmathfonts} + \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl - \resetmathfonts} + \resetmathfonts \setleading{15pt}} +\let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\indexfonts{% \let\tenrm=\indrm \let\tenit=\indit \let\tensl=\indsl \let\tenbf=\indbf \let\tentt=\indtt \let\smallcaps=\indsc \let\tensf=\indsf \let\teni=\indi \let\tensy=\indsy \let\tenttsl=\indttsl - \resetmathfonts} + \resetmathfonts \setleading{12pt}} % Set up the default fonts, so we can use them for creating boxes. @@ -1187,9 +1265,19 @@ \let\ttfont=\t \def\samp #1{`\tclose{#1}'\null} -\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} +\setfont\smallrm\rmshape{8}{1000} +\font\smallsy=cmsy9 +\def\key#1{{\smallrm\textfont2=\smallsy \leavevmode\hbox{% + \raise0.4pt\hbox{$\langle$}\kern-.08em\vtop{% + \vbox{\hrule\kern-0.4pt + \hbox{\raise0.4pt\hbox{\vphantom{$\langle$}}#1}}% + \kern-0.4pt\hrule}% + \kern-.06em\raise0.4pt\hbox{$\rangle$}}}} +% The old definition, with no lozenge: +%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} \let\file=\samp \let\url=\samp % perhaps include a hypertex \special eventually +\def\email#1{$\langle${\tt #1}$\rangle$} % @code is a modification of @t, @@ -1223,9 +1311,10 @@ % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) -% and arrange explicitly to hyphenate an a dash. +% and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active +\catcode`\|=\active \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex} % The following is used by \doprintindex to insure that long function names @@ -1233,9 +1322,13 @@ % read from the file, as \entry parses the arguments long before \code is % ever called. -- mycroft -\global\def\indexbreaks{\catcode`\-=\active \let-\realdash \catcode`\_=\active \let_\realunder} +% _ is always active; and it shouldn't be \let = to an _ that is a +% subscript character anyway. Then, @cindex @samp{_} (for example) +% fails. --karl +\global\def\indexbreaks{% + \catcode`\-=\active \let-\realdash +} } \def\realdash{-} -\def\realunder{_} \def\codedash{-\discretionary{}{}{}} \def\codeunder{\normalunderscore\discretionary{}{}{}} @@ -1268,10 +1361,17 @@ \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} -\def\l#1{{\li #1}\null} % +% @l was never documented to mean ``switch to the Lisp font'', +% and it is not used as such in any manual I can find. We need it for +% Polish suppressed-l. --karl, 22sep96. +%\def\l#1{{\li #1}\null} -\def\r#1{{\rm #1}} % roman font +\def\r#1{{\rm #1}} % roman font % Use of \lowercase was suggested. -\def\sc#1{{\smallcaps#1}} % smallcaps font -\def\ii#1{{\it #1}} % italic font +\def\sc#1{{\smallcaps#1}} % smallcaps font +\def\ii#1{{\it #1}} % italic font + +% @pounds{} is a sterling sign. +\def\pounds{{\it\$}} + \message{page headings,} @@ -1288,5 +1388,5 @@ \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% - \endgroup\page\hbox{}\page} + \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts @@ -1305,7 +1405,7 @@ \def\title{\parsearg\titlezzz}% \def\titlezzz##1{\leftline{\titlefont{##1}} - % print a rule at the page bottom also. - \finishedtitlepagefalse - \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% + % print a rule at the page bottom also. + \finishedtitlepagefalse + \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue @@ -1325,5 +1425,5 @@ \def\page{% \iffinishedtitlepage\else - \finishtitlepage + \finishtitlepage \fi \oldpage @@ -1413,12 +1513,13 @@ }% unbind the catcode of @. -% @headings double turns headings on for double-sided printing. -% @headings single turns headings on for single-sided printing. -% @headings off turns them off. -% @headings on same as @headings double, retained for compatibility. -% @headings after turns on double-sided headings after this page. -% @headings doubleafter turns on double-sided headings after this page. +% @headings double turns headings on for double-sided printing. +% @headings single turns headings on for single-sided printing. +% @headings off turns them off. +% @headings on same as @headings double, retained for compatibility. +% @headings after turns on double-sided headings after this page. +% @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. -% By default, they are off. +% By default, they are off at the start of a document, +% and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} @@ -1434,5 +1535,4 @@ % edge of all pages. \def\HEADINGSdouble{ -%\pagealignmacro \global\pageno=1 \global\evenfootline={\hfil} @@ -1440,9 +1540,11 @@ \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage } +\let\contentsalignmacro = \chappager + % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ -%\pagealignmacro \global\pageno=1 \global\evenfootline={\hfil} @@ -1450,4 +1552,5 @@ \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} @@ -1460,4 +1563,5 @@ \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chapoddpage } @@ -1468,4 +1572,5 @@ \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} +\global\let\contentsalignmacro = \chappager } @@ -1491,4 +1596,5 @@ \def\settitlezzz #1{\gdef\thistitle{#1}} + \message{tables,} @@ -1813,4 +1919,5 @@ % columns as desired. + % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} @@ -1833,5 +1940,5 @@ % ie, @tab@tab@tab will produce two empty columns. -% @item, @tab, @multicolumn or @endmulticolumn do not need to be on their +% @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. @@ -1857,6 +1964,7 @@ % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. -% @multitablelinespace is space to leave between table items; -% 0 means it depends on current normal line spacing. +% @multitablelinespace is space to leave between table items, baseline +% to baseline. +% 0pt means it depends on current normal line spacing. %%%% @@ -1898,5 +2006,6 @@ \else \global\advance\colcount by1 - \setbox0=\hbox{#1}% + \setbox0=\hbox{#1 }% Add a normal word space as a separator; + % typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi% @@ -1937,5 +2046,5 @@ % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax% -\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname +\multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after @@ -1959,14 +2068,25 @@ \leftskip=\multitablecolspace \fi -\noindent##%\par -%\vskip\multitablelinespace -}\cr% + % Ignoring space at the beginning and end avoids an occasional spurious + % blank line, when TeX decides to break the line at the space before the + % box from the multistrut, so the strut ends up on a line by itself. + % For example: + % @multitable @columnfractions .11 .89 + % @item @code{#} + % @tab Legal holiday which is valid in major parts of the whole country. + % Is automatically provided with highlighing sequences respectively marking + % characters. + \noindent\ignorespaces##\unskip\multistrut}\cr % \everycr will reset column counter, \colcount, at the end of % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. -\global\everycr{\noalign{\nointerlineskip\vskip\multitablelinespace -\filbreak%% keeps underfull box messages off when table breaks over pages. -\global\colcount=0\relax}}} +\global\everycr{\noalign{% +% \filbreak%% keeps underfull box messages off when table breaks over pages. +% Maybe so, but it also creates really weird page breaks when the table +% breaks over pages Wouldn't \vfil be better? Wait until the problem +% manifests itself, so it can be fixed for real --karl. +\global\colcount=0\relax}} +} \def\setmultitablespacing{% test to see if user has set \multitablelinespace. @@ -1974,9 +2094,13 @@ % current baselineskip. \ifdim\multitablelinespace=0pt -\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip -\global\advance\multitablelinespace by-\ht0\fi +%% strut to put in table in case some entry doesn't have descenders, +%% to keep lines equally spaced +\let\multistrut = \strut %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. +\else +\gdef\multistrut{\vrule height\multitablelinespace depth\dp0 +width0pt\relax} \fi \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace @@ -1989,4 +2113,6 @@ %% than skip between lines in the table. \fi} + + \message{indexing,} % Index generation facilities @@ -2001,5 +2127,5 @@ % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for -% the file that accumulates this index. The file's extension is foo. +% the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. @@ -2007,6 +2133,6 @@ \def\newindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file -\openout \csname#1indfile\endcsname \jobname.#1 % Open the file -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex +\openout \csname#1indfile\endcsname \jobname.#1 % Open the file +\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#1}} } @@ -2020,6 +2146,6 @@ \def\newcodeindex #1{ \expandafter\newwrite \csname#1indfile\endcsname% Define number for output file -\openout \csname#1indfile\endcsname \jobname.#1 % Open the file -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex +\openout \csname#1indfile\endcsname \jobname.#1 % Open the file +\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#1}} } @@ -2032,5 +2158,5 @@ \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex +\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\doindex {#2}}% } @@ -2041,5 +2167,5 @@ \expandafter\let\expandafter\synindexfoo\expandafter=\csname#2indfile\endcsname \expandafter\let\csname#1indfile\endcsname=\synindexfoo -\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex +\expandafter\xdef\csname#1index\endcsname{% % Define \xxxindex \noexpand\docodeindex {#2}}% } @@ -2089,8 +2215,13 @@ \def\ss{\realbackslash ss}% % Take care of texinfo commands likely to appear in an index entry. +% (Must be a way to avoid doing expansion at all, and thus not have to +% laboriously list every single command here.) +\def\@{@}% will be @@ when we switch to @ as escape char. +%\let\{ = \lbracecmd +%\let\} = \rbracecmd \def\_{{\realbackslash _}}% \def\w{\realbackslash w }% \def\bf{\realbackslash bf }% -\def\rm{\realbackslash rm }% +%\def\rm{\realbackslash rm }% \def\sl{\realbackslash sl }% \def\sf{\realbackslash sf}% @@ -2099,5 +2230,5 @@ \def\less{\realbackslash less}% \def\hat{\realbackslash hat}% -\def\char{\realbackslash char}% +%\def\char{\realbackslash char}% \def\TeX{\realbackslash TeX}% \def\dots{\realbackslash dots }% @@ -2105,6 +2236,8 @@ \def\tclose##1{\realbackslash tclose {##1}}% \def\code##1{\realbackslash code {##1}}% +\def\dotless##1{\realbackslash dotless {##1}}% \def\samp##1{\realbackslash samp {##1}}% -\def\t##1{\realbackslash r {##1}}% +\def\,##1{\realbackslash ,{##1}}% +\def\t##1{\realbackslash t {##1}}% \def\r##1{\realbackslash r {##1}}% \def\i##1{\realbackslash i {##1}}% @@ -2134,4 +2267,5 @@ \def\indexnofonts{% % Just ignore accents. +\let\,=\indexdummyfont \let\"=\indexdummyfont \let\`=\indexdummyfont @@ -2146,4 +2280,5 @@ \let\v=\indexdummyfont \let\H=\indexdummyfont +\let\dotless=\indexdummyfont % Take care of the plain tex special European modified letters. \def\oe{oe}% @@ -2179,4 +2314,5 @@ \let\TeX=\indexdummytex \let\dots=\indexdummydots +\def\@{@}% } @@ -2194,27 +2330,35 @@ % #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=`\\% -{\let\folio=0% Expand all macros now EXCEPT \folio -\def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now -% so it will be output as is; and it will print as backslash in the indx. -% -% Now process the index-string once, with all font commands turned off, -% to get the string to sort the index by. -{\indexnofonts -\xdef\temp1{#2}% -}% -% Now produce the complete index entry. We process the index-string again, -% this time with font commands expanded, to get what to print in the index. -\edef\temp{% -\write \csname#1indfile\endcsname{% -\realbackslash entry {\temp1}{\folio}{#2}}}% -\temp }% -}\penalty\count10}} + % Put the index entry in the margin if desired. + \ifx\SETmarginindex\relax\else + \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% + \fi + {% + \count255=\lastpenalty + {% + \indexdummies % Must do this here, since \bf, etc expand at this stage + \escapechar=`\\ + {% + \let\folio=0% We will expand all macros now EXCEPT \folio. + \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now + % so it will be output as is; and it will print as backslash. + % + % First process the index-string with all font commands turned off + % to get the string to sort by. + {\indexnofonts \xdef\indexsorttmp{#2}}% + % + % Now produce the complete index entry, with both the sort key and the + % original text, including any font commands. + \toks0 = {#2}% + \edef\temp{% + \write\csname#1indfile\endcsname{% + \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% + }% + \temp + }% + }% + \penalty\count255 + }% +} \def\dosubind #1#2#3{% @@ -2277,24 +2421,17 @@ \def\printindex{\parsearg\doprintindex} -\def\doprintindex#1{% - \tex - \dobreak \chapheadingskip {10000} - \catcode`\%=\other\catcode`\&=\other\catcode`\#=\other - \catcode`\$=\other - \catcode`\~=\other - \indexbreaks +\def\doprintindex#1{\begingroup + \dobreak \chapheadingskip{10000}% % - % The following don't help, since the chars were translated - % when the raw index was written, and their fonts were discarded - % due to \indexnofonts. - %\catcode`\"=\active - %\catcode`\^=\active - %\catcode`\_=\active - %\catcode`\|=\active - %\catcode`\<=\active - %\catcode`\>=\active - % % - \def\indexbackslash{\rawbackslashxx} - \indexfonts\rm \tolerance=9500 \advance\baselineskip -1pt + \indexfonts \rm + \tolerance = 9500 + \indexbreaks + \def\indexbackslash{\rawbackslashxx}% + % Index files are almost Texinfo source, but we use \ as the escape + % character. It would be better to use @, but that's too big a change + % to make right now. + \catcode`\\ = 0 + \catcode`\@ = 11 + \escapechar = `\\ \begindoublecolumns % @@ -2307,5 +2444,5 @@ % there is some text. (Index is nonexistent) - \else + \else % % If the index file exists but is empty, then \openin leaves \ifeof @@ -2321,6 +2458,5 @@ \closein 1 \enddoublecolumns - \Etex -} +\endgroup} % These macros are used by the sorted index file itself. @@ -2413,13 +2549,13 @@ }} -%% Define two-column mode, which is used in indexes. -%% Adapted from the TeXbook, page 416. -\catcode `\@=11 +% Define two-column mode, which we use to typeset indexes. +% Adapted from the TeXbook, page 416, which is to say, +% the manmac.tex format used to print the TeXbook itself. +\catcode`\@=11 \newbox\partialpage - \newdimen\doublecolumnhsize -\def\begindoublecolumns{\begingroup +\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {\global\setbox\partialpage @@ -2454,49 +2590,49 @@ % since nobody clobbers \vsize.) \vsize = 2\vsize - \doublecolumnpagegoal -} - -\def\enddoublecolumns{\eject \endgroup \pagegoal=\vsize \unvbox\partialpage} - -\def\doublecolumnsplit{\splittopskip=\topskip \splitmaxdepth=\maxdepth - \global\dimen@=\pageheight \global\advance\dimen@ by-\ht\partialpage - \global\setbox1=\vsplit255 to\dimen@ \global\setbox0=\vbox{\unvbox1} - \global\setbox3=\vsplit255 to\dimen@ \global\setbox2=\vbox{\unvbox3} - \ifdim\ht0>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi - \ifdim\ht2>\dimen@ \setbox255=\vbox{\unvbox0\unvbox2} \global\setbox255=\copy5 \fi -} -\def\doublecolumnpagegoal{% - \dimen@=\vsize \advance\dimen@ by-2\ht\partialpage \global\pagegoal=\dimen@ } -\def\pagesofar{\unvbox\partialpage % - \hsize=\doublecolumnhsize % have to restore this since output routine - \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}} \def\doublecolumnout{% - \setbox5=\copy255 - {\vbadness=10000 \doublecolumnsplit} - \ifvbox255 - \setbox0=\vtop to\dimen@{\unvbox0} - \setbox2=\vtop to\dimen@{\unvbox2} - \onepageout\pagesofar \unvbox255 \penalty\outputpenalty - \else - \setbox0=\vbox{\unvbox5} - \ifvbox0 - \dimen@=\ht0 \advance\dimen@ by\topskip \advance\dimen@ by-\baselineskip - \divide\dimen@ by2 \splittopskip=\topskip \splitmaxdepth=\maxdepth - {\vbadness=10000 - \loop \global\setbox5=\copy0 - \setbox1=\vsplit5 to\dimen@ - \setbox3=\vsplit5 to\dimen@ - \ifvbox5 \global\advance\dimen@ by1pt \repeat - \setbox0=\vbox to\dimen@{\unvbox1} - \setbox2=\vbox to\dimen@{\unvbox3} - \global\setbox\partialpage=\vbox{\pagesofar} - \doublecolumnpagegoal - } - \fi - \fi + \splittopskip=\topskip \splitmaxdepth=\maxdepth + % Get the available space for the double columns -- the normal + % (undoubled) page height minus any material left over from the + % previous page. + \dimen@=\pageheight \advance\dimen@ by-\ht\partialpage + % box0 will be the left-hand column, box1 the right. + \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ + \onepageout\pagesofar + \unvbox255 \penalty\outputpenalty +} +\def\pagesofar{% + % The contents of the output page -- any previous material, + % followed by the two boxes we just split. + \unvbox\partialpage + \hsize = \doublecolumnhsize + \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% +} +\def\enddoublecolumns{% + \output={\balancecolumns}\eject % split what we have + \endgroup + % Back to normal single-column typesetting, but take account of the + % fact that we just accumulated some stuff on the output page. + \pagegoal=\vsize +} +\def\balancecolumns{% + % Called on the last page of the double column material. + \setbox0=\vbox{\unvbox255}% + \dimen@ = \ht0 + \advance\dimen@ by \topskip + \advance\dimen@ by-\baselineskip + \divide\dimen@ by 2 + \splittopskip = \topskip + % Loop until we get a decent breakpoint. + {\vbadness=10000 \loop \global\setbox3=\copy0 + \global\setbox1=\vsplit3 to\dimen@ + \ifdim\ht3>\dimen@ \global\advance\dimen@ by1pt \repeat}% + \setbox0=\vbox to\dimen@{\unvbox1}% + \setbox2=\vbox to\dimen@{\unvbox3}% + \pagesofar } - \catcode `\@=\other + + \message{sectioning,} % Define chapters, sections, etc. @@ -2670,4 +2806,8 @@ }} +% @centerchap is like @unnumbered, but the heading is centered. +\outer\def\centerchap{\parsearg\centerchapyyy} +\def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} + \outer\def\top{\parsearg\unnumberedyyy} \outer\def\unnumbered{\parsearg\unnumberedyyy} @@ -2772,5 +2912,5 @@ \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{\seccheck{unnumberedsubsec}% -\plainsecheading {#1}\gdef\thissection{#1}% +\plainsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% \edef\temp{{\realbackslash unnumbsubsecentry{#1}{\noexpand\folio}}}% @@ -2817,5 +2957,5 @@ \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{\seccheck{unnumberedsubsubsec}% -\plainsecheading {#1}\gdef\thissection{#1}% +\plainsubsubsecheading {#1}\gdef\thissection{#1}% {\chapternofonts% \edef\temp{{\realbackslash unnumbsubsubsecentry{#1}{\noexpand\folio}}}% @@ -2855,8 +2995,8 @@ % NOTE on use of \vbox for chapter headings, section headings, and % such: -% 1) We use \vbox rather than the earlier \line to permit -% overlong headings to fold. -% 2) \hyphenpenalty is set to 10000 because hyphenation in a -% heading is obnoxious; this forbids it. +% 1) We use \vbox rather than the earlier \line to permit +% overlong headings to fold. +% 2) \hyphenpenalty is set to 10000 because hyphenation in a +% heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. @@ -2876,9 +3016,8 @@ \rm #1\hfill}}\bigskip \par\penalty 200} -\def\heading{\parsearg\secheadingi} - -\def\subheading{\parsearg\subsecheadingi} - -\def\subsubheading{\parsearg\subsubsecheadingi} +% @heading, @subheading, @subsubheading. +\def\heading{\parsearg\plainsecheading} +\def\subheading{\parsearg\plainsubsecheading} +\def\subsubheading{\parsearg\plainsubsubsecheading} % These macros generate a chapter, section, etc. heading only @@ -2894,5 +3033,5 @@ % Parameter controlling skip before chapter headings (if needed) -\newskip \chapheadingskip \chapheadingskip = 30pt plus 8pt minus 4pt +\newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} @@ -2903,8 +3042,10 @@ \def\CHAPPAGoff{ +\global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{ +\global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager @@ -2912,4 +3053,5 @@ \def\CHAPPAGodd{ +\global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage @@ -2920,23 +3062,37 @@ \def\CHAPFplain{ \global\let\chapmacro=\chfplain -\global\let\unnumbchapmacro=\unnchfplain} +\global\let\unnumbchapmacro=\unnchfplain +\global\let\centerchapmacro=\centerchfplain} -\def\chfplain #1#2{% +% Plain chapter opening. +% #1 is the text, #2 the chapter number or empty if unnumbered. +\def\chfplain#1#2{% \pchapsepmacro {% - \chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #2\enspace #1}% + \chapfonts \rm + \def\chapnum{#2}% + \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \hangindent = \wd0 \centerparametersmaybe + \unhbox0 #1\par}% }% - \bigskip - \penalty5000 + \nobreak\bigskip % no page break after a chapter title + \nobreak } -\def\unnchfplain #1{% -\pchapsepmacro % -{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}\bigskip \par\penalty 10000 % -} +% Plain opening for unnumbered. +\def\unnchfplain#1{\chfplain{#1}{}} + +% @centerchap -- centered and unnumbered. +\let\centerparametersmaybe = \relax +\def\centerchfplain#1{{% + \def\centerparametersmaybe{% + \advance\rightskip by 3\rightskip + \leftskip = \rightskip + \parfillskip = 0pt + }% + \chfplain{#1}{}% +}} + \CHAPFplain % The default @@ -2952,57 +3108,61 @@ } +\def\centerchfopen #1{% +\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 + \parindent=0pt + \hfill {\rm #1}\hfill}}\bigskip \par\penalty 10000 % +} + \def\CHAPFopen{ \global\let\chapmacro=\chfopen -\global\let\unnumbchapmacro=\unnchfopen} +\global\let\unnumbchapmacro=\unnchfopen +\global\let\centerchapmacro=\centerchfopen} -% Parameter controlling skip before section headings. - -\newskip \subsecheadingskip \subsecheadingskip = 17pt plus 8pt minus 4pt -\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} -\newskip \secheadingskip \secheadingskip = 21pt plus 8pt minus 4pt +% Section titles. +\newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip {-1000}} +\def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} +\def\plainsecheading#1{\sectionheading{sec}{}{#1}} -% @paragraphindent is defined for the Info formatting commands only. -\let\paragraphindent=\comment +% Subsection titles. +\newskip \subsecheadingskip +\def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} +\def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} +\def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} -% Section fonts are the base font at magstep2, which produces -% a size a bit more than 14 points in the default situation. +% Subsubsection titles. +\let\subsubsecheadingskip = \subsecheadingskip +\let\subsubsecheadingbreak = \subsecheadingbreak +\def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} +\def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} -\def\secheading #1#2#3{\secheadingi {#2.#3\enspace #1}} -\def\plainsecheading #1{\secheadingi {#1}} -\def\secheadingi #1{{\advance \secheadingskip by \parskip % -\secheadingbreak}% -{\secfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% -\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } - - -% Subsection fonts are the base font at magstep1, -% which produces a size of 12 points. - -\def\subsecheading #1#2#3#4{\subsecheadingi {#2.#3.#4\enspace #1}} -\def\subsecheadingi #1{{\advance \subsecheadingskip by \parskip % -\subsecheadingbreak}% -{\subsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% -\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000 } - -\def\subsubsecfonts{\subsecfonts} % Maybe this should change: - % Perhaps make sssec fonts scaled - % magstep half -\def\subsubsecheading #1#2#3#4#5{\subsubsecheadingi {#2.#3.#4.#5\enspace #1}} -\def\subsubsecheadingi #1{{\advance \subsecheadingskip by \parskip % -\subsecheadingbreak}% -{\subsubsecfonts \vbox{\hyphenpenalty=10000\tolerance=5000 - \parindent=0pt\raggedright - \rm #1\hfill}}% -\ifdim \parskip<10pt \kern 10pt\kern -\parskip\fi \penalty 10000} + +% Print any size section title. +% +% #1 is the section type (sec/subsec/subsubsec), #2 is the section +% number (maybe empty), #3 the text. +\def\sectionheading#1#2#3{% + {% + \expandafter\advance\csname #1headingskip\endcsname by \parskip + \csname #1headingbreak\endcsname + }% + {% + % Switch to the right set of fonts. + \csname #1fonts\endcsname \rm + % + % Only insert the separating space if we have a section number. + \def\secnum{#2}% + \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% + % + \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright + \hangindent = \wd0 % zero if no section number + \unhbox0 #3}% + }% + \ifdim\parskip<10pt \nobreak\kern10pt\nobreak\kern-\parskip\fi \nobreak +} \message{toc printing,} - % Finish up the main text and prepare to read what we've written % to \contentsfile. @@ -3010,13 +3170,17 @@ \newskip\contentsrightmargin \contentsrightmargin=1in \def\startcontents#1{% - \pagealignmacro + % If @setchapternewpage on, and @headings double, the contents should + % start on an odd page, unlike chapters. Thus, we maintain + % \contentsalignmacro in parallel with \pagealignmacro. + % From: Torbjorn Granlund + \contentsalignmacro \immediate\closeout \contentsfile \ifnum \pageno>0 - \pageno = -1 % Request roman numbered pages. + \pageno = -1 % Request roman numbered pages. \fi % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% - \begingroup % Set up to handle contents files properly. + \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 @@ -3044,4 +3208,5 @@ \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \rm + \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} @@ -3087,5 +3252,5 @@ % widest letter (M) is 1em, at least in the Computer Modern fonts. % (This space doesn't include the extra space that gets added after - % the label; that gets put in in \shortchapentry above.) + % the label; that gets put in by \shortchapentry above.) \advance\dimen0 by 1.1em \hbox to \dimen0{#1\hfil}% @@ -3108,5 +3273,4 @@ \def\unnumbsubsubsecentry#1#2{\dosubsubsecentry{#1}{#2}} - % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc @@ -3115,13 +3279,13 @@ % page number. % -% If the toc has to be broken over pages, we would want to be at chapters +% If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% - \penalty-300 \vskip\baselineskip + \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno{#2}}% \endgroup - \nobreak\vskip .25\baselineskip + \nobreak\vskip .25\baselineskip plus.1\baselineskip } @@ -3148,5 +3312,5 @@ % \turnoffactive is for the sake of @" used for umlauts. \def\tocentry#1#2{\begingroup - \hyphenpenalty = 10000 + \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks \entry{\turnoffactive #1}{\turnoffactive #2}% \endgroup} @@ -3173,6 +3337,4 @@ \newbox\equivbox \newbox\errorbox -\let\ptexequiv = \equiv - %{\tentt %\global\setbox\dblarrowbox = \hbox to 1em{\hfil$\Rightarrow$\hfil} @@ -3185,10 +3347,9 @@ %} +% @point{}, @result{}, @expansion{}, @print{}, @equiv{}. \def\point{$\star$} - \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} - \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} @@ -3222,5 +3383,5 @@ \catcode `\^=7 \catcode `\_=8 \catcode `\~=13 \let~=\tie \catcode `\%=14 -\catcode 43=12 +\catcode 43=12 % plus \catcode`\"=12 \catcode`\==12 @@ -3230,4 +3391,5 @@ \escapechar=`\\ % +\let\,=\ptexcomma \let\~=\ptextilde \let\{=\ptexlbrace @@ -3236,8 +3398,9 @@ \let\*=\ptexstar \let\dots=\ptexdots +\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}} +\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi} \def\@{@}% \let\bullet=\ptexbullet -\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext \let\l=\ptexl -\let\L=\ptexL +\let\b=\ptexb \let\c=\ptexc \let\i=\ptexi \let\t=\ptext % \let\Etex=\endgroup} @@ -3298,9 +3461,9 @@ \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip - \ctl\leaders\hrule height\circthick\hfil\ctr - \hskip\rskip}} + \ctl\leaders\hrule height\circthick\hfil\ctr + \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip - \cbl\leaders\hrule height\circthick\hfil\cbr - \hskip\rskip}} + \cbl\leaders\hrule height\circthick\hfil\cbr + \hskip\rskip}} % \newskip\lskip\newskip\rskip @@ -3308,38 +3471,38 @@ \long\def\cartouche{% \begingroup - \lskip=\leftskip \rskip=\rightskip - \leftskip=0pt\rightskip=0pt %we want these *outside*. - \cartinner=\hsize \advance\cartinner by-\lskip - \advance\cartinner by-\rskip - \cartouter=\hsize - \advance\cartouter by 18pt % allow for 3pt kerns on either -% side, and for 6pt waste from -% each corner char - \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip - % Flag to tell @lisp, etc., not to narrow margin. - \let\nonarrowing=\comment - \vbox\bgroup - \baselineskip=0pt\parskip=0pt\lineskip=0pt - \carttop - \hbox\bgroup - \hskip\lskip - \vrule\kern3pt - \vbox\bgroup - \hsize=\cartinner - \kern3pt - \begingroup - \baselineskip=\normbskip - \lineskip=\normlskip - \parskip=\normpskip - \vskip -\parskip + \lskip=\leftskip \rskip=\rightskip + \leftskip=0pt\rightskip=0pt %we want these *outside*. + \cartinner=\hsize \advance\cartinner by-\lskip + \advance\cartinner by-\rskip + \cartouter=\hsize + \advance\cartouter by 18pt % allow for 3pt kerns on either +% side, and for 6pt waste from +% each corner char + \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip + % Flag to tell @lisp, etc., not to narrow margin. + \let\nonarrowing=\comment + \vbox\bgroup + \baselineskip=0pt\parskip=0pt\lineskip=0pt + \carttop + \hbox\bgroup + \hskip\lskip + \vrule\kern3pt + \vbox\bgroup + \hsize=\cartinner + \kern3pt + \begingroup + \baselineskip=\normbskip + \lineskip=\normlskip + \parskip=\normpskip + \vskip -\parskip \def\Ecartouche{% - \endgroup - \kern3pt - \egroup - \kern3pt\vrule - \hskip\rskip - \egroup - \cartbot - \egroup + \endgroup + \kern3pt + \egroup + \kern3pt\vrule + \hskip\rskip + \egroup + \cartbot + \egroup \endgroup }} @@ -3404,6 +3567,5 @@ \let\Esmallexample = \nonfillfinish % - % Smaller interline space and fonts for small examples. - \setleading{10pt}% + % Smaller fonts for small examples. \indexfonts \tt \rawbackslash % make \ output the \ character from the current font (tt) @@ -3645,7 +3807,7 @@ % Fine, but then we have to eventually remove the \empty *and* the -% braces (if any). That's what this does, putting the result in \tptemp. +% braces (if any). That's what this does. % -\def\removeemptybraces\empty#1\relax{\def\tptemp{#1}}% +\def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final @@ -3654,6 +3816,5 @@ % \def\parsetpheaderline#1#2#3{% - \removeemptybraces#2\relax - #1{\tptemp}{#3}% + #1{\removeemptybraces#2\relax}{#3}% }% @@ -3933,4 +4094,5 @@ \def\deftpx #1 {\errmessage{@deftpx in invalid context}} + \message{cross reference,} % Define cross-reference macros @@ -3940,4 +4102,9 @@ \newif\ifwarnedxrefs % True if we warned once that they aren't known. +% @inforef is simple. +\def\inforef #1{\inforefzzz #1,,,,**} +\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, + node \samp{\ignorespaces#1{}}} + % \setref{foo} defines a cross-reference point named foo. @@ -4018,5 +4185,5 @@ % Use \turnoffactive so that punctuation chars such as underscore % work in node names. -\def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat% +\def\dosetq #1#2{{\let\folio=0 \turnoffactive \edef\next{\write\auxfile{\internalsetq {#1}{#2}}}% \next}} @@ -4087,82 +4254,99 @@ } -% Read the last existing aux file, if any. No error if none exists. - % This is the macro invoked by entries in the aux file. -\def\xrdef #1#2{ -{\catcode`\'=\other\expandafter \gdef \csname X#1\endcsname {#2}}} +\def\xrdef #1#2{{% + \catcode`\'=\other + \expandafter\gdef\csname X#1\endcsname{#2}% +}} -\def\readauxfile{% -\begingroup -\catcode `\^^@=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\^^C=\other -\catcode `\^^D=\other -\catcode `\^^E=\other -\catcode `\^^F=\other -\catcode `\^^G=\other -\catcode `\^^H=\other -\catcode `\ =\other -\catcode `\^^L=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode `\=\other -\catcode 26=\other -\catcode `\^^[=\other -\catcode `\^^\=\other -\catcode `\^^]=\other -\catcode `\^^^=\other -\catcode `\^^_=\other -\catcode `\@=\other -\catcode `\^=\other -\catcode `\~=\other -\catcode `\[=\other -\catcode `\]=\other -\catcode`\"=\other -\catcode`\_=\other -\catcode`\|=\other -\catcode`\<=\other -\catcode`\>=\other -\catcode `\$=\other -\catcode `\#=\other -\catcode `\&=\other -% `\+ does not work, so use 43. -\catcode 43=\other -% Make the characters 128-255 be printing characters -{% - \count 1=128 - \def\loop{% - \catcode\count 1=\other - \advance\count 1 by 1 - \ifnum \count 1<256 \loop \fi +% Read the last existing aux file, if any. No error if none exists. +\def\readauxfile{\begingroup + \catcode`\^^@=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\^^C=\other + \catcode`\^^D=\other + \catcode`\^^E=\other + \catcode`\^^F=\other + \catcode`\^^G=\other + \catcode`\^^H=\other + \catcode`\ =\other + \catcode`\^^L=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode`\=\other + \catcode26=\other + \catcode`\^^[=\other + \catcode`\^^\=\other + \catcode`\^^]=\other + \catcode`\^^^=\other + \catcode`\^^_=\other + \catcode`\@=\other + \catcode`\^=\other + % It was suggested to define this as 7, which would allow ^^e4 etc. + % in xref tags, i.e., node names. But since ^^e4 notation isn't + % supported in the main text, it doesn't seem desirable. Furthermore, + % that is not enough: for node names that actually contain a ^ + % character, we would end up writing a line like this: 'xrdef {'hat + % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first + % argument, and \hat is not an expandable control sequence. It could + % all be worked out, but why? Either we support ^^ or we don't. + % + % The other change necessary for this was to define \auxhat: + % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter + % and then to call \auxhat in \setq. + % + \catcode`\~=\other + \catcode`\[=\other + \catcode`\]=\other + \catcode`\"=\other + \catcode`\_=\other + \catcode`\|=\other + \catcode`\<=\other + \catcode`\>=\other + \catcode`\$=\other + \catcode`\#=\other + \catcode`\&=\other + % `\+ does not work, so use 43. + \catcode43=\other + % Make the characters 128-255 be printing characters + {% + \count 1=128 + \def\loop{% + \catcode\count 1=\other + \advance\count 1 by 1 + \ifnum \count 1<256 \loop \fi + }% }% -}% -% the aux file uses ' as the escape. -% Turn off \ as an escape so we do not lose on -% entries which were dumped with control sequences in their names. -% For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ -% Reference to such entries still does not work the way one would wish, -% but at least they do not bomb out when the aux file is read in. -\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 -\global\warnedobstrue -\fi -% Open the new aux file. Tex will close it automatically at exit. -\openout \auxfile=\jobname.aux + % The aux file uses ' as the escape (for now). + % Turn off \ as an escape so we do not lose on + % entries which were dumped with control sequences in their names. + % For example, 'xrdef {$\leq $-fun}{page ...} made by @defun ^^ + % Reference to such entries still does not work the way one would wish, + % but at least they do not bomb out when the aux file is read in. + \catcode`\{=1 + \catcode`\}=2 + \catcode`\%=\other + \catcode`\'=0 + \catcode`\\=\other + % + \openin 1 \jobname.aux + \ifeof 1 \else + \closein 1 + \input \jobname.aux + \global\havexrefstrue + \global\warnedobstrue + \fi + % Open the new aux file. TeX will close it automatically at exit. + \openout\auxfile=\jobname.aux \endgroup} @@ -4175,5 +4359,6 @@ % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is -% removed. +% removed. (Generally, numeric constants should always be followed by a +% space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } @@ -4203,6 +4388,10 @@ % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. +% +% Oh yes, they do; otherwise, @ifset and anything else that uses +% \parseargline fail inside footnotes because the tokens are fixed when +% the footnote is read. --karl, 16nov96. % -\long\gdef\footnotezzz#1{\insert\footins{% +\long\gdef\footnotezzz{\insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. @@ -4226,6 +4415,11 @@ % provide a place where TeX can split the footnote. \footstrut - #1\strut}% + \futurelet\next\fo@t } +\def\fo@t{\ifcat\bgroup\noexpand\next \let\next\f@@t + \else\let\next\f@t\fi \next} +\def\f@@t{\bgroup\aftergroup\@foot\let\next} +\def\f@t#1{#1\@foot} +\def\@foot{\strut\egroup} }%end \catcode `\@=11 @@ -4300,11 +4494,16 @@ % Set some numeric style parameters, for 8.5 x 11 format. -%\hsize = 6.5in +\hsize = 6in +\hoffset = .25in \newdimen\defaultparindent \defaultparindent = 15pt \parindent = \defaultparindent -\parskip 18pt plus 1pt -\setleading{15pt} +\parskip 3pt plus 2pt minus 1pt +\setleading{13.2pt} \advance\topskip by 1.2cm +\chapheadingskip = 15pt plus 4pt minus 2pt +\secheadingskip = 12pt plus 3pt minus 2pt +\subsecheadingskip = 9pt plus 2pt minus 2pt + % Prevent underfull vbox error messages. \vbadness=10000 @@ -4329,28 +4528,26 @@ % Use @smallbook to reset parameters for 7x9.5 format (or else 7x9.25) \def\smallbook{ - -% These values for secheadingskip and subsecheadingskip are -% experiments. RJC 7 Aug 1992 -\global\secheadingskip = 17pt plus 6pt minus 3pt -\global\subsecheadingskip = 14pt plus 6pt minus 3pt - -\global\lispnarrowing = 0.3in -\setleading{12pt} -\advance\topskip by -1cm -\global\parskip 3pt plus 1pt -\global\hsize = 5in -\global\vsize=7.5in -\global\tolerance=700 -\global\hfuzz=1pt -\global\contentsrightmargin=0pt -\global\deftypemargin=0pt -\global\defbodyindent=.5cm - -\global\pagewidth=\hsize -\global\pageheight=\vsize - -\global\let\smalllisp=\smalllispx -\global\let\smallexample=\smalllispx -\global\def\Esmallexample{\Esmalllisp} + \global\chapheadingskip = 15pt plus 4pt minus 2pt + \global\secheadingskip = 12pt plus 3pt minus 2pt + \global\subsecheadingskip = 9pt plus 2pt minus 2pt + % + \global\lispnarrowing = 0.3in + \setleading{12pt} + \advance\topskip by -1cm + \global\parskip 2pt plus 1pt + \global\hsize = 5in + \global\vsize=7.5in + \global\tolerance=700 + \global\hfuzz=1pt + \global\contentsrightmargin=0pt + \global\deftypemargin=0pt + \global\defbodyindent=.5cm + % + \global\pagewidth=\hsize + \global\pageheight=\vsize + % + \global\let\smalllisp=\smalllispx + \global\let\smallexample=\smalllispx + \global\def\Esmallexample{\Esmalllisp} } @@ -4375,4 +4572,9 @@ } +\bindingoffset=0pt +\normaloffset=\hoffset +\pagewidth=\hsize +\pageheight=\vsize + % Allow control of the text dimensions. Parameters in order: textheight; % textwidth; voffset; hoffset; binding offset; topskip. @@ -4451,5 +4653,4 @@ \chardef\hat=`\^ \catcode`\^=\active -\def\auxhat{\def^{'hat}} \def^{{\tt \hat}}