-Fri Mar 17 20:39:08 1995 John Gilmore (gnu at toad.com)
+Wed Jun 21 14:48:19 1995 <tytso@rsx-11.mit.edu>
- * acgeneral.m4: Report the update status of the cache better;
- show diffs if an unwriteable cache gets updated, for manually
- configuring the Mac config.cache.
- * configure: Update with this acgeneral.m4.
+ * Installed autoconf 2.4 in the Kerberos V5 tree. This reverted a
+ few Krb5-specific changes: tytso Ultrix /bin/sh
+ workarounds (which are supposedly fixed in another way in
+ autoconf 2.4), eichin's change to autoreconf to allow it to
+ work in symlink farms, jgilmore's change acgeneral.m4 to
+ report the update status of the cache better (???).
-Wed Jan 25 19:52:11 1995 Mark Eichin (eichin@tweedledumber.cygnus.com)
+Wed Jun 14 23:07:20 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu>
- * autoreconf.sh (ls test): use -Llt to sort, in case we're in a
- symlink farm.
+ * Version 2.4.
-Mon Dec 19 19:20:58 1994 Theodore Y. Ts'o (tytso at tsx-11)
+Sun May 7 08:09:12 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu>
- * acgeneral.m4 (AC_DEFINE_UNQUOTED): Workaround more Ultrix sh
- brain damage.
+ * acspecific.m4 (AC_PATH_X_XMKMF): Check for libX11.{so,sl} as
+ well as .a when seeing whether LIBDIR or USRLIBDIR is right.
- * acgeneral.m4 (AC_CACHE_SAVE): Work around yet another really
- horrible Ultrix sh bug. The values of variables read in
- using the ${var='bar'} construction are displayed using
- the "set" command with the high bit set. (Someone should
- just haul off the Ultrix sh and have it shot). Fixed
- using tr.
+Sat May 6 17:29:07 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu>
+
+ * acspecific.m4 (AC_PROG_CPP): If CPP is already set, use that as
+ the value and set the cache variable to it.
+
+Mon Mar 27 10:48:36 1995 David J. MacKenzie <djm@churchy.gnu.ai.mit.edu>
+
+ * Version 2.3.
+
+ * acgeneral.m4 (AC_OUTPUT): Add quotes around the echo arguments
+ in the trap, so backslashes aren't required for multiline input.
+ From G.Wilford@ee.surrey.ac.uk.
+ Also use the sed trick when not using a config header file.
+
+Thu Mar 23 18:02:25 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Put "-c" right
+ after compiler name. Same for "-o conftest".
+
+ * ifnames.sh (AC_MACRODIR): Default to @datadir@, not a hardcoded
+ path.
+
+ * Test release 2.2.1.
+
+ * acgeneral.m4 (AC_OUTPUT): Use sed, not tr, so we only remove the
+ output config header, not the input one too. From
+ muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig).
+ (AC_LANG_C): Undo Feb 7 change. According to Roland McGrath,
+ most compilers require all options but -l... and -o to come first.
+
+ * Makefile.in (uninstall): Don't use $@, since the cd makes it
+ invalid when srcdir is relative.
+
+Wed Mar 8 17:05:06 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu>
+
+ * Version 2.2.
+
+Wed Mar 8 12:44:34 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * Makefile.in: Follow cd commands with &&, not ;.
+ From Franc,ois Pinard.
+
+Tue Mar 7 11:48:19 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acspecific.m4 (AC_FUNC_ALLOCA): Keep sh variable namespace clean.
+ Put newline after AC_DEFINE_UNQUOTED call to avoid Irix syntax error.
+
+Mon Mar 6 15:07:00 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * Test release 2.1.3.
+
+ * acspecific.m4 (AC_FUNC_ALLOCA): Replace nested AC_FUNC_CHECK
+ calls with a loop.
+
+ * acspecific.m4 (AC_FUNC_VPRINTF): Don't check for signal munging.
+ From Paul Eggert.
+
+ * acgeneral.m4 (AC_CACHE_SAVE): Tell the user whether the cache
+ changed or not. From gnu@toad.com (John Gilmore).
+
+ * Makefile.in (install-info): Don't cd, to avoid breaking
+ install-sh references.
+
+Fri Mar 3 11:41:01 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * Makefile.in (autoconf.info, standards.info): Use --no-split to
+ avoid creating filenames > 14 chars.
+
+ * acgeneral.m4 (AC_CHECK_FUNC): Use assert.h,
+ to avoid protype conflicts from ctype.h (!!) on OSF/1 3.0.
+
+Sat Feb 25 01:56:57 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acspecific.m4 (AC_C_BIGENDIAN): Check for BYTE_ORDER macro from
+ sys/param.h before trying the test program which cannot be
+ cross-compiled.
+
+Fri Feb 24 20:02:08 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acgeneral.m4 (AC_CHECK_FUNC): Include errno.h instead of ctype.h
+ in test program.
+
+Wed Feb 22 18:01:27 1995 David J. MacKenzie <djm@geech.gnu.ai.mit.edu>
+
+ * Test release 2.1.2.
+
+Tue Feb 21 13:00:07 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acgeneral.m4 (AC_CACHE_VAL): Add extra quotes to work around AIX
+ 4.1 bug reported by hyc@locus.com (Howard Chu).
+
+ * acspecific.m4 (AC_FUNC_GETLOADAVG): Check for -lelf before -lkvm.
+ Reported by Kaveh R. Ghazi <ghazi@caip.rutgers.edu>.
+ (AC_HEADER_STAT): Check whether S_IFDIR is defined, to work around
+ ISC bug reported by rick@anasazi.com (Rick Coupland).
+
+ * autoheader.sh: Better solution to @BOTTOM@ printing.
+ From Paul Eggert.
+
+Mon Feb 13 18:13:11 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acspecific.m4 (AC_PROG_CC_C_O): Use sed filter to make sure
+ ${ac_cc} is always a valid shell variable name.
+ (AC_PROG_MAKE_SET): Remove gratuitous backslashes in checking message.
+
+Sun Feb 12 18:42:35 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acgeneral.m4 (AC_CHECK_TOOL_PREFIX): Require AC_CANONICAL_BUILD,
+ so both $build and $host are definitely set before we compare
+ them.
+
+Sat Feb 11 04:37:30 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acgeneral.m4 (AC_CHECK_TOOL): Rewritten. Take optional third
+ arg VALUE-IF-NOT-FOUND. Check for
+ ${ac_tool_prefix}PROG-TO-CHECK-FOR first. If not found and third
+ arg given, and ${ac_tool_prefix} is nonempty, check for unadorned
+ PROG-TO-CHECK-FOR as well. Last choice use VALUE-IF-NOT-FOUND.
+
+Fri Feb 10 17:45:53 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acgeneral.m4 (AC_OUTPUT): Fix sed command to produce $ac_dots
+ for subdir configures.
+
+Thu Feb 9 14:42:20 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * testsuite/config/unix.exp (autoconf_load): Run the script with
+ /dev/null as the cache.
+
+ * acgeneral.m4 (AC_CHECK_TOOL_PREFIX, AC_CHECK_TOOL): New macros,
+ from Roland McGrath.
+
+ * acspecific.m4 (AC_DECL_YYTEXT): Cache the output file root.
+ (AC_C_INLINE): If the compiler doesn't recognize it, define it
+ away. Try __inline__ too. From Jim Avera.
+ (AC_FUNC_GETPGRP): New macro. From Arnold Robbins.
+ * acconfig.h: New entry for it.
+
+ * configure.in: Check for new awk.
+ * Makefile.in (editsh): Substitute in AWK.
+
+ * acspecific.m4 (AC_PROG_INSTALL): Allow trailing slashes in PATH
+ elements.
+ * acgeneral.m4 (AC_PREFIX_PROGRAM): Ditto.
+
+Tue Feb 7 11:32:09 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acgeneral.m4 (AC_CHECK_LIB, AC_HAVE_LIBRARY): Check and add the new
+ library before existing libs, not after, in case it uses them.
+ * acspecific.m4 (AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
+ AC_FUNC_STRFTIME, AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): Ditto.
+
+ * autoheader.sh: Allow @BOTTOM@ to be the first line in
+ acconfig.h. From iwj10@cus.cam.ac.uk (Ian Jackson).
+
+ * acspecific.m4 (AC_FUNC_GETLOADAVG): Add semicolons before
+ AC_DEFINE. Check for -lkvm before -lutil. Assume it needs setgid
+ if using -lutil.
+
+ * acgeneral.m4 (ac_compile, ac_link): Put the file name before the
+ variables, so they can contain -l options.
+
+ * acspecific.m4 (AC_FUNC_WAIT3): Sleep longer for HPUX.
+ (AC_TYPE_SIGNAL): Declare signal as extern "C" for C++.
+
+ * Makefile.in testsuite/Makefile.in (maintainer-clean): Renamed
+ from realclean.
+
+ * autoconf.sh (TMPDIR): Inherit from environment, or set if not.
+
+ * acgeneral.m4 (AC_PREFIX_PROGRAM): Say we're checking the prefix.
+
+ * acspecific.m4 (AC_ISC_POSIX): Fix typo.
+ (AC_PATH_X): Screen out bogus values from imake.
+ (AC_PROG_LEX): Check for yywrap, not main, in the library.
+
+Thu Feb 2 11:32:07 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acconfig.h (__CHAR_UNSIGNED): Protect with #ifndef.
+ From marcus@ee.pdx.edu (Marcus Daniels).
+
+ * acgeneral.m4 (AC_CACHE_SAVE): Workaround Ultrix and 4.3BSD sh
+ bug in setting the high bit on variable values.
+ From Ken Raeburn.
+ (AC_OUTPUT_FILES, AC_OUTPUT_SUBDIRS): Ignore initial "./" to
+ avoid messing up the dot-dot counts.
+ (AC_OUTPUT_SUBDIRS): Pass INSTALL magic to subdirectories.
+ From Karl Berry.
+
+ * ifnames.sh: Speed up drastically by folding 3N+2 processes into 2.
+ From Paul Eggert.
+
+Wed Feb 1 11:58:27 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acgeneral.m4 (AC_ARG_ENABLE, AC_ARG_WITH): Add additional
+ quoting for internal consistency.
+ From junio@twinsun.COM (Jun Hamano).
+
+ * acspecific.m4 (AC_PATH_XTRA): R6 function name was wrong.
+ From Karl Berry.
+ (AC_C_CROSS): Fix typo in cache var name.
+ From tgl@sss.pgh.pa.us (Tom Lane).
+ (AC_PROG_MAKE_SET): Change / in the make program name into _ so it
+ can be part of a shell variable name.
+ (AC_DECL_YYTEXT): Fix arguments to AC_TRY_LINK.
+ From interran@uluru.stanford.edu (John Interrante).
+
+ * acgeneral.m4 (AC_CHECK_SIZEOF): If test program fails, set the
+ variable to 0 as the doc sez.
+ From eisen@cc.gatech.edu (Greg Eisenhauer).
+
+ * acgeneral.m4, acspecific.m4: Remove *.core and core.* as well as
+ core, for recent BSD's.
+
+ * acspecific.m4 (AC_SYS_INTERPRETER): Use `#! /' instead of `#!/'.
+ * acgeneral.m4 (AC_INIT_BINSH): Likewise.
+ * All scripts: likewise.
+ From woods@kuma.web.net (Greg A. Woods).
+
+ * acgeneral.m4 (AC_INIT_PREPARE): Use fd 6 instead of 4, to
+ prevent a conflict on the Kubota Titan. From
+ muessig@ipf.bau-verm.uni-karlsruhe.DE (Peter Muessig).
+
+ * autoconf.sh: Use a more concise syntax to set variables.
+ From Karl Berry.
+
+ * acspecific.m4 (AC_FUNC_WAIT3): Check page fault measurements to
+ catch Linux. From tobias@server.et-inf.fho-emden.de (Peter Tobias).
+
+ * acgeneral.m4 (AC_OUTPUT): If running config.status
+ fails, exit with a nonzero status. From Ken Raeburn.
+
+Tue Dec 6 19:07:07 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acspecific.m4 (AC_FUNC_GETLOADAVG): Use elf_begin in -lelf
+ check, not elf_read.
+
+Mon Nov 7 18:18:11 1994 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+
+ * acspecific.m4 (AC_PROG_MAKE_SET): Fix msg; $MAKE is not useful
+ Make syntax.
Fri Nov 4 09:08:33 1994 David J. MacKenzie <djm@duality.gnu.ai.mit.edu>
documentation.
5. You can remove the program binaries and object files from the
- source directory by typing `make clean'. To also remove the files
- that `configure' created (so you can compile the package for a
- different kind of computer), type `make distclean'.
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
Compilers and Options
=====================
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
-Using a Different Build Directory
-=================================
+Compiling For Multiple Architectures
+====================================
- You can compile the package in a different directory from the one
-containing the source code. Doing so allows you to compile it on more
-than one kind of computer at the same time. To do this, you must use a
-version of `make' that supports the `VPATH' variable, such as GNU
-`make'. `cd' to the directory where you want the object files and
-executables to go and run the `configure' script. `configure'
-automatically checks for the source code in the directory that
-`configure' is in and in `..'.
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
Installation Names
==================
operates.
`--cache-file=FILE'
- Save the results of the tests in FILE instead of `config.cache'.
- Set FILE to `/dev/null' to disable caching, for debugging
- `configure'.
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
M4 = @M4@
+AWK = @AWK@
PERL = @PERL@
# Programs that are always installed.
testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
standards.texi make-stds.texi standards.info*
-editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''M4''@,$(M4),g'
+editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e \
+ 's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g'
editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
all: ${SCRIPTS}
info: autoconf.info @standards_info@ INSTALL
+# Use --no-split to avoid creating filenames > 14 chars.
autoconf.info: autoconf.texi install.texi
- $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --output=$@
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@
INSTALL: install.texi
$(MAKEINFO) -I$(srcdir) $(srcdir)/install.texi --output=$@ \
--no-headers --no-validate
standards.info: standards.texi make-stds.texi
- $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --output=$@
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@
dvi: autoconf.dvi @standards_dvi@
done; \
else :; fi
+# Don't cd, to avoid breaking install-sh references.
install-info: info installdirs
- -test -f autoconf.info || cd $(srcdir); \
- for i in autoconf.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
- done
- -test -f standards.info || cd $(srcdir); \
- for i in standards.info*; do \
- $(INSTALL_DATA) $$i $(infodir)/$$i; \
- done
+ if test -f autoconf.info; then \
+ for i in *.info*; do \
+ $(INSTALL_DATA) $$i $(infodir)/$$i; \
+ done; \
+ else \
+ for i in $(srcdir)/*.info*; do \
+ $(INSTALL_DATA) $$i $(infodir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
+ done; \
+ fi
uninstall:
for p in $(SCRIPTS); do \
rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
done
rm -fr $(acdatadir)
- cd $(infodir); rm -f autoconf.info*
+ cd $(infodir) && rm -f autoconf.info*
if test -f standards.info || test -f $(srcdir)/standards.info; \
- then cd $(infodir); rm -f standards.info*; fi
+ then cd $(infodir) && rm -f standards.info*; fi
${srcdir}/configure: configure.in $(M4FILES)
- cd $(srcdir); \
- rm -f $@ $@.tmp; \
- $(M4) autoconf.m4 configure.in > $@.tmp && \
- chmod +x $@.tmp && mv $@.tmp $@
+ cd $(srcdir) && \
+ rm -f configure configure.tmp && \
+ $(M4) autoconf.m4 configure.in > configure.tmp && \
+ chmod +x configure.tmp && mv configure.tmp configure
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
-clean mostlyclean distclean realclean::
+maintainer-clean::
+ @echo "This command is intended for maintainers to use;"
+ @echo "rebuilding the deleted files requires makeinfo."
+ rm -f TAGS *.info* INSTALL
+
+clean mostlyclean distclean maintainer-clean::
for dir in $(SUBDIRS); do \
echo making $@ in $$dir ; \
- (cd $$dir; $(MAKE) $@) ; \
+ (cd $$dir && $(MAKE) $@) ; \
done
-clean mostlyclean distclean realclean::
+clean mostlyclean distclean maintainer-clean::
rm -f $(SCRIPTS) *.tmp
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
-distclean realclean::
+distclean maintainer-clean::
rm -f Makefile config.status config.cache config.log
-realclean::
- rm -f TAGS *.info* INSTALL
-
TAGS:
etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi
+Major changes in release 2.4:
+
+* Fix a few bugs found by Emacs testers.
+\f
+Major changes in release 2.3:
+
+* Fix the cleanup trap in several ways.
+* Handle C compilers that are picky about option placement.
+* ifnames gets the version number from the right directory.
+\f
+Major changes in release 2.2:
+
+* The ifnames utility is much faster but requires a "new awk" interpreter.
+* AC_CHECK_LIB and AC_HAVE_LIBRARY check and add the new
+ library before existing libs, not after, in case it uses them.
+* New macros: AC_FUNC_GETPGRP, AC_CHECK_TOOL.
+* Lots of bug fixes.
+* Many additions to the TODO file :-)
+\f
Major changes in release 2.1:
* Fix C++ problems.
I've incorporated many of them, and am still considering others for
future releases -- but I didn't want to postpone this release indefinitely.
-Caution: don't indiscriminantly rebuild configure scripts with
+Caution: don't indiscriminately rebuild configure scripts with
Autoconf version 2. Some configure.in files need minor adjustments to
work with it; the documentation has a chapter on upgrading. A few
configure.in files, including those for GNU Emacs and the GNU C
-*- outline -*-
-Things it might be nice to do someday:
+Things it might be nice to do someday. I haven't evaluated all of
+these suggestions... their presence here doesn't imply my endorsement.
+-djm
------------------------------------------------------------------------------
* Mike Haertel's suggestions:
-** Provide files containing decls for alloca, strings, etc.
+** Provide header files containing decls for alloca, strings, etc.
** Cross compiling:
------------------------------------------------------------------------------
-* Look at user contributed macros: prototypes, IEEE double precision math,
-shared libraries, various other things.
+* Look at user contributed macros:
+ prototypes
+ IEEE double precision math
+ shared libraries
+
+------------------------------------------------------------------------------
+
+For AC_TYPE_SIGNAL signal handlers, provide a way for code to know
+whether to do "return 0" or "return" (int vs void) to avoid compiler
+warnings. (Roland McGrath)
+
+------------------------------------------------------------------------------
+
+In config.status comment, put the host/target/build types, if used.
+
+------------------------------------------------------------------------------
+
+Support a way of including makefile fragments that then have @var@
+substitutions done on them.
+
+------------------------------------------------------------------------------
+
+Have AC_CANONICAL_* cache the host/build/target types.
+
+------------------------------------------------------------------------------
+
+Look at contributions:
+ ac_include (Karl Berry)
+ aclocal.h tom@basil.icce.rug.NL (Tom R.Hageman)
+
+------------------------------------------------------------------------------
+
+ The argument HELP-STRING is a description of the option which
+ ...
+ Avoid tabs in the help string. You'll need to enclose it in `['
+ and `]' in order to produce the leading spaces.
+
+Except that [...] is the convention for telling the user the default,
+So I guess a changequote(`,') or something would be in order in some cases.
+From: "K. Berry" <kb@cs.umb.edu>
+
+------------------------------------------------------------------------------
+
+I would find it a wonderful boon if config.log contained not just the
+output from the compilers, but also the invocation. Almost all
+the errors I've found are due to the wrong options getting passed for
+one reason or another.
+
+Saving the input test file(s) that failed would be useful, too.
+From: "K. Berry" <kb@cs.umb.edu>
+
+------------------------------------------------------------------------------
+
+The default of unlimited permission is fine, but there should be some easy
+way for configure to have copyright terms passed through from configure.in.
+Maybe AC_LICENSE([...]).
+From: roland@gnu.ai.mit.edu (Roland McGrath)
+
+------------------------------------------------------------------------------
+
+autoconf-2.1 AC_EGREP_HEADER does not work if [square brackets]
+are used in the egrep pattern. This makes egrep fairly useless to
+find, for example, a space or tab followed by something.
+
+Putting changequotes around the PATTERN parameter makes no difference.
+-Jim Avera (jima@netcom.com)
+
+------------------------------------------------------------------------------
+
+AC_MSG_CHECKING([checking for ANSI #stringize])
+AC_REVISION([ #(@) revision 2.1 ])
+
+causes bogus code to be generated for whatever immediately follows. The
+problem goes away if the '#' is removed. Probably the macros are not
+disabling the m4 "comment" feature when processing user-supplied strings.
+-Jim Avera jima@netcom.com
+
+------------------------------------------------------------------------------
+
+on hal.gnu.ai.mit.edu, configure is getting the wrong answer for
+AC_CHECK_FUNCS(select).
+
+The problem here is that there's severe namespace pollution: when
+conftest.c includes <ctype.h> to pick up any __stub macro definitions,
+it's getting a prototype declaration for select(), which collides
+with the dummy declaration in conftest.c. (The chain of includes
+is conftest.c -> <ctype.h> -> <sys/localedef.h> -> <sys/lc_core.h>
+-> <sys/types.h> -> <sys/select.h>.)
+
+ #define $ac_func __dummy_$ac_func
+ #include <ctype.h>
+ #undef $ac_func
+From: kwzh@gnu.ai.mit.edu (Karl Heuer)
+
+------------------------------------------------------------------------------
+
+put all the config.* stuff somewhere like config/?
+All these extraneous files sure clutter up a toplevel directory.
+From: "Randall S. Winchester" <rsw@eng.umd.edu>
+
+------------------------------------------------------------------------------
+
+It would be nice if I could (in the Makefile.in files) set
+the path to config.h. You have config.h ../config.h ../../config.h's all
+over the place, in the findutils-4.1 directory.
+From: "Randall S. Winchester" <rsw@eng.umd.edu>
+
+------------------------------------------------------------------------------
+
+In libc and make in aclocal.m4 I have AC_CHECK_SYMBOL, which checks for
+sys_siglist et al. Using AC_CHECK_FUNC doesn't work on some system that
+winds up caring that you reference it as a function and it is really a
+variable. My version always declares the symbol as a char *[]; if that
+ends up a bad idea, we can have it take an arg with the C decl, but that is
+a bit verbose to write if it's actually superfluous.
+From Roland McGrath.
+[I'd call it AC_CHECK_VAR, I think. -djm]
+
+------------------------------------------------------------------------------
+
+In a future version (after 2.2), make AC_PROG_{CC,RANLIB,anything else}
+use AC_CHECK_TOOL.
+From Roland McGrath.
+
+------------------------------------------------------------------------------
+
+ ls -lt configure configure.in | sort
+doesn't work right if configure.in is from a symlink farm, where the
+symlink has either a timestamp of it's own, or under BSD 4.4, it has
+the timestamp of the current directory, neither of which
+helps. Changing it to
+ ls -Llt configure configure.in | sort
+works for me, though I don't know how portable that is
+_Mark_ <eichin@cygnus.com>
+
+------------------------------------------------------------------------------
+
+Here is the thing I would like the most;
+AC_PKG_WITH(PACKAGE, HELP_STRING, PACKAGE-ROOT, PACKAGE-LIBS, PACKAGE-DEFS,
+ PACKAGE-CCPFLAGS)
+like
+
+AC_PKG_WITH(kerberos,,/usr/local/athena,-lkrb -ldes,[KERBEROS KRB4
+CRYPT],include)
+AC_PKG_WITH(hesiod,
+[if hesiod is not in kerberos-root add --with-hesiod-root=somewhere]
+,,-lhesiod,HESIOD,,)
+AC_PKG_WITH(glue,,,-lglue,GLUE,,)
+AC_PKG_WITH(bind,,/usr/local/bind, [lib/resolv.a lib/lib44bsd.a], ,include)
+After the apropriate checks, the existance of the paths, and libs and such
+LIBS=$LIBS $PKG-LIBS
+DEFS=$DEFS $PKG-DEFS
+CPPFLAGS=$PKG-CPPFLAGS $CPPFLAGS
+$PKG-ROOT=$PKG-ROOT
+The cppflags should reverse the order so that you can have;
+-I/usr/local/bind/include -I/usr/local/athena/include
+and
+-L/usr/local/athena/lib -lkrb -ldes /usr/local/bind/lib/libresolv.a
+as order matters.
+
+also an AC_PKG_CHK_HEADER
+and an AC_PKG_CHK_FUNCTION
+so one can give alternate paths to check for stuff ($PKG-ROOT/lib for
+example)
+From: Randall Winchester
+
+------------------------------------------------------------------------------
+
+AC_C_CROSS assumes that configure was
+called like 'CC=target-gcc; ./configure'. I want to write a package
+that has target dependend libraries and host dependend tools. So I
+dont't like to lose the distinction between CC and [G]CC_FOR_TARGET.
+AC_C_CROSS should check for equality of target and host.
+
+It would be great if
+
+GCC_FOR_TARGET
+AR_FOR_TARGET
+RANLIB_FOR_TARGET
+
+would be set automatically if host != target.
+AC_LANG_CROSS_C would be nice too, to check header files
+etc. with GCC_FOR_TARGET instead of CC
+
+Here is one simple test
+
+if test "x$host" != "x$target"; then
+AC_PROGRAMS_CHECK(AR_FOR_TARGET, $target-ar, $target-ar, ar)
+AC_PROGRAMS_CHECK(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib, ranlib)
+AC_PROGRAMS_CHECK(GCC_FOR_TARGET, $target-gcc, $target-gcc, gcc)
+fi
+
+This could be improved to also look for gcc in PATH, but require the
+prefix to contain the target e.g.:
+
+target=m68k-coff -->GCC_FOR_TARGET = /usr/gnu/m68k-coff/bin/gcc
+
+From: nennker@cs.tu-berlin.DE (Axel Nennker)
+
+------------------------------------------------------------------------------
+
+The problem occurs with the following libc functions in SunOS 5.4:
+
+ fnmatch glob globfree regcomp regexec regerror regfree wordexp wordfree
+
+It also occurs with a bunch more libposix4 functions that most people
+probably aren't worried about yet, e.g. shm_open.
+
+All these functions fail with errno set to ENOSYS (89)
+``Operation not applicable''.
+
+Perhaps autoconf should have a
+specific macro for fnmatch, another for glob+globfree, another for
+regcomp+regexec+regerror+regfree, and another for wordexp+wordfree.
+This wouldn't solve the problem in general, but it should work for
+Solaris 2.4. Or autoconf could limit itself to fnmatch and regcomp,
+the only two functions that I know have been a problem so far.
+
+From Paul Eggert.
+
+------------------------------------------------------------------------------
+
+Make easy macros for checking for X functions and libraries.
+
+------------------------------------------------------------------------------
+
+We probably shouldn't cache a path for INSTALL within a source
+directory, because that will break other packages using the cache if
+that directory is removed.
+
+------------------------------------------------------------------------------
+
+Document this trick:
+
+>> Half my time these days seems to be spent porting
+>> configure.in files to new OS releases.) Alas, there doesn't seem to
+>> be any way to turn off caching (with a configure.in directive).
+
+define([AC_CACHE_LOAD], )dnl
+define([AC_CACHE_SAVE], )dnl
+AC_INIT(whatever)
+ ... rest of configure.in ...
+
+------------------------------------------------------------------------------
+
+Testing for ANSI header files (AC_HEADER_STDC) fails under linux when
+using the latest libraries (libc-4.6.30, at least libc-4.6.27 works
+ok) when LC_CTYPE is set to ISO-8859-1. The islower/toupper test
+reports errors.
+Anyway, adding a line like
+if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+to the configure script can solve the problem.
+From: tom@vlsivie.tuwien.ac.AT (Thomas Winder)
+
+------------------------------------------------------------------------------
+
+A number of people have tried to fix configuration problems by editing
+acconfig.h. (Despite comments at the top of the file.) I think they're
+confused because anything.h looks like a regular source file name.
+Maybe acconfig.h could be called acconfig.extra or something?
+From: kb@cs.umb.edu (K. Berry)
+
+------------------------------------------------------------------------------
+
+Using the macro AC_CHECK_LIB, if the library name contains a dot (which is
+the case of the library complib.sgimath on Irix 5.x) a syntax error occurs
+because the corresponding cache variable name contains a dot.
+Should dots be converted to underlines in variable names by autoconf?
+From: Frederic.DEvernay@sophia.inria.fr (Frederic Devernay)
------------------------------------------------------------------------------
#undef C_ALLOCA
/* Define if type char is unsigned and you are not using gcc. */
+#ifndef __CHAR_UNSIGNED__
#undef __CHAR_UNSIGNED__
+#endif
/* Define if the closedir function returns void instead of int. */
#undef CLOSEDIR_VOID
/* Define if the `getloadavg' function needs to be run setuid or setgid. */
#undef GETLOADAVG_PRIVILEGED
+/* Define if the `getpgrp' function takes no argument. */
+#undef GETPGRP_VOID
+
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
dnl Parameterized macros.
dnl Requires GNU m4.
dnl This file is part of Autoconf.
-dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+dnl Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
divert(-1)dnl Throw away output until AC_INIT is called.
changequote([, ])
-define(AC_ACVERSION, 2.1)
+define(AC_ACVERSION, 2.4)
dnl Some old m4's don't support m4exit. But they provide
dnl equivalent functionality by core dumping because of the
dnl m4 output diversions. We let m4 output them all in order at the end,
dnl except that we explicitly undivert AC_DIVERSION_SED.
-dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #!/bin/sh line
+dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #! /bin/sh line
define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings
define(AC_DIVERSION_INIT, 2)dnl initialization code
define(AC_DIVERSION_SED, 3)dnl variable substitutions in config.status
dnl for users of AC_REVISION.
dnl AC_INIT_BINSH()
AC_DEFUN(AC_INIT_BINSH,
-[#!/bin/sh
+[#! /bin/sh
])
dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
AC_DEFUN(AC_INIT_PREPARE,
-[trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
+[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
-# 0 unused; standard input
+# 0 standard input
# 1 file creation
# 2 errors and warnings
-# 3 unused; some systems may open it to /dev/tty
-define(AC_FD_MSG, 4)dnl
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+define(AC_FD_MSG, 6)dnl
[#] AC_FD_MSG checking for... messages and results
define(AC_FD_CC, 5)dnl
[#] AC_FD_CC compiler messages saved in config.log
ac_help="$ac_help
[$2]"
AC_DIVERT_POP()dnl
-[#] Check whether --enable-$1 or --disable-$1 was given.
-enableval="[$enable_]patsubst($1, -, _)"
+[#] Check whether --enable-[$1] or --disable-[$1] was given.
+enableval="[$enable_]patsubst([$1], -, _)"
if test -n "$enableval"; then
ifelse([$3], , :, [$3])
ifelse([$4], , , [else
ac_help="$ac_help
[$2]"
AC_DIVERT_POP()dnl
-[#] Check whether --with-$1 or --without-$1 was given.
-withval="[$with_]patsubst($1, -, _)"
+[#] Check whether --with-[$1] or --without-[$1] was given.
+withval="[$with_]patsubst([$1], -, _)"
if test -n "$withval"; then
ifelse([$3], , :, [$3])
ifelse([$4], , , [else
AC_CANONICAL_BUILD
test "$host_alias" != "$target_alias" &&
test "$program_prefix$program_suffix$program_transform_name" = \
- NONENONEs,x,x, && program_prefix=${target_alias}-
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
])
dnl Subroutines of AC_CANONICAL_SYSTEM.
AC_MSG_CHECKING(host system type)
+dnl Set host_alias.
host_alias=$host
case "$host_alias" in
NONE)
esac ;;
esac
+dnl Set the other host vars.
host=`$ac_config_sub $host_alias`
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_MSG_CHECKING(target system type)
+dnl Set target_alias.
target_alias=$target
case "$target_alias" in
NONE)
esac ;;
esac
+dnl Set the other target vars.
target=`$ac_config_sub $target_alias`
target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_MSG_CHECKING(build system type)
+dnl Set build_alias.
build_alias=$build
case "$build_alias" in
NONE)
esac ;;
esac
+dnl Set the other build vars.
build=`$ac_config_sub $build_alias`
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
dnl AC_CACHE_SAVE()
define(AC_CACHE_SAVE,
-[cat > $cache_file.$$ <<\EOF
+[cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
EOF
changequote(, )dnl
dnl Allow a site initialization script to override cache values.
-# Ultrix sh set writes to stderr and can't be redirected directly.
-# Ultrix sh set also returns variables that were read in from the config file
-# with their high bit set.
-(set) 2>&1 | tr '\201-\377' '\001-\177' |
- sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
- >> $cache_file.$$
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
changequote([, ])dnl
-if cmp -s $cache_file $cache_file.$$; then
- true
+if cmp -s $cache_file confcache; then
+ :
else
if test -w $cache_file; then
echo "updating cache $cache_file"
- cat $cache_file.$$ > $cache_file
+ cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
- diff $cache_file $cache_file.$$
fi
fi
-rm -f $cache_file.$$
+rm -f confcache
])
dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
[dnl We used to use the below line, but it fails if the 1st arg is a
dnl shell variable, so we need the eval.
dnl if test "${$1+set}" = set; then
-if eval "test \"`echo '${'$1'+set}'`\" = set"; then
+dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
+if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
else
$2
])
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
-dnl The 'tr' is to fix more Ultrix sh brain damage
define(AC_DEFINE_UNQUOTED,
-[cat <<EOF | tr '\201-\377' '\001-\177' >> confdefs.h
+[cat >> confdefs.h <<EOF
[#define] $1 ifelse($#, 2, [$2], 1)
EOF
])
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC'
-ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC 2>&AC_FD_CC'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
])
dnl AC_LANG_CPLUSPLUS()
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC'
-ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC 2>&AC_FD_CC'
+ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
])
dnl Push the current language on a stack.
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
])])
+dnl Internal subroutine.
+AC_DEFUN(AC_CHECK_TOOL_PREFIX,
+[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+if test $host != $build; then
+ ac_tool_prefix=${host_alias}-
+else
+ ac_tool_prefix=
+fi
+])
+
+dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND])
+AC_DEFUN(AC_CHECK_TOOL,
+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
+AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
+ ifelse([$3], , [$2], ))
+ifelse([$3], , , [
+if test -z "$ac_cv_prog_$1"; then
+if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG($1, $2, $2, $3)
+else
+ $1="$3"
+fi
+fi])
+])
+
dnl Guess the value for the `prefix' variable by looking for
dnl the argument program along PATH and taking its parent.
dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
changequote(<<, >>)dnl
define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
changequote([, ])dnl
+AC_MSG_CHECKING([for prefix by ])
AC_PATH_PROG(AC_VAR_NAME, $1)
changequote(<<, >>)dnl
if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
- prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'`
+ prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
changequote([, ])dnl
fi
fi
[AC_MSG_CHECKING([for -l$1])
AC_CACHE_VAL(ac_cv_lib_$1,
[ac_save_LIBS="$LIBS"
-LIBS="$LIBS -l$1 $5"
+LIBS="-l$1 $5 $LIBS"
AC_TRY_LINK(, [$2()], eval "ac_cv_lib_$1=yes", eval "ac_cv_lib_$1=no")dnl
LIBS="$ac_save_LIBS"
])dnl
ac_tr_lib=HAVE_LIB`echo $1 | tr '[a-z]' '[A-Z]'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_lib)
- LIBS="$LIBS -l$1"
+ LIBS="-l$1 $LIBS"
], [$3])
else
AC_MSG_RESULT(no)
AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
AC_CACHE_VAL(AC_CV_NAME,
[ac_save_LIBS="$LIBS"
-LIBS="$LIBS -l[]AC_LIB_NAME[] $4"
+LIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)dnl
LIBS="$ac_save_LIBS"
])dnl
if test "$AC_CV_NAME" = yes; then
ifelse([$2], ,
[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
- LIBS="$LIBS -l[]AC_LIB_NAME[]"
+ LIBS="-l[]AC_LIB_NAME[] $LIBS"
], [$2])
ifelse([$3], , , [else
$3
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(ac_cv_func_$1,
[AC_TRY_LINK(
-[#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
+dnl which includes <sys/select.h> which contains a prototype for
+dnl select. Similarly for bzero.
+[/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $1(); below. */
+#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
extern "C"
if (!f) exit(1);
fprintf(f, "%d\n", sizeof($1));
exit(0);
-}], AC_CV_NAME=`cat conftestval`)])dnl
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0)])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine([AC_TYPE_NAME])dnl
define(AC_OUTPUT,
[trap '' 1 2 15
AC_CACHE_SAVE
-trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
-#!/bin/sh
+#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
])dnl
-ifdef([AC_LIST_HEADER],
-[trap 'rm -fr $1 AC_LIST_HEADER conftest*; exit 1' 1 2 15],
-[trap 'rm -f $1; exit 1' 1 2 15])
+changequote(<<, >>)dnl
+ifdef(<<AC_LIST_HEADER>>,
+<<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
+<<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
+changequote([, ])dnl
AC_OUTPUT_FILES($1)
ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
dnl config.status should not do recursion.
ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
])dnl
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
changequote(, )dnl
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
# The dest file is in a subdirectory.
test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
- ac_dest_dir_suffix="/$ac_dest_dir"
+ ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dest_dir_suffix.
changequote(, )dnl
ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
done
])
-This is a subroutine of AC_OUTPUT. It is called after running config.status.
+dnl This is a subroutine of AC_OUTPUT.
+dnl It is called after running config.status.
dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
define(AC_OUTPUT_SUBDIRS,
[
# Make the cache file name correct relative to the subdirectory.
changequote(, )dnl
# A "../" for each directory in /$ac_config_dir.
- ac_dots=`echo /$ac_config_dir|sed 's%/[^/]*%../%g'`
+ ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
changequote([, ])dnl
case "$cache_file" in
/*) ac_sub_cache_file=$cache_file ;;
*) # Relative path.
ac_sub_cache_file="$ac_dots$cache_file" ;;
esac
+ifdef([AC_PROVIDE_AC_PROG_INSTALL],
+ [ case "$ac_given_INSTALL" in
+changequote(, )dnl
+ [/$]*) INSTALL="$ac_given_INSTALL" ;;
+changequote([, ])dnl
+ *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+ esac
+])dnl
echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
# The eval makes quoting arguments work.
dnl Macros that test for specific features.
dnl This file is part of Autoconf.
-dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+dnl Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
else
AC_MSG_CHECKING(whether cc understands -c and -o together)
fi
-set dummy $CC; ac_cc=[$]2
+set dummy $CC; ac_cc="`echo [$]2 |
+changequote(, )dnl
+ sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
+changequote([, ])dnl
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
[eval ac_cv_prog_cc_${ac_cc}_c_o=no
echo 'foo(){}' > conftest.c
dnl Define SET_MAKE to set ${MAKE} if make doesn't.
AC_DEFUN(AC_PROG_MAKE_SET,
-[AC_MSG_CHECKING(whether ${MAKE-make} sets \$MAKE)
+[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
set dummy ${MAKE-make}; ac_make=[$]2
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
[cat > conftestmake <<\EOF
AC_DEFUN(AC_PROG_RANLIB,
[AC_CHECK_PROG(RANLIB, ranlib, ranlib, :)])
-dnl Check for mawk first since it's said to be faster.
+dnl Check for mawk first since it's generally faster.
AC_DEFUN(AC_PROG_AWK,
[AC_CHECK_PROGS(AWK, mawk gawk nawk awk, )])
AC_TRY_CPP([#include <assert.h>
Syntax Error], , CPP=/lib/cpp))
ac_cv_prog_CPP="$CPP"])dnl
+ CPP="$ac_cv_prog_CPP"
+else
+ ac_cv_prog_CPP="$CPP"
fi
-CPP="$ac_cv_prog_CPP"
AC_MSG_RESULT($CPP)
AC_SUBST(CPP)dnl
])
flex*) ac_lib=fl ;;
*) ac_lib=l ;;
esac
- AC_CHECK_LIB($ac_lib, main, LEXLIB="-l$ac_lib")
+ AC_CHECK_LIB($ac_lib, yywrap, LEXLIB="-l$ac_lib")
fi
AC_SUBST(LEXLIB)])
+dnl Check if lex declares yytext as a char * by default, not a char[].
+undefine([AC_DECL_YYTEXT])
AC_DEFUN(AC_DECL_YYTEXT,
[AC_REQUIRE_CPP()dnl
AC_REQUIRE([AC_PROG_LEX])dnl
-AC_MSG_CHECKING(for yytext declaration)
-AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer,
-[# POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-#
-# The minimal lex program is just a single line: %%. But some broken lexes
+AC_MSG_CHECKING(lex output file root)
+AC_CACHE_VAL(ac_cv_prog_lex_root,
+[# The minimal lex program is just a single line: %%. But some broken lexes
# (Solaris, I think it was) want two %% lines, so accommodate them.
-ac_cv_prog_lex_yytext_pointer=no
- echo '%%
+echo '%%
%%' | $LEX
if test -f lex.yy.c; then
- LEX_OUTPUT_ROOT=lex.yy
+ ac_cv_prog_lex_root=lex.yy
elif test -f lexyy.c; then
- LEX_OUTPUT_ROOT=lexyy
+ ac_cv_prog_lex_root=lexyy
else
- AC_MSG_ERROR(cannot find output from $LEX, giving up)
-fi
-echo 'extern char *yytext; main () { exit (0); }' >>$LEX_OUTPUT_ROOT.c
+ AC_MSG_ERROR(cannot find output from $LEX; giving up)
+fi])dnl
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+AC_MSG_RESULT($ac_cv_prog_lex_root)
+AC_SUBST(LEX_OUTPUT_ROOT)dnl
+
+AC_MSG_CHECKING(whether yytext is a pointer)
+AC_CACHE_VAL(ac_cv_prog_lex_yytext_pointer,
+[# POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
-AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, ac_cv_prog_lex_yytext_pointer=yes)
+AC_TRY_LINK(`cat $LEX_OUTPUT_ROOT.c`, , ac_cv_prog_lex_yytext_pointer=yes)
LIBS="$ac_save_LIBS"
rm -f "${LEX_OUTPUT_ROOT}.c"])dnl
AC_MSG_RESULT($ac_cv_prog_lex_yytext_pointer)
if test $ac_cv_prog_lex_yytext_pointer = yes; then
AC_DEFINE(YYTEXT_POINTER)
fi
-AC_SUBST(LEX_OUTPUT_ROOT)dnl
])
AC_DEFUN(AC_PROG_INSTALL,
AC_CACHE_VAL(ac_cv_path_install,
[ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- case "$ac_dir" in
- ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall installbsd scoinst install; do
done
IFS="$ac_save_ifs"
# As a last resort, use the slow shell script.
+dnl FIXME We probably shouldn't cache a path within a source directory,
+dnl because that will break other packages using the cache if
+dnl that directory is removed.
test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"])dnl
INSTALL="$ac_cv_path_install"
fi
AC_CACHE_VAL(ac_cv_header_stat_broken,
[AC_EGREP_CPP([You lose], [#include <sys/types.h>
#include <sys/stat.h>
-#ifdef S_ISBLK
+
+#if defined(S_ISBLK) && defined(S_IFDIR)
# if S_ISBLK (S_IFDIR)
You lose.
# endif
-# ifdef S_IFCHR
-# if S_ISBLK (S_IFCHR)
+#endif
+
+#if defined(S_ISBLK) && defined(S_IFCHR)
+# if S_ISBLK (S_IFCHR)
You lose.
-# endif
# endif
#endif
-#ifdef S_ISLNK
+#if defined(S_ISLNK) && defined(S_IFREG)
# if S_ISLNK (S_IFREG)
You lose.
# endif
#endif
-#ifdef S_ISSOCK
+#if defined(S_ISSOCK) && defined(S_IFREG)
# if S_ISSOCK (S_IFREG)
You lose.
# endif
#ifdef signal
#undef signal
#endif
-extern void (*signal ()) ();],
+#ifdef __cplusplus
+extern "C"
+#endif
+void (*signal ()) ();],
[int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)])dnl
AC_MSG_RESULT($ac_cv_type_signal)
AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal)
fi
])
+AC_DEFUN(AC_FUNC_GETPGRP,
+[AC_MSG_CHECKING(whether getpgrp takes no argument)
+AC_CACHE_VAL(ac_cv_func_getpgrp_void,
+[AC_TRY_RUN([
+/*
+ * If this system has a BSD-style getpgrp(),
+ * which takes a pid argument, exit unsuccessfully.
+ *
+ * Snarfed from Chet Ramey's bash pgrp.c test program
+ */
+#include <stdio.h>
+#include <sys/types.h>
+
+int pid;
+int pg1, pg2, pg3, pg4;
+int ng, np, s, child;
+
+main()
+{
+ pid = getpid();
+ pg1 = getpgrp(0);
+ pg2 = getpgrp();
+ pg3 = getpgrp(pid);
+ pg4 = getpgrp(1);
+
+ /*
+ * If all of these values are the same, it's pretty sure that
+ * we're on a system that ignores getpgrp's first argument.
+ */
+ if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
+ exit(0);
+
+ child = fork();
+ if (child < 0)
+ exit(1);
+ else if (child == 0) {
+ np = getpid();
+ /*
+ * If this is Sys V, this will not work; pgrp will be
+ * set to np because setpgrp just changes a pgrp to be
+ * the same as the pid.
+ */
+ setpgrp(np, pg1);
+ ng = getpgrp(0); /* Same result for Sys V and BSD */
+ if (ng == pg1) {
+ exit(1);
+ } else {
+ exit(0);
+ }
+ } else {
+ wait(&s);
+ exit(s>>8);
+ }
+}
+], ac_cv_func_getpgrp_void=yes, ac_cv_func_getpgrp_void=no,
+ AC_MSG_ERROR(cannot check getpgrp if cross compiling))
+])
+AC_MSG_RESULT($ac_cv_func_getpgrp_void)
+if test $ac_cv_func_getpgrp_void = yes; then
+ AC_DEFINE(GETPGRP_VOID)
+fi
+])
+
AC_DEFUN(AC_FUNC_VPRINTF,
[AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF))
if test "$ac_cv_func_vprintf" != yes; then
AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
AC_MSG_CHECKING(for working vfork)
AC_CACHE_VAL(ac_cv_func_vfork,
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
+[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <signal.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_VFORK_H
#include <vfork.h>
#endif
-/* On sparc systems, changes by the child to local and incoming
+/* On some sparc systems, changes by the child to local and incoming
argument registers are propagated back to the parent.
The compiler is told about this with #include <vfork.h>,
but some compilers (e.g. gcc -O) don't grok <vfork.h>.
}
}
}
-static int signalled;
-static RETSIGTYPE catch (s) int s; { signalled = 1; }
main() {
pid_t parent = getpid ();
pid_t child;
sparc_address_test ();
- signal (SIGINT, catch);
-
child = vfork ();
if (child == 0) {
This test uses lots of local variables, at least
as many local variables as main has allocated so far
including compiler temporaries. 4 locals are enough for
- gcc 1.40.3 on a sparc, but we use 8 to be safe.
+ gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
A buggy compiler should reuse the register of parent
for one of the local variables, since it will think that
parent can't possibly be used any more in this routine.
|| p != p5 || p != p6 || p != p7)
_exit(1);
- /* On some systems (e.g. SunOS 5.2), if the parent is catching
- a signal, the child ignores the signal before execing,
- and the parent later receives that signal, the parent dumps core.
- Test for this by ignoring SIGINT in the child. */
- signal (SIGINT, SIG_IGN);
-
/* On some systems (e.g. IRIX 3.3),
vfork doesn't separate parent from child file descriptors.
If the child closes a descriptor before it execs or exits,
/* Did the vfork/compiler bug occur? */
|| parent != getpid()
- /* Did the signal handling bug occur? */
- || kill(parent, SIGINT) != 0
- || signalled != 1
-
/* Did the file descriptor bug occur? */
|| fstat(fileno(stdout), &st) != 0
);
/* Use a field that we can force nonzero --
voluntary context switches.
For systems like NeXT and OSF/1 that don't set it,
- also use the system CPU time. */
+ also use the system CPU time. And page faults (I/O) for Linux. */
r.ru_nvcsw = 0;
r.ru_stime.tv_sec = 0;
r.ru_stime.tv_usec = 0;
+ r.ru_majflt = r.ru_minflt = 0;
switch (fork()) {
case 0: /* Child. */
sleep(1); /* Give up the CPU. */
case -1: _exit(0); /* What can we do? */
default: /* Parent. */
wait3(&i, 0, &r);
- sleep(1); /* Avoid "text file busy" from rm on fast HP-UX machines. */
- exit(r.ru_nvcsw == 0
+ sleep(2); /* Avoid "text file busy" from rm on fast HP-UX machines. */
+ exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
}
}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])dnl
], ac_cv_os_cray=yes, ac_cv_os_cray=no)])dnl
AC_MSG_RESULT($ac_cv_os_cray)
if test $ac_cv_os_cray = yes; then
-AC_CHECK_FUNC(_getb67, AC_DEFINE(CRAY_STACKSEG_END, _getb67),
-AC_CHECK_FUNC(GETB67, AC_DEFINE(CRAY_STACKSEG_END, GETB67),
-AC_CHECK_FUNC(getb67, AC_DEFINE(CRAY_STACKSEG_END, getb67))))
+for ac_func in _getb67 GETB67 getb67; do
+ AC_CHECK_FUNC($ac_func, [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func)
+ break])
+done
fi
AC_MSG_CHECKING(stack direction for C alloca)
])
AC_DEFUN(AC_FUNC_GETLOADAVG,
-[# Some definitions of getloadavg require that the program be installed setgid.
-NEED_SETGID=false
-AC_SUBST(NEED_SETGID)dnl
-ac_have_func=no
+[ac_have_func=no # yes means we've found a way to get the load average.
-# Check for the 4.4BSD definition of getloadavg.
-AC_CHECK_LIB(util, getloadavg, [LIBS="$LIBS -lutil" ac_have_func=yes
# Some systems with -lutil have (and need) -lkvm as well, some do not.
-AC_CHECK_LIB(kvm, kvm_open, LIBS="$LIBS -lkvm")])
+# On Solaris, -lkvm requires nlist from -lelf, so check that first
+# to get the right answer into the cache.
+AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
+AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
+# Check for the 4.4BSD definition of getloadavg.
+AC_CHECK_LIB(util, getloadavg,
+ [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
if test $ac_have_func = no; then
-# There is a commonly available library for RS/6000 AIX.
-# Since it is not a standard part of AIX, it might be installed locally.
-ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
-AC_CHECK_LIB(getloadavg, getloadavg, LIBS="$LIBS -lgetloadavg", LIBS="$ac_save_LIBS")
+ # There is a commonly available library for RS/6000 AIX.
+ # Since it is not a standard part of AIX, it might be installed locally.
+ ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
+ AC_CHECK_LIB(getloadavg, getloadavg,
+ LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS")
fi
# Make sure it is really in the library, if we think we found it.
if test $ac_cv_func_getloadavg = yes; then
AC_DEFINE(HAVE_GETLOADAVG)
+ ac_have_func=yes
else
-ac_have_func=no
-AC_CHECK_HEADER(sys/dg_sys_info.h,
-[ac_have_func=yes AC_DEFINE(DGUX)
-AC_CHECK_LIB(dgc, dg_sys_info)])
-if test $ac_have_func = no; then
-# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
-# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
-# Irix 4.0.5F has the header but not the library.
-AC_CHECK_LIB(elf, elf_read,
- [LIBS="$LIBS -lelf" ac_have_func=yes AC_DEFINE(SVR4)
- AC_CHECK_LIB(kvm, kvm_open, LIBS="$LIBS -lkvm")])
-fi
-if test $ac_have_func = no; then
-AC_CHECK_HEADER(inq_stats/cpustats.h,
- [ac_have_func=yes AC_DEFINE(UMAX)
- AC_DEFINE(UMAX4_3)])
-fi
-if test $ac_have_func = no; then
-AC_CHECK_HEADER(sys/cpustats.h,
- [ac_have_func=yes AC_DEFINE(UMAX)])
-fi
-if test $ac_have_func = no; then
-AC_CHECK_HEADERS(mach/mach.h)
-fi
+ # Figure out what our getloadavg.c needs.
+ ac_have_func=no
+ AC_CHECK_HEADER(sys/dg_sys_info.h,
+ [ac_have_func=yes; AC_DEFINE(DGUX)
+ AC_CHECK_LIB(dgc, dg_sys_info)])
+
+ # We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
+ # uses stabs), but it is still SVR4. We cannot check for <elf.h> because
+ # Irix 4.0.5F has the header but not the library.
+ if test $ac_have_func = no && test $ac_cv_lib_elf = yes; then
+ ac_have_func=yes; AC_DEFINE(SVR4)
+ fi
-AC_CHECK_HEADER(nlist.h,
-[AC_DEFINE(NLIST_STRUCT)
-AC_MSG_CHECKING([for n_un in struct nlist])
-AC_CACHE_VAL(ac_cv_struct_nlist_n_un,
-[AC_TRY_COMPILE([#include <nlist.h>],
-[struct nlist n; n.n_un.n_name = 0;],
-ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl
-AC_MSG_RESULT($ac_cv_struct_nlist_n_un)
-if test $ac_cv_struct_nlist_n_un = yes; then
- AC_DEFINE(NLIST_NAME_UNION)
-fi
-])dnl
+ if test $ac_have_func = no; then
+ AC_CHECK_HEADER(inq_stats/cpustats.h,
+ [ac_have_func=yes; AC_DEFINE(UMAX)
+ AC_DEFINE(UMAX4_3)])
+ fi
+
+ if test $ac_have_func = no; then
+ AC_CHECK_HEADER(sys/cpustats.h,
+ [ac_have_func=yes; AC_DEFINE(UMAX)])
+ fi
+
+ if test $ac_have_func = no; then
+ AC_CHECK_HEADERS(mach/mach.h)
+ fi
-dnl FIXME two bugs here:
-dnl Hardwiring the path of getloadavg.c in the top-level directory,
-dnl and not checking whether a getloadavg from a library needs privileges.
+ AC_CHECK_HEADER(nlist.h,
+ [AC_DEFINE(NLIST_STRUCT)
+ AC_MSG_CHECKING([for n_un in struct nlist])
+ AC_CACHE_VAL(ac_cv_struct_nlist_n_un,
+ [AC_TRY_COMPILE([#include <nlist.h>],
+ [struct nlist n; n.n_un.n_name = 0;],
+ ac_cv_struct_nlist_n_un=yes, ac_cv_struct_nlist_n_un=no)])dnl
+ AC_MSG_RESULT($ac_cv_struct_nlist_n_un)
+ if test $ac_cv_struct_nlist_n_un = yes; then
+ AC_DEFINE(NLIST_NAME_UNION)
+ fi
+ ])dnl
+fi # Do not have getloadavg in system libraries.
+
+# Some definitions of getloadavg require that the program be installed setgid.
+dnl FIXME Don't hardwire the path of getloadavg.c in the top-level directory.
AC_MSG_CHECKING(whether getloadavg requires setgid)
AC_CACHE_VAL(ac_cv_func_getloadavg_setgid,
[AC_EGREP_CPP([Yowza Am I SETGID yet],
ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)])dnl
AC_MSG_RESULT($ac_cv_func_getloadavg_setgid)
if test $ac_cv_func_getloadavg_setgid = yes; then
- NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED)
+ NEED_SETGID=true; AC_DEFINE(GETLOADAVG_PRIVILEGED)
+else
+ NEED_SETGID=false
fi
+AC_SUBST(NEED_SETGID)dnl
-fi # Do not have getloadavg in system libraries.
-
-if test "$NEED_SETGID" = true; then
+if test $ac_cv_func_getloadavg_setgid = yes; then
AC_MSG_CHECKING(group of /dev/kmem)
AC_CACHE_VAL(ac_cv_group_kmem,
[changequote(, )dnl
&& t.st_mtime - s.st_mtime < 120));
}], ac_cv_func_utime_null=yes, ac_cv_func_utime_null=no,
ac_cv_func_utime_null=no)
-rm -f core])dnl
+rm -f core core.* *.core])dnl
AC_MSG_RESULT($ac_cv_func_utime_null)
if test $ac_cv_func_utime_null = yes; then
AC_DEFINE(HAVE_UTIME_NULL)
putc('\r', stdout);
exit(0); /* Non-reversed systems segv here. */
}], ac_cv_func_setvbuf_reversed=yes, ac_cv_func_setvbuf_reversed=no)
-rm -f core])dnl
+rm -f core core.* *.core])dnl
AC_MSG_RESULT($ac_cv_func_setvbuf_reversed)
if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED)
AC_DEFUN(AC_FUNC_GETMNTENT,
[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX.
-AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun",
- [AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")])
+AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
+ [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")])
AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
AC_DEFUN(AC_FUNC_STRFTIME,
[# strftime is in -lintl on SCO UNIX.
-AC_CHECK_LIB(intl, strftime, LIBS="$LIBS -lintl")
+AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
AC_DEFUN(AC_FUNC_MEMCMP,
AC_MSG_CHECKING(whether cross-compiling)
AC_CACHE_VAL(ac_cv_c_cross,
[AC_TRY_RUN([main(){return(0);}],
- ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_cross=yes)])dnl
+ ac_cv_c_cross=no, ac_cv_c_cross=yes, ac_cv_c_cross=yes)])dnl
cross_compiling=$ac_cv_c_cross
AC_MSG_RESULT($ac_cv_c_cross)
])
AC_DEFUN(AC_C_BIGENDIAN,
[AC_MSG_CHECKING(whether byte ordering is bigendian)
AC_CACHE_VAL(ac_cv_c_bigendian,
-[AC_TRY_RUN([main () {
+[ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/param.h>], [
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
+if test $ac_cv_c_bigendian = unknown; then
+AC_TRY_RUN([main () {
/* Are we little or big endian? From Harbison&Steele. */
union
{
} u;
u.l = 1;
exit (u.c[sizeof (long) - 1] == 1);
-}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)])dnl
+}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes)
+fi])dnl
AC_MSG_RESULT($ac_cv_c_bigendian)
if test $ac_cv_c_bigendian = yes; then
AC_DEFINE(WORDS_BIGENDIAN)
fi
])
+dnl Do nothing if the compiler accepts the inline keyword.
+dnl Otherwise define inline to __inline__ or __inline if one of those work,
+dnl otherwise define inline to be empty.
AC_DEFUN(AC_C_INLINE,
[AC_MSG_CHECKING([for inline])
AC_CACHE_VAL(ac_cv_c_inline,
-[if test "$GCC" = yes; then
-AC_TRY_COMPILE(, [} inline foo() {], ac_cv_c_inline=yes, ac_cv_c_inline=no)
-else
- ac_cv_c_inline=no
-fi])dnl
+[ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ AC_TRY_COMPILE(, [} $ac_kw foo() {], [ac_cv_c_inline=$ac_kw; break])
+done
+])dnl
AC_MSG_RESULT($ac_cv_c_inline)
-if test $ac_cv_c_inline = no; then
- AC_DEFINE(inline, __inline)
-fi
+case "$ac_cv_c_inline" in
+ inline | yes) ;;
+ no) AC_DEFINE(inline, ) ;;
+ *) AC_DEFINE_UNQUOTED(inline, $ac_cv_c_inline) ;;
+esac
])
AC_DEFUN(AC_C_CONST,
ac_msg="whether #! works in shell scripts"
AC_MSG_CHECKING($ac_msg)
AC_CACHE_VAL(ac_cv_sys_interpreter,
-[echo '#!/bin/cat
+[echo '#! /bin/cat
exit 69
' > conftest
chmod u+x conftest
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `make acfindx 2>/dev/null | grep -v make`
# Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
- if test ! -f $ac_im_usrlibdir/libX11.a && test -f $ac_im_libdir/libX11.a
- then
- ac_im_usrlibdir=$ac_im_libdir
- fi
+ for ac_extension in a so sl; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration.
case "$ac_im_incroot" in
/usr/include) ;;
- *) ac_x_includes="$ac_im_incroot" ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
esac
case "$ac_im_usrlibdir" in
/usr/lib | /lib) ;;
- *) ac_x_libraries="$ac_im_usrlibdir" ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
esac
fi
cd ..
# See if we find them without any special options.
# Don't add to $LIBS permanently.
ac_save_LIBS="$LIBS"
-LIBS="$LIBS -l$x_direct_test_library"
+LIBS="-l$x_direct_test_library $LIBS"
AC_TRY_LINK(, [${x_direct_test_function}()],
[LIBS="$ac_save_LIBS" no_x= ac_x_libraries=],
[LIBS="$ac_save_LIBS"
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
- AC_CHECK_LIB(ICE, IceConnectionNumbers,
+ AC_CHECK_LIB(ICE, IceConnectionNumber,
[X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"])
LDFLAGS="$ac_save_LDFLAGS"
dnl ### Checks for UNIX variants
dnl These are kludges which should be replaced by a single POSIX check.
+dnl They aren't cached, to discourage their use.
AC_DEFUN(AC_AIX,
])
AC_DEFUN(AC_ISC_POSIX,
-[AC_BEFORE([$0], [AC_TRY_LINK])dnl
+[AC_BEFORE([$0], [AC_TRY_COMPILE])dnl
AC_BEFORE([$0], [AC_TRY_LINK])dnl
AC_BEFORE([$0], [AC_TRY_RUN])dnl
AC_MSG_CHECKING(for POSIXized ISC)
], [AC_MSG_RESULT(yes); XENIX=yes], [AC_MSG_RESULT(no); XENIX=])
if test "$XENIX" = yes; then
# Make sure -ldir precedes -lx.
- test $ac_header_dirent = dirent.h && LIBS="$LIBS -ldir"
+ test $ac_header_dirent = dirent.h && LIBS="-ldir $LIBS"
LIBS="$LIBS -lx"
fi
])
AC_DEFUN(AC_DYNIX_SEQ,
[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT])dnl
-AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")
+AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")
])
AC_DEFUN(AC_IRIX_SUN,
[AC_OBSOLETE([$0], [; instead use AC_FUNC_GETMNTENT or AC_CHECK_LIB(sun, getpwnam)])dnl
-AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun")
+AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS")
])
AC_DEFUN(AC_SCO_INTL,
[AC_OBSOLETE([$0], [; instead use AC_FUNC_STRFTIME])dnl
-AC_CHECK_LIB(intl, strftime, LIBS="$LIBS -lintl")
+AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
])
This is Info file autoconf.info, produced by Makeinfo-1.55 from the
-input file ./autoconf.texi.
+input file autoconf.texi.
START-INFO-DIR-ENTRY
* Autoconf: (autoconf). Create source code configuration scripts.
END-INFO-DIR-ENTRY
+ Autoconf: Creating Automatic Configuration Scripts, by David
+MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
package.
\1f
Indirect:
-autoconf.info-1: 1085
-autoconf.info-2: 51012
-autoconf.info-3: 100216
-autoconf.info-4: 150192
-autoconf.info-5: 198408
+autoconf.info-1: 1159
+autoconf.info-2: 51142
+autoconf.info-3: 99599
+autoconf.info-4: 149475
+autoconf.info-5: 197599
\1f
Tag Table:
(Indirect)
-Node: Top\7f1085
-Node: Introduction\7f9210
-Node: Making configure Scripts\7f13050
-Node: Writing configure.in\7f16115
-Node: Invoking autoscan\7f19815
-Node: Invoking ifnames\7f22120
-Node: Invoking autoconf\7f23610
-Node: Invoking autoreconf\7f25448
-Node: Setup\7f27768
-Node: Input\7f28654
-Node: Output\7f30270
-Node: Makefile Substitutions\7f33020
-Node: Preset Output Variables\7f34602
-Node: Build Directories\7f37840
-Node: Automatic Remaking\7f39566
-Node: Configuration Headers\7f41632
-Node: Header Templates\7f43999
-Node: Invoking autoheader\7f45178
-Node: Subdirectories\7f48265
-Node: Default Prefix\7f49608
-Node: Versions\7f51012
-Node: Existing Tests\7f52914
-Node: Alternative Programs\7f54379
-Node: Particular Programs\7f55043
-Node: Generic Programs\7f60893
-Node: Libraries\7f62570
-Node: Library Functions\7f64399
-Node: Particular Functions\7f64957
-Node: Generic Functions\7f70704
-Node: Header Files\7f72545
-Node: Particular Headers\7f73104
-Node: Generic Headers\7f80075
-Node: Structures\7f81375
-Node: Typedefs\7f83612
-Node: Particular Typedefs\7f84116
-Node: Generic Typedefs\7f85316
-Node: Compiler Characteristics\7f85759
-Node: System Services\7f88215
-Node: UNIX Variants\7f90536
-Node: Writing Tests\7f92555
-Node: Examining Declarations\7f94327
-Node: Examining Syntax\7f96793
-Node: Examining Libraries\7f97848
-Node: Run Time\7f100216
-Node: Test Programs\7f101177
-Node: Guidelines\7f103712
-Node: Test Functions\7f104901
-Node: Portable Shell\7f106444
-Node: Testing Values and Files\7f108096
-Node: Multiple Cases\7f109751
-Node: Language Choice\7f110949
-Node: Results\7f112507
-Node: Defining Symbols\7f113266
-Node: Setting Output Variables\7f116275
-Node: Caching Results\7f118121
-Node: Cache Variable Names\7f120023
-Node: Cache Files\7f121572
-Node: Printing Messages\7f123357
-Node: Writing Macros\7f126644
-Node: Macro Definitions\7f127263
-Node: Macro Names\7f128368
-Node: Quoting\7f130819
-Node: Dependencies Between Macros\7f132721
-Node: Prerequisite Macros\7f133353
-Node: Suggested Ordering\7f134808
-Node: Obsolete Macros\7f136338
-Node: Manual Configuration\7f137562
-Node: Specifying Names\7f138471
-Node: Canonicalizing\7f140343
-Node: System Type Variables\7f141657
-Node: Using System Type\7f142404
-Node: Site Configuration\7f143684
-Node: External Software\7f144457
-Node: Package Options\7f146922
-Node: Site Details\7f148978
-Node: Transforming Names\7f150192
-Node: Transformation Options\7f151371
-Node: Transformation Examples\7f151837
-Node: Transformation Rules\7f153405
-Node: Site Defaults\7f154814
-Node: Invoking configure\7f157976
-Node: Basic Installation\7f158917
-Node: Compilers and Options\7f161239
-Node: Build Directory\7f161881
-Node: Installation Names\7f162582
-Node: Optional Features\7f163500
-Node: System Type\7f164270
-Node: Sharing Defaults\7f165292
-Node: Operation Controls\7f165916
-Node: Invoking config.status\7f166780
-Node: Questions\7f170168
-Node: Distributing\7f170700
-Node: Why GNU m4\7f171826
-Node: Bootstrapping\7f172639
-Node: Why Not Imake\7f173255
-Node: Upgrading\7f177836
-Node: Changed File Names\7f179357
-Node: Changed Makefiles\7f180093
-Node: Changed Macros\7f181173
-Node: Invoking autoupdate\7f182420
-Node: Changed Results\7f184011
-Node: Changed Macro Writing\7f186113
-Node: History\7f187376
-Node: Genesis\7f188083
-Node: Exodus\7f189256
-Node: Leviticus\7f192305
-Node: Numbers\7f193828
-Node: Deuteronomy\7f195744
-Node: Old Macro Names\7f198408
-Node: Environment Variable Index\7f201457
-Node: Output Variable Index\7f202459
-Node: Preprocessor Symbol Index\7f206540
-Node: Macro Index\7f211348
+Node: Top\7f1159
+Node: Introduction\7f9298
+Node: Making configure Scripts\7f13138
+Node: Writing configure.in\7f16203
+Node: Invoking autoscan\7f19903
+Node: Invoking ifnames\7f22208
+Node: Invoking autoconf\7f23698
+Node: Invoking autoreconf\7f25536
+Node: Setup\7f27856
+Node: Input\7f28742
+Node: Output\7f30465
+Node: Makefile Substitutions\7f33215
+Node: Preset Output Variables\7f34804
+Node: Build Directories\7f38043
+Node: Automatic Remaking\7f39676
+Node: Configuration Headers\7f41762
+Node: Header Templates\7f44129
+Node: Invoking autoheader\7f45308
+Node: Subdirectories\7f48395
+Node: Default Prefix\7f49738
+Node: Versions\7f51142
+Node: Existing Tests\7f53046
+Node: Alternative Programs\7f54511
+Node: Particular Programs\7f55175
+Node: Generic Programs\7f61025
+Node: Libraries\7f63534
+Node: Library Functions\7f65363
+Node: Particular Functions\7f65921
+Node: Generic Functions\7f72205
+Node: Header Files\7f74046
+Node: Particular Headers\7f74605
+Node: Generic Headers\7f81576
+Node: Structures\7f82876
+Node: Typedefs\7f85113
+Node: Particular Typedefs\7f85617
+Node: Generic Typedefs\7f86817
+Node: Compiler Characteristics\7f87260
+Node: System Services\7f89744
+Node: UNIX Variants\7f92093
+Node: Writing Tests\7f94112
+Node: Examining Declarations\7f96078
+Node: Examining Syntax\7f98544
+Node: Examining Libraries\7f99599
+Node: Run Time\7f102156
+Node: Test Programs\7f103117
+Node: Guidelines\7f105652
+Node: Test Functions\7f106841
+Node: Portable Shell\7f108384
+Node: Testing Values and Files\7f110321
+Node: Multiple Cases\7f111976
+Node: Language Choice\7f113174
+Node: Results\7f114732
+Node: Defining Symbols\7f115491
+Node: Setting Output Variables\7f118500
+Node: Caching Results\7f120346
+Node: Cache Variable Names\7f122248
+Node: Cache Files\7f123797
+Node: Printing Messages\7f125582
+Node: Writing Macros\7f128869
+Node: Macro Definitions\7f129488
+Node: Macro Names\7f130593
+Node: Quoting\7f133044
+Node: Dependencies Between Macros\7f134946
+Node: Prerequisite Macros\7f135578
+Node: Suggested Ordering\7f137033
+Node: Obsolete Macros\7f138563
+Node: Manual Configuration\7f139787
+Node: Specifying Names\7f140686
+Node: Canonicalizing\7f142558
+Node: System Type Variables\7f143872
+Node: Using System Type\7f144619
+Node: Site Configuration\7f146066
+Node: External Software\7f146839
+Node: Package Options\7f149475
+Node: Site Details\7f151699
+Node: Transforming Names\7f152922
+Node: Transformation Options\7f154100
+Node: Transformation Examples\7f154566
+Node: Transformation Rules\7f156134
+Node: Site Defaults\7f157543
+Node: Invoking configure\7f161327
+Node: Basic Installation\7f162276
+Node: Compilers and Options\7f164856
+Node: Multiple Architectures\7f165505
+Node: Installation Names\7f166491
+Node: Optional Features\7f167416
+Node: System Type\7f168186
+Node: Sharing Defaults\7f169208
+Node: Operation Controls\7f169832
+Node: Invoking config.status\7f170707
+Node: Questions\7f174095
+Node: Distributing\7f174627
+Node: Why GNU m4\7f175753
+Node: Bootstrapping\7f176566
+Node: Why Not Imake\7f177182
+Node: Upgrading\7f181591
+Node: Changed File Names\7f183112
+Node: Changed Makefiles\7f183848
+Node: Changed Macros\7f184944
+Node: Invoking autoupdate\7f186191
+Node: Changed Results\7f187782
+Node: Changed Macro Writing\7f189884
+Node: History\7f191147
+Node: Genesis\7f191854
+Node: Exodus\7f193027
+Node: Leviticus\7f196076
+Node: Numbers\7f197599
+Node: Deuteronomy\7f199515
+Node: Old Macro Names\7f202179
+Node: Environment Variable Index\7f205228
+Node: Output Variable Index\7f206230
+Node: Preprocessor Symbol Index\7f210311
+Node: Macro Index\7f215181
\1f
End Tag Table
This is Info file autoconf.info, produced by Makeinfo-1.55 from the
-input file ./autoconf.texi.
+input file autoconf.texi.
START-INFO-DIR-ENTRY
* Autoconf: (autoconf). Create source code configuration scripts.
END-INFO-DIR-ENTRY
+ Autoconf: Creating Automatic Configuration Scripts, by David
+MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
package.
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
-package. This is edition 2.1, for Autoconf version 2.1.
+package. This is edition 2.3, for Autoconf version 2.3.
* Menu:
Substitutions in Makefiles
* Preset Output Variables:: Output variables that are always set.
-* Build Directories:: Compiling in a different directory.
+* Build Directories:: Supporting multiple concurrent compiles.
* Automatic Remaking:: Makefile rules for configuring.
Configuration Header Files
Transforming Program Names When Installing
-* Transformation Options:: `configure' options to transforme names.
+* Transformation Options:: `configure' options to transform names.
* Transformation Examples:: Sample uses of transforming names.
* Transformation Rules:: `Makefile' uses of transforming names.
* Basic Installation:: Instructions for typical cases.
* Compilers and Options:: Selecting compilers and optimization.
-* Build Directory:: Configuring in a different directory.
+* Multiple Architectures:: Compiling for multiple architectures at once.
* Installation Names:: Installing in different directories.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
directory. UNIQUE-FILE-IN-SOURCE-DIR is some file that is in the
package's source directory; `configure' checks for this file's
existence to make sure that the directory that it is told contains
- the source code in fact does (*note Invoking configure::., for
- more information).
+ the source code in fact does. Occasionally people accidentally
+ specify the wrong directory with `--srcdir'; this is a safety
+ check. *Note Invoking configure::, for more information.
Packages that do manual configuration or use the `install' program
might need to tell `configure' where to find some other shell scripts
* Menu:
* Preset Output Variables:: Output variables that are always set.
-* Build Directories:: Compiling in a different directory.
+* Build Directories:: Supporting multiple concurrent compiles.
* Automatic Remaking:: Makefile rules for configuring.
\1f
variable in a comment at the top of each input file. For example,
an input shell script should begin like this:
- #!/bin/sh
+ #! /bin/sh
# @configure_input@
The presence of that line also reminds people editing the file
Build Directories
-----------------
- You might want to compile a software package in a different directory
-from the one that contains the source code. Doing this allows you to
-compile the package for several architectures simultaneously from the
-same copy of the source code and keep multiple sets of object files on
-disk.
+ You can support compiling a software package for several
+architectures simultaneously from the same copy of the source code.
+The object files for each architecture are kept in their own directory.
To support doing this, `make' uses the `VPATH' variable to find the
files that are in the source directory. GNU `make' and most other
substitutions on the value of `VPATH'.
`configure' substitutes in the correct value for `srcdir' when it
-produces `Makefile.in'.
+produces `Makefile'.
Do not use the `make' variable `$<', which expands to the pathname
of the file in the source directory (found with `VPATH'), except in
recompilation. You should include the file `stamp-h.in' your package's
distribution, so `make' will consider `config.h.in' up to date. On
some old BSD systems, `touch' or any command that results in an empty
-file does not update the timestamps, so use a command like `date' as a
+file does not update the timestamps, so use a command like `echo' as a
workaround.
${srcdir}/configure: configure.in aclocal.m4
${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h \
config.h.top config.h.bot
cd ${srcdir} && autoheader
- date > ${srcdir}/stamp-h.in
+ echo timestamp > ${srcdir}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
config.status: configure
./config.status --recheck
- In addition, you should pass `date > stamp-h' in the EXTRA-CMDS
-argument to `AC_OUTPUT', so `config.status' will ensure that `config.h'
-is considered up to date. *Note Output::, for more information about
-`AC_OUTPUT'.
+ In addition, you should pass `echo timestamp > stamp-h' in the
+EXTRA-CMDS argument to `AC_OUTPUT', so `config.status' will ensure that
+`config.h' is considered up to date. *Note Output::, for more
+information about `AC_OUTPUT'.
*Note Invoking config.status::, for more examples of handling
configuration-related dependencies.
This is Info file autoconf.info, produced by Makeinfo-1.55 from the
-input file ./autoconf.texi.
+input file autoconf.texi.
START-INFO-DIR-ENTRY
* Autoconf: (autoconf). Create source code configuration scripts.
END-INFO-DIR-ENTRY
+ Autoconf: Creating Automatic Configuration Scripts, by David
+MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
package.
It is a good idea to call this macro before `AC_INIT' so that the
revision number is near the top of both `configure.in' and
`configure'. To support doing that, the `AC_REVISION' output
- begins with `#!/bin/sh', like the normal start of a `configure'
+ begins with `#! /bin/sh', like the normal start of a `configure'
script does.
For example, this line in `configure.in':
produces this in `configure':
- #!/bin/sh
+ #! /bin/sh
# From configure.in Revision: 1.30
\1f
These macros are used to find programs not covered by the particular
test macros. If you need to check the behavior of a program as well as
find out whether it is present, you have to write your own test for it
-(*note Writing Tests::.).
+(*note Writing Tests::.). If you need to check for a program that
+might not be in the user's `PATH', you can temporarily add to it:
+
+ ac_save_path="$PATH"
+ PATH=/usr/libexec:/usr/sbin:/usr/etc:/etc
+ AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd)
+ PATH="$ac_save_path"
- Macro: AC_CHECK_PROG (VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND [,
VALUE-IF-NOT-FOUND])
is not specified, the value of VARIABLE is not changed. Calls
`AC_SUBST' for VARIABLE.
+ - Macro: AC_CHECK_TOOL (VARIABLE, PROG-TO-CHECK-FOR [,
+ VALUE-IF-NOT-FOUND])
+ Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a
+ prefix of the host type as determined by `AC_CANONICAL_HOST',
+ followed by a dash (*note Canonicalizing::.). For example, if the
+ user runs `configure --host=i386-gnu', then this call:
+ AC_CHECK_TOOL(RANLIB, ranlib, :)
+
+ sets `RANLIB' to `i386-gnu-ranlib' if that program exists in
+ `PATH', or to `ranlib' if that program exists in `PATH', or to `:'
+ if neither program exists.
+
- Macro: AC_PATH_PROG (VARIABLE, PROG-TO-CHECK-FOR [,
VALUE-IF-NOT-FOUND])
Like `AC_CHECK_PROG', but set VARIABLE to the entire path of
If linking with LIBRARY results in unresolved symbols, which would
be resolved by linking with additional libraries, give those
libraries as the OTHER-LIBRARIES argument, separated by spaces:
- `-lX11 -lXt'. Otherwise this macro will fail to detect that
+ `-lXt -lX11'. Otherwise this macro will fail to detect that
LIBRARY is present, because linking the test program will always
fail with unresolved symbols.
the name of the group that should own the installed program.
- Macro: AC_FUNC_GETMNTENT
- Check for the `getmntent' in the `sun' and `seq' libraries, for
- Irix 4 and PTX, respectively. Then, if `getmntent' is available,
- define `HAVE_GETMNTENT'.
+ Check for `getmntent' in the `sun' and `seq' libraries, for Irix 4
+ and PTX, respectively. Then, if `getmntent' is available, define
+ `HAVE_GETMNTENT'.
+
+ - Macro: AC_FUNC_GETPGRP
+ If `getpgrp' takes no argument (the POSIX.1 version), define
+ `GETPGRP_VOID'. Otherwise, it is the BSD version, which takes a
+ process ID as an argument. This macro does not check whether
+ `getpgrp' exists at all; if you need to work in that situation,
+ first call `AC_CHECK_FUNC' for `getpgrp'.
- Macro: AC_FUNC_MEMCMP
If the `memcmp' function is not available, or does not work on
`vfork' is not found, define `vfork' to be `fork'. This macro
checks for several known errors in implementations of `vfork' and
considers the system to not have a working `vfork' if it detects
- any of them.
+ any of them. It is not considered to be an implementation error
+ if a child's invocation of `signal' modifies the parent's signal
+ handler, since child processes rarely change their signal handlers.
- Macro: AC_FUNC_VPRINTF
If `vprintf' is found, define `HAVE_VPRINTF'. Otherwise, if
as empty.
- Macro: AC_C_INLINE
- If the C compiler is a version of GCC that supports the keyword
- `__inline' but not `inline' (such as some NeXT versions), define
- `inline' to be `__inline'.
+ If the C compiler supports the keyword `inline', do nothing.
+ Otherwise define `inline' to `__inline__' or `__inline' if it
+ accepts one of those, otherwise define `inline' to be empty.
- Macro: AC_C_CHAR_UNSIGNED
If the C type `char' is unsigned, define `__CHAR_UNSIGNED__',
- Macro: AC_SYS_INTERPRETER
Check whether the system supports starting scripts with a line of
- the form `#!/bin/csh' to select the interpreter to use for the
+ the form `#! /bin/csh' to select the interpreter to use for the
script. After running this macro, shell code in `configure.in'
can check the variable `ac_cv_sys_interpreter'; it will be set to
`yes' if the system supports `#!', `no' if not.
set it to the empty string.
- Macro: AC_PATH_XTRA
- An enhanced version of `AC_PATH_X'. Add the C compiler flags that
- X needs to output variable `X_CFLAGS', and the X linker flags to
- `X_LIBS'. If X is not available, add `-DX_DISPLAY_MISSING' to
+ An enhanced version of `AC_PATH_X'. It adds the C compiler flags
+ that X needs to output variable `X_CFLAGS', and the X linker flags
+ to `X_LIBS'. If X is not available, adds `-DX_DISPLAY_MISSING' to
`X_CFLAGS'.
- Also check for special libraries that some systems need in order to
- compile X programs. Add any that the system needs to output
- variable `X_EXTRA_LIBS'. And check for special X11R6 libraries
- that need to be linked with before `-lX11', and add any found to
- the output variable `X_PRE_LIBS'.
+ This macro also checks for special libraries that some systems
+ need in order to compile X programs. It adds any that the system
+ needs to output variable `X_EXTRA_LIBS'. And it checks for
+ special X11R6 libraries that need to be linked with before
+ `-lX11', and adds any found to the output variable `X_PRE_LIBS'.
+
- Macro: AC_SYS_LONG_FILE_NAMES
If the system supports file names longer than 14 characters, define
kinds of C features call these macros and do cache their results and
print messages about what they're checking for.
+ When you write a feature test that could be applicable to more than
+one software package, the best thing to do is encapsulate it in a new
+macro. *Note Writing Macros::, for how to do that.
+
* Menu:
* Examining Declarations:: Detecting header files and declarations.
link; use `AC_TRY_LINK' if you need to do that (*note Examining
Libraries::.).
-\1f
-File: autoconf.info, Node: Examining Libraries, Next: Run Time, Prev: Examining Syntax, Up: Writing Tests
-
-Examining Libraries
-===================
-
- To check for a library, a function, or a global variable, Autoconf
-`configure' scripts try to compile and link a small program that uses
-it. This is unlike Metaconfig, which by default uses `nm' or `ar' on
-the C library to try to figure out which functions are available.
-Trying to link with the function is usually a more reliable approach
-because it avoids dealing with the variations in the options and output
-formats of `nm' and `ar' and in the location of the standard libraries.
-It also allows configuring for cross-compilation or checking a
-function's runtime behavior if needed. On the other hand, it can be
-slower than scanning the libraries once.
-
- A few systems have linkers that do not return a failure exit status
-when there are unresolved functions in the link. This bug makes the
-configuration scripts produced by Autoconf unusable on those systems.
-However, some of them can be given options that make the exit status
-correct. This is a problem that Autoconf does not currently handle
-automatically.
-
- `AC_TRY_LINK' is used to compile test programs to test for functions
-and global variables. It is also used (by `AC_CHECK_LIB') to check for
-libraries, by adding the library being checked for to `LIBS'
-temporarily and trying to link a small program.
-
- - Macro: AC_TRY_LINK (INCLUDES, FUNCTION-BODY, ACTION-IF-FOUND [,
- ACTION-IF-NOT-FOUND])
- Create a test C program to see whether a function whose body
- consists of FUNCTION-BODY can be compiled and linked; INCLUDES is
- any `#include' statements needed by the code in FUNCTION-BODY. If
- the file compiles and links successfully, run shell commands
- ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND. This macro
- uses `CFLAGS' or `CXXFLAGS', `CPPFLAGS', `LDFLAGS', and `LIBS'
- when compiling.
-
- - Macro: AC_COMPILE_CHECK (ECHO-TEXT, INCLUDES, FUNCTION-BODY,
- ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
- This is an obsolete version of `AC_TRY_LINK', with the addition
- that it prints `checking for ECHO-TEXT' to the standard output
- first, if ECHO-TEXT is non-empty. Use `AC_MSG_CHECKING' and
- `AC_MSG_RESULT' instead to print messages (*note Printing
- Messages::.).
-
This is Info file autoconf.info, produced by Makeinfo-1.55 from the
-input file ./autoconf.texi.
+input file autoconf.texi.
START-INFO-DIR-ENTRY
* Autoconf: (autoconf). Create source code configuration scripts.
END-INFO-DIR-ENTRY
+ Autoconf: Creating Automatic Configuration Scripts, by David
+MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
package.
versions, except that this permission notice may be stated in a
translation approved by the Foundation.
+\1f
+File: autoconf.info, Node: Examining Libraries, Next: Run Time, Prev: Examining Syntax, Up: Writing Tests
+
+Examining Libraries
+===================
+
+ To check for a library, a function, or a global variable, Autoconf
+`configure' scripts try to compile and link a small program that uses
+it. This is unlike Metaconfig, which by default uses `nm' or `ar' on
+the C library to try to figure out which functions are available.
+Trying to link with the function is usually a more reliable approach
+because it avoids dealing with the variations in the options and output
+formats of `nm' and `ar' and in the location of the standard libraries.
+It also allows configuring for cross-compilation or checking a
+function's runtime behavior if needed. On the other hand, it can be
+slower than scanning the libraries once.
+
+ A few systems have linkers that do not return a failure exit status
+when there are unresolved functions in the link. This bug makes the
+configuration scripts produced by Autoconf unusable on those systems.
+However, some of them can be given options that make the exit status
+correct. This is a problem that Autoconf does not currently handle
+automatically. If users encounter this problem, they might be able to
+solve it by setting `LDFLAGS' in the environment to pass whatever
+options the linker needs (for example, `-Wl,-dn' on MIPS RISC/OS).
+
+ `AC_TRY_LINK' is used to compile test programs to test for functions
+and global variables. It is also used (by `AC_CHECK_LIB') to check for
+libraries, by adding the library being checked for to `LIBS'
+temporarily and trying to link a small program.
+
+ - Macro: AC_TRY_LINK (INCLUDES, FUNCTION-BODY, ACTION-IF-FOUND [,
+ ACTION-IF-NOT-FOUND])
+ Create a test C program to see whether a function whose body
+ consists of FUNCTION-BODY can be compiled and linked; INCLUDES is
+ any `#include' statements needed by the code in FUNCTION-BODY. If
+ the file compiles and links successfully, run shell commands
+ ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND. This macro
+ uses `CFLAGS' or `CXXFLAGS', `CPPFLAGS', `LDFLAGS', and `LIBS'
+ when compiling.
+
+ - Macro: AC_COMPILE_CHECK (ECHO-TEXT, INCLUDES, FUNCTION-BODY,
+ ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+ This is an obsolete version of `AC_TRY_LINK', with the addition
+ that it prints `checking for ECHO-TEXT' to the standard output
+ first, if ECHO-TEXT is non-empty. Use `AC_MSG_CHECKING' and
+ `AC_MSG_RESULT' instead to print messages (*note Printing
+ Messages::.).
+
\1f
File: autoconf.info, Node: Run Time, Next: Portable Shell, Prev: Examining Libraries, Up: Writing Tests
You should not use shell functions, aliases, negated character classes,
or other features that are not found in all Bourne-compatible shells;
restrict yourself to the lowest common denominator. Even `unset' is
-not supported by all shells!
+not supported by all shells! Also, include a space after the
+exclamation point in interpreter specifications, like this:
+ #! /usr/bin/perl
+ If you omit the space before the path, then 4.2BSD based systems
+(such as Sequent DYNIX) will ignore the line, because they interpret
+`#! /' as a 4-byte magic number.
The set of external programs you should run in a `configure' script
is fairly small. *Note Utilities in Makefiles:
- Macro: AC_MSG_ERROR (ERROR-DESCRIPTION)
Notify the user of an error that prevents `configure' from
completing. This macro prints an error message on the standard
- error stream and exits `configure' with a nonzero status.
+ error output and exits `configure' with a nonzero status.
eRROR-DESCRIPTION should be something like `invalid value $HOME
for \$HOME'.
- Macro: AC_MSG_WARN (PROBLEM-DESCRIPTION)
Notify the `configure' user of a possible problem. This macro
- prints the message on the standard error stream; `configure'
+ prints the message on the standard error output; `configure'
continues running afterward, so macros that call `AC_MSG_WARN'
should provide a default (back-up) behavior for the situations
they warn about. PROBLEM-DESCRIPTION should be something like `ln
A few kinds of features can't be guessed automatically by running
test programs. For example, the details of the object file format, or
-special options that need to be passed to the compiler or linker. It is
-possible to check for such features using ad-hoc means, such as having
+special options that need to be passed to the compiler or linker. You
+can check for such features using ad-hoc means, such as having
`configure' check the output of the `uname' program, or looking for
libraries that are unique to particular systems. However, Autoconf
provides a uniform method for handling unguessable features.
`SRCDIR/config/${machine}.h', and `object.h', which is a link to
`SRCDIR/config/${obj_format}.h'.
+ You can also use the host system type to find cross-compilation
+tools. *Note Generic Programs::, for information about the
+`AC_CHECK_TOOL' macro which does that.
+
\1f
File: autoconf.info, Node: Site Configuration, Next: Invoking configure, Prev: Manual Configuration, Up: Top
to use it. Whether each package is used or not by default, and which
arguments are valid, is up to you.
- - Macro: AC_ARG_WITH (PACKAGE, HELP-STRING, ACTION-IF-TRUE [,
- ACTION-IF-FALSE])
+ - Macro: AC_ARG_WITH (PACKAGE, HELP-STRING [, ACTION-IF-GIVEN [,
+ ACTION-IF-NOT-GIVEN]])
If the user gave `configure' the option `--with-PACKAGE' or
- `--without-PACKAGE', run shell commands ACTION-IF-TRUE. Otherwise
- run shell commands ACTION-IF-FALSE. The name PACKAGE indicates
- another software package that this program should work with. It
- should consist only of alphanumeric characters and dashes.
+ `--without-PACKAGE', run shell commands ACTION-IF-GIVEN. If
+ neither option was given, run shell commands ACTION-IF-NOT-GIVEN.
+ The name PACKAGE indicates another software package that this
+ program should work with. It should consist only of alphanumeric
+ characters and dashes.
The option's argument is available to the shell commands
- ACTION-IF-TRUE in the shell variable `withval'.
+ ACTION-IF-GIVEN in the shell variable `withval', which is actually
+ just the value of the shell variable `with_PACKAGE'; you may use
+ that variable instead, if you wish.
The argument HELP-STRING is a description of the option which
looks like this:
Avoid tabs in the help string. You'll need to enclose it in `['
and `]' in order to produce the leading spaces.
- - Macro: AC_WITH (PACKAGE, ACTION-IF-TRUE [, ACTION-IF-FALSE])
+ - Macro: AC_WITH (PACKAGE, ACTION-IF-GIVEN [, ACTION-IF-NOT-GIVEN])
This is an obsolete version of `AC_ARG_WITH' that does not support
providing a help string.
-\1f
-File: autoconf.info, Node: Package Options, Next: Site Details, Prev: External Software, Up: Site Configuration
-
-Choosing Package Options
-========================
-
- If a software package has optional compile-time features, the user
-can give `configure' command line options to specify whether to compile
-them. The options have one of these forms:
-
- --enable-FEATURE[=ARG]
- --disable-FEATURE
-
- These options allow users to choose which optional features to build
-and install. `--enable-FEATURE' options should never make a feature
-behave differently or cause one feature to replace another. They
-should only cause parts of the program to be built rather than left out.
-
- The user can give an argument by following the feature name with `='
-and the argument. Giving an argument of `no' requests that the feature
-*not* be made available. A feature with an argument looks like
-`--enable-debug=stabs'. If no argument is given, it defaults to `yes'.
-`--disable-FEATURE' is equivalent to `--enable-FEATURE=no'.
-
- For each optional feature, `configure.in' should call
-`AC_ARG_ENABLE' to detect whether the `configure' user asked to include
-it. Whether each feature is included or not by default, and which
-arguments are valid, is up to you.
-
- - Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING, ACTION-IF-TRUE [,
- ACTION-IF-FALSE])
- If the user gave `configure' the option `--enable-FEATURE' or
- `--disable-FEATURE', run shell commands ACTION-IF-TRUE. Otherwise
- run shell commands ACTION-IF-FALSE. The name FEATURE indicates an
- optional user-level facility. It should consist only of
- alphanumeric characters and dashes.
-
- The option's argument is available to the shell commands
- ACTION-IF-TRUE in the shell variable `enableval'. The HELP-STRING
- argument is like that of `AC_ARG_WITH' (*note External
- Software::.).
-
- - Macro: AC_ENABLE (FEATURE, ACTION-IF-TRUE [, ACTION-IF-FALSE])
- This is an obsolete version of `AC_ARG_ENABLE' that does not
- support providing a help string.
-
-\1f
-File: autoconf.info, Node: Site Details, Next: Transforming Names, Prev: Package Options, Up: Site Configuration
-
-Configuring Site Details
-========================
-
- Some software packages require complex site-specific information.
-Some examples are host names to use for certain services, company
-names, and email addresses to contact. Since some configuration
-scripts generated by Metaconfig ask for such information interactively,
-people sometimes wonder how to get that information in
-Autoconf-generated configuration scripts, which aren't interactive.
-
- Such site configuration information should be put in a file that is
-edited *only by users*, not by programs. The location of the file can
-either be based on the `prefix' variable, or be a standard location
-such as the user's home directory. It could even be specified by an
-environment variable. The programs should examine that file at run
-time, rather than at compile time. That approach is more convenient
-for users and makes the configuration process simpler than getting the
-information while configuring. *Note Variables for Installation
-Directories: (standards)Directory Variables, for more information on
-where to put data files.
-
This is Info file autoconf.info, produced by Makeinfo-1.55 from the
-input file ./autoconf.texi.
+input file autoconf.texi.
START-INFO-DIR-ENTRY
* Autoconf: (autoconf). Create source code configuration scripts.
END-INFO-DIR-ENTRY
+ Autoconf: Creating Automatic Configuration Scripts, by David
+MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
package.
versions, except that this permission notice may be stated in a
translation approved by the Foundation.
+\1f
+File: autoconf.info, Node: Package Options, Next: Site Details, Prev: External Software, Up: Site Configuration
+
+Choosing Package Options
+========================
+
+ If a software package has optional compile-time features, the user
+can give `configure' command line options to specify whether to compile
+them. The options have one of these forms:
+
+ --enable-FEATURE[=ARG]
+ --disable-FEATURE
+
+ These options allow users to choose which optional features to build
+and install. `--enable-FEATURE' options should never make a feature
+behave differently or cause one feature to replace another. They
+should only cause parts of the program to be built rather than left out.
+
+ The user can give an argument by following the feature name with `='
+and the argument. Giving an argument of `no' requests that the feature
+*not* be made available. A feature with an argument looks like
+`--enable-debug=stabs'. If no argument is given, it defaults to `yes'.
+`--disable-FEATURE' is equivalent to `--enable-FEATURE=no'.
+
+ For each optional feature, `configure.in' should call
+`AC_ARG_ENABLE' to detect whether the `configure' user asked to include
+it. Whether each feature is included or not by default, and which
+arguments are valid, is up to you.
+
+ - Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING [, ACTION-IF-GIVEN [,
+ ACTION-IF-NOT-GIVEN]])
+ If the user gave `configure' the option `--enable-FEATURE' or
+ `--disable-FEATURE', run shell commands ACTION-IF-GIVEN. If
+ neither option was given, run shell commands ACTION-IF-NOT-GIVEN.
+ The name FEATURE indicates an optional user-level facility. It
+ should consist only of alphanumeric characters and dashes.
+
+ The option's argument is available to the shell commands
+ ACTION-IF-GIVEN in the shell variable `enableval', which is
+ actually just the value of the shell variable `enable_PACKAGE';
+ you may use that variable instead, if you wish. The HELP-STRING
+ argument is like that of `AC_ARG_WITH' (*note External
+ Software::.).
+
+ - Macro: AC_ENABLE (FEATURE, ACTION-IF-GIVEN [, ACTION-IF-NOT-GIVEN])
+ This is an obsolete version of `AC_ARG_ENABLE' that does not
+ support providing a help string.
+
+\1f
+File: autoconf.info, Node: Site Details, Next: Transforming Names, Prev: Package Options, Up: Site Configuration
+
+Configuring Site Details
+========================
+
+ Some software packages require complex site-specific information.
+Some examples are host names to use for certain services, company
+names, and email addresses to contact. Since some configuration
+scripts generated by Metaconfig ask for such information interactively,
+people sometimes wonder how to get that information in
+Autoconf-generated configuration scripts, which aren't interactive.
+
+ Such site configuration information should be put in a file that is
+edited *only by users*, not by programs. The location of the file can
+either be based on the `prefix' variable, or be a standard location
+such as the user's home directory. It could even be specified by an
+environment variable. The programs should examine that file at run
+time, rather than at compile time. Run time configuration is more
+convenient for users and makes the configuration process simpler than
+getting the information while configuring. *Note Variables for
+Installation Directories: (standards)Directory Variables, for more
+information on where to put data files.
+
\1f
File: autoconf.info, Node: Transforming Names, Next: Site Defaults, Prev: Site Details, Up: Site Configuration
* Menu:
-* Transformation Options:: `configure' options to transforme names.
+* Transformation Options:: `configure' options to transform names.
* Transformation Examples:: Sample uses of transforming names.
* Transformation Rules:: `Makefile' uses of transforming names.
`--program-prefix=g', then when you run `make install' it is installed
as `/usr/local/bin/gdiff'.
- As a more sophistocated example, you could use
+ As a more sophisticated example, you could use
--program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/'
to prepend `g' to most of the program names in a source tree, excepting
`CC' in that site file, because the cache file is only valid for a
particular compiler, but many systems have several available.
+ You can examine or override the value set by a command line option to
+`configure' in a site file; options set shell variables that have the
+same names as the options, with any dashes turned into underscores.
+The exceptions are that `--without-' and `--disable-' options are like
+giving the corresponding `--with-' or `--enable-' option and the value
+`no'. Thus, `--cache-file=localcache' sets the variable `cache_file'
+to the value `localcache'; `--enable-warnings=no' or
+`--disable-warnings' sets the variable `enable_warnings' to the value
+`no'; `--prefix=/usr' sets the variable `prefix' to the value `/usr';
+etc.
+
Site files are also good places to set default values for other
output variables, such as `CFLAGS', if you need to give them non-default
values: anything you would normally do, repetitively, on the command
* Basic Installation:: Instructions for typical cases.
* Compilers and Options:: Selecting compilers and optimization.
-* Build Directory:: Configuring in a different directory.
+* Multiple Architectures:: Compiling for multiple architectures at once.
* Installation Names:: Installing in different directories.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
documentation.
5. You can remove the program binaries and object files from the
- source directory by typing `make clean'. To also remove the files
- that `configure' created (so you can compile the package for a
- different kind of computer), type `make distclean'.
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
\1f
-File: autoconf.info, Node: Compilers and Options, Next: Build Directory, Prev: Basic Installation, Up: Invoking configure
+File: autoconf.info, Node: Compilers and Options, Next: Multiple Architectures, Prev: Basic Installation, Up: Invoking configure
Compilers and Options
=====================
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
\1f
-File: autoconf.info, Node: Build Directory, Next: Installation Names, Prev: Compilers and Options, Up: Invoking configure
+File: autoconf.info, Node: Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Invoking configure
+
+Compiling For Multiple Architectures
+====================================
-Using a Different Build Directory
-=================================
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
- You can compile the package in a different directory from the one
-containing the source code. Doing so allows you to compile it on more
-than one kind of computer at the same time. To do this, you must use a
-version of `make' that supports the `VPATH' variable, such as GNU
-`make'. `cd' to the directory where you want the object files and
-executables to go and run the `configure' script. `configure'
-automatically checks for the source code in the directory that
-`configure' is in and in `..'.
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
\1f
-File: autoconf.info, Node: Installation Names, Next: Optional Features, Prev: Build Directory, Up: Invoking configure
+File: autoconf.info, Node: Installation Names, Next: Optional Features, Prev: Multiple Architectures, Up: Invoking configure
Installation Names
==================
operates.
`--cache-file=FILE'
- Save the results of the tests in FILE instead of `config.cache'.
- Set FILE to `/dev/null' to disable caching, for debugging
- `configure'.
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
this kind of database, but in fact it is not. Instead of listing host
dependencies, it lists program requirements.
- Imake is special-purpose. It is directed at building the X11
-distribution. By comparison to the GNU tools, this is a simple problem.
-If you view the GNU suite as a collection of native tools, then the
-problems are similar. But the GNU tools are more powerful than that.
-The development tools can be configured as cross tools in almost any
-host+target permutation. All of these configurations can be installed
-concurrently. They can even be configured to share host independent
-files across hosts. Imake doesn't address these issues.
+ If you view the GNU suite as a collection of native tools, then the
+problems are similar. But the GNU development tools can be configured
+as cross tools in almost any host+target permutation. All of these
+configurations can be installed concurrently. They can even be
+configured to share host independent files across hosts. Imake doesn't
+address these issues.
Imake templates are a form of standardization. The GNU coding
standards address the same issues without necessarily imposing the same
one big directory tree, or the Imake configuration might assume one
compiler whereas the package or the installer needs to use another, or
there might be a version mismatch between the Imake expected by the
-package and the Imake suported by the host. These problems are much
+package and the Imake supported by the host. These problems are much
rarer with Autoconf, where each package comes with its own independent
configuration processor.
Finally, Mark Eichin notes:
Imake isn't all that extensible, either. In order to add new
-features to Imake, you need to provide you own project template, and
+features to Imake, you need to provide your own project template, and
duplicate most of the features of the existing one. This means that
for a sophisticated project, using the vendor-provided Imake templates
fails to provide any leverage--since they don't cover anything that
`acsite.m4'. *Note Invoking autoconf::.
If you distribute `install.sh' with your package, rename it to
-`install-sh' so `make' builtin rules won't inadvertantly create a file
+`install-sh' so `make' builtin rules won't inadvertently create a file
called `install' from it. `AC_PROG_INSTALL' looks for the script under
both names, but it is best to use the new name.
the environment when `configure' is run. Doing this isn't necessary,
but it's a convenience for users.
- Also add `@configure_input@' in a comment to each input file for
-`AC_OUTPUT', so that the output files will contain a comment saying
-they were produced by `configure'. Automatically selecting the right
-comment syntax for all the kinds of files that people call `AC_OUTPUT'
-on became too much work.
+ Also add `@configure_input@' in a comment to each non-`Makefile'
+input file for `AC_OUTPUT', so that the output files will contain a
+comment saying they were produced by `configure'. Automatically
+selecting the right comment syntax for all the kinds of files that
+people call `AC_OUTPUT' on became too much work.
Add `config.log' and `config.cache' to the list of files you remove
in `distclean' targets.
prefix = @prefix@
exec_prefix = @exec_prefix@
-The old feature of replacing those variables without `@' characters
+The old behavior of replacing those variables without `@' characters
around them has been removed.
\1f
release. They all contributed many specific checks, great ideas, and
bug fixes.
-\1f
-File: autoconf.info, Node: Numbers, Next: Deuteronomy, Prev: Leviticus, Up: History
-
-Numbers
-=======
-
- In July 1992, after months of alpha testing, I released Autoconf 1.0,
-and converted many GNU packages to use it. I was surprised by how
-positive the reaction to it was. More people started using it than I
-could keep track of, including people working on software that wasn't
-part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf
-continued to improve rapidly, as many people using the `configure'
-scripts reported problems they encountered.
-
- Autoconf turned out to be a good torture test for `m4'
-implementations. UNIX `m4' started to dump core because of the length
-of the macros that Autoconf defined, and several bugs showed up in GNU
-`m4' as well. Eventually, we realized that we needed to use some
-features that only GNU `m4' has. 4.3BSD `m4', in particular, has an
-impoverished set of builtin macros; the System V version is better, but
-still doesn't provide everything we need.
-
- More development occurred as people put Autoconf under more stresses
-(and to uses I hadn't anticipated). Karl Berry added checks for X11.
-david zuhn contributed C++ support. Franc,ois Pinard made it diagnose
-invalid arguments. Jim Blandy bravely coerced it into configuring GNU
-Emacs, laying the groundwork for several later improvements. Roland
-McGrath got it to configure the GNU C Library, wrote the `autoheader'
-script to automate the creation of C header file templates, and added a
-`--verbose' option to `configure'. Noah Friedman added the
-`--macrodir' option and `AC_MACRODIR' environment variable. (He also
-coined the term "autoconfiscate" to mean "adapt a software package to
-use Autoconf".) Roland and Noah improved the quoting protection in
-`AC_DEFINE' and fixed many bugs, especially when I got sick of dealing
-with portability problems from February through June, 1993.
-
-\1f
-File: autoconf.info, Node: Deuteronomy, Prev: Numbers, Up: History
-
-Deuteronomy
-===========
-
- A long wish list for major features had accumulated, and the effect
-of several years of patching by various people had left some residual
-cruft. In April 1994, while working for Cygnus Support, I began a major
-revision of Autoconf. I added most of the features of the Cygnus
-`configure' that Autoconf had lacked, largely by adapting the relevant
-parts of Cygnus `configure' with the help of david zuhn and Ken
-Raeburn. These features include support for using `config.sub',
-`config.guess', `--host', and `--target'; making links to files; and
-running `configure' scripts in subdirectories. Adding these features
-enabled Ken to convert GNU `as', and Rob Savoye to convert DejaGNU, to
-using Autoconf.
-
- I added more features in response to other peoples' requests. Many
-people had asked for `configure' scripts to share the results of the
-checks between runs, because (particularly when configuring a large
-source tree, like Cygnus does) they were frustratingly slow. Mike
-Haertel suggested adding site-specific initialization scripts. People
-distributing software that had to unpack on MS-DOS asked for a way to
-override the `.in' extension on the file names, which produced file
-names like `config.h.in' containing two dots. Jim Avera did an
-extensive examination of the problems with quoting in `AC_DEFINE' and
-`AC_SUBST'; his insights led to significant improvements. Richard
-Stallman asked that compiler output be sent to `config.log' instead of
-`/dev/null', to help people debug the Emacs `configure' script.
-
- I made some other changes because of my dissatisfaction with the
-quality of the program. I made the messages showing results of the
-checks less ambiguous, always printing a result. I regularized the
-names of the macros and cleaned up coding style inconsistencies. I
-added some auxiliary utilities that I had developed to help convert
-source code packages to use Autoconf. With the help of Franc,ois
-Pinard, I made the macros not interrupt each others' messages. (That
-feature revealed some performance bottlenecks in GNU `m4', which he
-hastily corrected!) I reorganized the documentation around problems
-people want to solve. And I began a testsuite, because experience had
-shown that Autoconf has a pronounced tendency to regress when we change
-it.
-
- Again, several alpha testers gave invaluable feedback, especially
-Franc,ois Pinard, Jim Meyering, Karl Berry, Rob Savoye, Ken Raeburn,
-and Mark Eichin.
-
- Finally, version 2.0 was ready. And there was much rejoicing. (And
-I have free time again. I think. Yeah, right.)
-
This is Info file autoconf.info, produced by Makeinfo-1.55 from the
-input file ./autoconf.texi.
+input file autoconf.texi.
START-INFO-DIR-ENTRY
* Autoconf: (autoconf). Create source code configuration scripts.
END-INFO-DIR-ENTRY
+ Autoconf: Creating Automatic Configuration Scripts, by David
+MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an `m4' macro
package.
versions, except that this permission notice may be stated in a
translation approved by the Foundation.
+\1f
+File: autoconf.info, Node: Numbers, Next: Deuteronomy, Prev: Leviticus, Up: History
+
+Numbers
+=======
+
+ In July 1992, after months of alpha testing, I released Autoconf 1.0,
+and converted many GNU packages to use it. I was surprised by how
+positive the reaction to it was. More people started using it than I
+could keep track of, including people working on software that wasn't
+part of the GNU Project (such as TCL, FSP, and Kerberos V5). Autoconf
+continued to improve rapidly, as many people using the `configure'
+scripts reported problems they encountered.
+
+ Autoconf turned out to be a good torture test for `m4'
+implementations. UNIX `m4' started to dump core because of the length
+of the macros that Autoconf defined, and several bugs showed up in GNU
+`m4' as well. Eventually, we realized that we needed to use some
+features that only GNU `m4' has. 4.3BSD `m4', in particular, has an
+impoverished set of builtin macros; the System V version is better, but
+still doesn't provide everything we need.
+
+ More development occurred as people put Autoconf under more stresses
+(and to uses I hadn't anticipated). Karl Berry added checks for X11.
+david zuhn contributed C++ support. Franc,ois Pinard made it diagnose
+invalid arguments. Jim Blandy bravely coerced it into configuring GNU
+Emacs, laying the groundwork for several later improvements. Roland
+McGrath got it to configure the GNU C Library, wrote the `autoheader'
+script to automate the creation of C header file templates, and added a
+`--verbose' option to `configure'. Noah Friedman added the
+`--macrodir' option and `AC_MACRODIR' environment variable. (He also
+coined the term "autoconfiscate" to mean "adapt a software package to
+use Autoconf".) Roland and Noah improved the quoting protection in
+`AC_DEFINE' and fixed many bugs, especially when I got sick of dealing
+with portability problems from February through June, 1993.
+
+\1f
+File: autoconf.info, Node: Deuteronomy, Prev: Numbers, Up: History
+
+Deuteronomy
+===========
+
+ A long wish list for major features had accumulated, and the effect
+of several years of patching by various people had left some residual
+cruft. In April 1994, while working for Cygnus Support, I began a major
+revision of Autoconf. I added most of the features of the Cygnus
+`configure' that Autoconf had lacked, largely by adapting the relevant
+parts of Cygnus `configure' with the help of david zuhn and Ken
+Raeburn. These features include support for using `config.sub',
+`config.guess', `--host', and `--target'; making links to files; and
+running `configure' scripts in subdirectories. Adding these features
+enabled Ken to convert GNU `as', and Rob Savoye to convert DejaGNU, to
+using Autoconf.
+
+ I added more features in response to other peoples' requests. Many
+people had asked for `configure' scripts to share the results of the
+checks between runs, because (particularly when configuring a large
+source tree, like Cygnus does) they were frustratingly slow. Mike
+Haertel suggested adding site-specific initialization scripts. People
+distributing software that had to unpack on MS-DOS asked for a way to
+override the `.in' extension on the file names, which produced file
+names like `config.h.in' containing two dots. Jim Avera did an
+extensive examination of the problems with quoting in `AC_DEFINE' and
+`AC_SUBST'; his insights led to significant improvements. Richard
+Stallman asked that compiler output be sent to `config.log' instead of
+`/dev/null', to help people debug the Emacs `configure' script.
+
+ I made some other changes because of my dissatisfaction with the
+quality of the program. I made the messages showing results of the
+checks less ambiguous, always printing a result. I regularized the
+names of the macros and cleaned up coding style inconsistencies. I
+added some auxiliary utilities that I had developed to help convert
+source code packages to use Autoconf. With the help of Franc,ois
+Pinard, I made the macros not interrupt each others' messages. (That
+feature revealed some performance bottlenecks in GNU `m4', which he
+hastily corrected!) I reorganized the documentation around problems
+people want to solve. And I began a testsuite, because experience had
+shown that Autoconf has a pronounced tendency to regress when we change
+it.
+
+ Again, several alpha testers gave invaluable feedback, especially
+Franc,ois Pinard, Jim Meyering, Karl Berry, Rob Savoye, Ken Raeburn,
+and Mark Eichin.
+
+ Finally, version 2.0 was ready. And there was much rejoicing. (And
+I have free time again. I think. Yeah, right.)
+
\1f
File: autoconf.info, Node: Old Macro Names, Next: Environment Variable Index, Prev: History, Up: Top
* Menu:
* AC_MACRODIR: Invoking autoupdate.
-* AC_MACRODIR: Invoking autoscan.
-* AC_MACRODIR: Invoking autoreconf.
-* AC_MACRODIR: Invoking ifnames.
* AC_MACRODIR: Invoking autoheader.
+* AC_MACRODIR: Invoking autoreconf.
* AC_MACRODIR: Invoking autoconf.
+* AC_MACRODIR: Invoking ifnames.
+* AC_MACRODIR: Invoking autoscan.
* CONFIG_FILES: Invoking config.status.
* CONFIG_HEADERS: Invoking config.status.
* CONFIG_SHELL: Invoking config.status.
* build_cpu: System Type Variables.
* build_os: System Type Variables.
* build_vendor: System Type Variables.
-* CC: Particular Programs.
* CC: UNIX Variants.
* CC: Particular Programs.
-* CFLAGS: Preset Output Variables.
+* CC: Particular Programs.
* CFLAGS: Particular Programs.
+* CFLAGS: Preset Output Variables.
* configure_input: Preset Output Variables.
* CPP: Particular Programs.
* CPPFLAGS: Preset Output Variables.
* CXX: Particular Programs.
* CXXCPP: Particular Programs.
-* CXXFLAGS: Preset Output Variables.
* CXXFLAGS: Particular Programs.
+* CXXFLAGS: Preset Output Variables.
* DEFS: Preset Output Variables.
* exec_prefix: Preset Output Variables.
* host: System Type Variables.
* LEX: Particular Programs.
* LEXLIB: Particular Programs.
* LEX_OUTPUT_ROOT: Particular Programs.
+* LIBOBJS: Structures.
+* LIBOBJS: Generic Functions.
* LIBOBJS: Particular Functions.
* LIBOBJS: Particular Functions.
-* LIBOBJS: Generic Functions.
-* LIBOBJS: Structures.
* LIBS: UNIX Variants.
* LIBS: UNIX Variants.
* LIBS: Preset Output Variables.
* DIRENT: Particular Headers.
* GETGROUPS_T: Particular Typedefs.
* GETLODAVG_PRIVILEGED: Particular Functions.
+* GETPGRP_VOID: Particular Functions.
* gid_t: Particular Typedefs.
* HAVE_FUNCTION: Generic Functions.
* HAVE_HEADER: Generic Headers.
* CHECK_PROG: Generic Programs.
* CHECK_PROGS: Generic Programs.
* CHECK_SIZEOF: Compiler Characteristics.
+* CHECK_TOOL: Generic Programs.
* CHECK_TYPE: Generic Typedefs.
* COMPILE_CHECK: Examining Libraries.
* CONFIG_AUX_DIR: Input.
* FUNC_CLOSEDIR_VOID: Particular Functions.
* FUNC_GETLOADAVG: Particular Functions.
* FUNC_GETMNTENT: Particular Functions.
+* FUNC_GETPGRP: Particular Functions.
* FUNC_MEMCMP: Particular Functions.
* FUNC_MMAP: Particular Functions.
* FUNC_SETVBUF_REVERSED: Particular Functions.
* SET_MAKE: Old Macro Names.
* SIZEOF_TYPE: Old Macro Names.
* SIZE_T: Old Macro Names.
-* STAT_MACROS_BROKEN: Structures.
* STAT_MACROS_BROKEN: Old Macro Names.
+* STAT_MACROS_BROKEN: Structures.
* STDC_HEADERS: Old Macro Names.
* STRCOLL: Old Macro Names.
* STRUCT_ST_BLKSIZE: Structures.
-#!/bin/sh
+#! /bin/sh
# autoconf -- create `configure' using m4 macros
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-test -z "${AC_MACRODIR}" && AC_MACRODIR=@datadir@
-test -z "${M4}" && M4=@M4@
+: ${AC_MACRODIR=@datadir@}
+: ${M4=@M4@}
case "${M4}" in
/*) # Handle the case that m4 has moved since we were configured.
# It may have been found originally in a build directory.
test -f "${M4}" || M4=m4 ;;
esac
-tmpout=/tmp/acout.$$
+: ${TMPDIR=/tmp}
+tmpout=${TMPDIR}/acout.$$
localdir=
show_version=no
trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
-tmpin=/tmp/acin.$$ # Always set this, to avoid bogus errors from some rm's.
+tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
if test z$infile = z-; then
infile=$tmpin
cat > $infile
@c @setchapternewpage odd
@c %**end of header
-@set EDITION 2.1
-@set VERSION 2.1
-@set UPDATED November 1994
+@set EDITION 2.3
+@set VERSION 2.3
+@set UPDATED March 1995
@iftex
@finalout
END-INFO-DIR-ENTRY
@end format
+Autoconf: Creating Automatic Configuration Scripts, by David MacKenzie.
+
This file documents the GNU Autoconf package for creating scripts to
configure source code packages using templates and an @code{m4} macro
package.
Substitutions in Makefiles
* Preset Output Variables:: Output variables that are always set.
-* Build Directories:: Compiling in a different directory.
+* Build Directories:: Supporting multiple concurrent compiles.
* Automatic Remaking:: Makefile rules for configuring.
Configuration Header Files
Transforming Program Names When Installing
-* Transformation Options:: @code{configure} options to transforme names.
+* Transformation Options:: @code{configure} options to transform names.
* Transformation Examples:: Sample uses of transforming names.
* Transformation Rules:: @file{Makefile} uses of transforming names.
* Basic Installation:: Instructions for typical cases.
* Compilers and Options:: Selecting compilers and optimization.
-* Build Directory:: Configuring in a different directory.
+* Multiple Architectures:: Compiling for multiple architectures at once.
* Installation Names:: Installing in different directories.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
@var{unique-file-in-source-dir} is some file that is in the package's
source directory; @code{configure} checks for this file's existence to
make sure that the directory that it is told contains the source code in
-fact does (@pxref{Invoking configure}, for more information).
+fact does. Occasionally people accidentally specify the wrong directory
+with @samp{--srcdir}; this is a safety check. @xref{Invoking configure},
+for more information.
@end defmac
Packages that do manual configuration or use the @code{install} program
@menu
* Preset Output Variables:: Output variables that are always set.
-* Build Directories:: Compiling in a different directory.
+* Build Directories:: Supporting multiple concurrent compiles.
* Automatic Remaking:: Makefile rules for configuring.
@end menu
example, an input shell script should begin like this:
@example
-#!/bin/sh
+#! /bin/sh
# @@configure_input@@
@end example
@node Build Directories, Automatic Remaking, Preset Output Variables, Makefile Substitutions
@subsection Build Directories
-You might want to compile a software package in a different directory
-from the one that contains the source code. Doing this allows you to
-compile the package for several architectures simultaneously from the
-same copy of the source code and keep multiple sets of object files on
-disk.
+You can support compiling a software package for several architectures
+simultaneously from the same copy of the source code. The object files
+for each architecture are kept in their own directory.
To support doing this, @code{make} uses the @code{VPATH} variable to
find the files that are in the source directory. GNU @code{make} and
variable substitutions on the value of @code{VPATH}.
@code{configure} substitutes in the correct value for @code{srcdir} when
-it produces @file{Makefile.in}.
+it produces @file{Makefile}.
Do not use the @code{make} variable @code{$<}, which expands to the
pathname of the file in the source directory (found with @code{VPATH}),
package's distribution, so @code{make} will consider @file{config.h.in}
up to date. On some old BSD systems, @code{touch} or any command that
results in an empty file does not update the timestamps, so use a
-command like @code{date} as a workaround.
+command like @code{echo} as a workaround.
+@c Using @code{date} would cause needless CVS conflicts.
@example
@group
$@{srcdir@}/stamp-h.in: configure.in aclocal.m4 acconfig.h \
config.h.top config.h.bot
cd $@{srcdir@} && autoheader
- date > $@{srcdir@}/stamp-h.in
+ echo timestamp > $@{srcdir@}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
@end group
@end example
-In addition, you should pass @samp{date > stamp-h} in the @var{extra-cmds}
-argument to @code{AC_OUTPUT}, so @file{config.status} will ensure that
-@file{config.h} is considered up to date. @xref{Output}, for more
-information about @code{AC_OUTPUT}.
+In addition, you should pass @samp{echo timestamp > stamp-h} in the
+@var{extra-cmds} argument to @code{AC_OUTPUT}, so @file{config.status}
+will ensure that @file{config.h} is considered up to date.
+@xref{Output}, for more information about @code{AC_OUTPUT}.
@xref{Invoking config.status}, for more examples of handling
configuration-related dependencies.
It is a good idea to call this macro before @code{AC_INIT} so that the
revision number is near the top of both @file{configure.in} and
@code{configure}. To support doing that, the @code{AC_REVISION} output
-begins with @samp{#!/bin/sh}, like the normal start of a
+begins with @samp{#! /bin/sh}, like the normal start of a
@code{configure} script does.
For example, this line in @file{configure.in}:
produces this in @code{configure}:
@example
-#!/bin/sh
+#! /bin/sh
# From configure.in Revision: 1.30
@end example
@end defmac
These macros are used to find programs not covered by the particular
test macros. If you need to check the behavior of a program as well as
find out whether it is present, you have to write your own test for
-it (@pxref{Writing Tests}).
+it (@pxref{Writing Tests}). If you need to check for a program that
+might not be in the user's @code{PATH}, you can temporarily add to it:
+
+@example
+ac_save_path="$PATH"
+PATH=/usr/libexec:/usr/sbin:/usr/etc:/etc
+AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd)
+PATH="$ac_save_path"
+@end example
@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]})
@maindex CHECK_PROG
is not changed. Calls @code{AC_SUBST} for @var{variable}.
@end defmac
+@defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@maindex CHECK_TOOL
+Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for}
+with a prefix of the host type as determined by @code{AC_CANONICAL_HOST},
+followed by a dash (@pxref{Canonicalizing}). For example, if the user
+runs @samp{configure --host=i386-gnu}, then this call:
+@example
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+@end example
+@noindent
+sets @code{RANLIB} to @file{i386-gnu-ranlib} if that program exists in
+@code{PATH}, or to @samp{ranlib} if that program exists in @code{PATH},
+or to @samp{:} if neither program exists.
+@end defmac
+
@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
@maindex PATH_PROG
Like @code{AC_CHECK_PROG}, but set @var{variable} to the entire
If linking with @var{library} results in unresolved symbols, which would
be resolved by linking with additional libraries, give those libraries
-as the @var{other-libraries} argument, separated by spaces: @samp{-lX11
--lXt}. Otherwise this macro will fail to detect that @var{library} is
+as the @var{other-libraries} argument, separated by spaces: @samp{-lXt
+-lX11}. Otherwise this macro will fail to detect that @var{library} is
present, because linking the test program will always fail with
unresolved symbols.
@end defmac
@defmac AC_FUNC_GETMNTENT
@maindex FUNC_GETMNTENT
@cvindex HAVE_GETMNTENT
-Check for the @code{getmntent} in the @file{sun} and @file{seq}
+Check for @code{getmntent} in the @file{sun} and @file{seq}
libraries, for Irix 4 and PTX, respectively. Then, if @code{getmntent} is
available, define @code{HAVE_GETMNTENT}.
@end defmac
+@defmac AC_FUNC_GETPGRP
+@maindex FUNC_GETPGRP
+@cvindex GETPGRP_VOID
+If @code{getpgrp} takes no argument (the POSIX.1 version), define
+@code{GETPGRP_VOID}. Otherwise, it is the BSD version, which takes a
+process ID as an argument. This macro does not check whether
+@code{getpgrp} exists at all; if you need to work in that situation,
+first call @code{AC_CHECK_FUNC} for @code{getpgrp}.
+@end defmac
+
@defmac AC_FUNC_MEMCMP
@maindex FUNC_MEMCMP
@ovindex LIBOBJS
@code{vfork} is not found, define @code{vfork} to be @code{fork}. This
macro checks for several known errors in implementations of @code{vfork}
and considers the system to not have a working @code{vfork} if it
-detects any of them.
+detects any of them. It is not considered to be an implementation error
+if a child's invocation of @code{signal} modifies the parent's signal
+handler, since child processes rarely change their signal handlers.
@end defmac
@defmac AC_FUNC_VPRINTF
@defmac AC_C_INLINE
@maindex C_INLINE
@cvindex inline
-If the C compiler is a version of GCC that supports the keyword
-@code{__inline} but not @code{inline} (such as some NeXT versions),
-define @code{inline} to be @code{__inline}.
+If the C compiler supports the keyword @code{inline}, do nothing.
+Otherwise define @code{inline} to @code{__inline__} or @code{__inline}
+if it accepts one of those, otherwise define @code{inline} to be empty.
@end defmac
@defmac AC_C_CHAR_UNSIGNED
@defmac AC_SYS_INTERPRETER
@maindex SYS_INTERPRETER
Check whether the system supports starting scripts with a line of the
-form @samp{#!/bin/csh} to select the interpreter to use for the script.
+form @samp{#! /bin/csh} to select the interpreter to use for the script.
After running this macro, shell code in @code{configure.in} can check
the variable @code{ac_cv_sys_interpreter}; it will be set to @samp{yes}
if the system supports @samp{#!}, @samp{no} if not.
@ovindex X_LIBS
@ovindex X_EXTRA_LIBS
@ovindex X_PRE_LIBS
-An enhanced version of @code{AC_PATH_X}. Add the C compiler flags that
+An enhanced version of @code{AC_PATH_X}. It adds the C compiler flags that
X needs to output variable @code{X_CFLAGS}, and the X linker flags to
-@code{X_LIBS}. If X is not available, add @samp{-DX_DISPLAY_MISSING} to
+@code{X_LIBS}. If X is not available, adds @samp{-DX_DISPLAY_MISSING} to
@code{X_CFLAGS}.
-Also check for special libraries that some systems need in order to
-compile X programs. Add any that the system needs to output variable
-@code{X_EXTRA_LIBS}. And check for special X11R6 libraries that need to
-be linked with before @samp{-lX11}, and add any found to the output
-variable @code{X_PRE_LIBS}.
+This macro also checks for special libraries that some systems need in
+order to compile X programs. It adds any that the system needs to
+output variable @code{X_EXTRA_LIBS}. And it checks for special X11R6
+libraries that need to be linked with before @samp{-lX11}, and adds any
+found to the output variable @code{X_PRE_LIBS}.
+
+@c This is an incomplete kludge. Make a real way to do it.
+@c If you need to check for other X functions or libraries yourself, then
+@c after calling this macro, add the contents of @code{X_EXTRA_LIBS} to
+@c @code{LIBS} temporarily, like this:
@end defmac
@defmac AC_SYS_LONG_FILE_NAMES
features call these macros and do cache their results and print messages
about what they're checking for.
+When you write a feature test that could be applicable to more than one
+software package, the best thing to do is encapsulate it in a new macro.
+@xref{Writing Macros}, for how to do that.
+
@menu
* Examining Declarations:: Detecting header files and declarations.
* Examining Syntax:: Detecting language syntax features.
configuration scripts produced by Autoconf unusable on those systems.
However, some of them can be given options that make the exit status
correct. This is a problem that Autoconf does not currently handle
-automatically.
+automatically. If users encounter this problem, they might be able to
+solve it by setting @code{LDFLAGS} in the environment to pass whatever
+options the linker needs (for example, @samp{-Wl,-dn} on MIPS RISC/OS).
@code{AC_TRY_LINK} is used to compile test programs to test for
functions and global variables. It is also used (by
You should not use shell functions, aliases, negated character classes,
or other features that are not found in all Bourne-compatible shells;
restrict yourself to the lowest common denominator. Even @code{unset}
-is not supported by all shells!
+is not supported by all shells! Also, include a space after the
+exclamation point in interpreter specifications, like this:
+@example
+#! /usr/bin/perl
+@end example
+If you omit the space before the path, then 4.2BSD based systems (such
+as Sequent DYNIX) will ignore the line, because they interpret @samp{#! /}
+as a 4-byte magic number.
The set of external programs you should run in a @code{configure} script
is fairly small. @xref{Utilities in Makefiles, , Utilities in
@maindex MSG_ERROR
Notify the user of an error that prevents @code{configure} from
completing. This macro prints an error message on the standard error
-stream and exits @code{configure} with a nonzero status.
+output and exits @code{configure} with a nonzero status.
@var{error-description} should be something like @samp{invalid value
$HOME for \$HOME}.
@end defmac
@defmac AC_MSG_WARN (@var{problem-description})
@maindex MSG_WARN
Notify the @code{configure} user of a possible problem. This macro
-prints the message on the standard error stream; @code{configure}
+prints the message on the standard error output; @code{configure}
continues running afterward, so macros that call @code{AC_MSG_WARN} should
provide a default (back-up) behavior for the situations they warn about.
@var{problem-description} should be something like @samp{ln -s seems to
A few kinds of features can't be guessed automatically by running test
programs. For example, the details of the object file format, or
-special options that need to be passed to the compiler or linker. It is
-possible to check for such features using ad-hoc means, such as having
+special options that need to be passed to the compiler or linker. You
+can check for such features using ad-hoc means, such as having
@code{configure} check the output of the @code{uname} program, or
looking for libraries that are unique to particular systems. However,
Autoconf provides a uniform method for handling unguessable features.
to @file{@var{srcdir}/config/$@{obj_format@}.h}.
@end defmac
+You can also use the host system type to find cross-compilation tools.
+@xref{Generic Programs}, for information about the @code{AC_CHECK_TOOL}
+macro which does that.
+
@node Site Configuration, Invoking configure, Manual Configuration, Top
@chapter Site Configuration
user asked to use it. Whether each package is used or not by
default, and which arguments are valid, is up to you.
-@defmac AC_ARG_WITH (@var{package}, @var{help-string}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
+@defmac AC_ARG_WITH (@var{package}, @var{help-string} @r{[}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]]})
@maindex ARG_WITH
If the user gave @code{configure} the option @samp{--with-@var{package}}
or @samp{--without-@var{package}}, run shell commands
-@var{action-if-true}. Otherwise run shell commands
-@var{action-if-false}. The name @var{package} indicates another
+@var{action-if-given}. If neither option was given, run shell commands
+@var{action-if-not-given}. The name @var{package} indicates another
software package that this program should work with. It should consist
only of alphanumeric characters and dashes.
The option's argument is available to the shell commands
-@var{action-if-true} in the shell variable @code{withval}.
+@var{action-if-given} in the shell variable @code{withval}, which is
+actually just the value of the shell variable @code{with_@var{package}};
+you may use that variable instead, if you wish.
The argument @var{help-string} is a description of the option which
looks like this:
and @samp{]} in order to produce the leading spaces.
@end defmac
-@defmac AC_WITH (@var{package}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
+@defmac AC_WITH (@var{package}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]})
@maindex WITH
This is an obsolete version of @code{AC_ARG_WITH} that does not
support providing a help string.
to include it. Whether each feature is included or not by default, and
which arguments are valid, is up to you.
-@defmac AC_ARG_ENABLE (@var{feature}, @var{help-string}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
+@defmac AC_ARG_ENABLE (@var{feature}, @var{help-string} @r{[}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]]})
@maindex ARG_ENABLE
If the user gave @code{configure} the option
@samp{--enable-@var{feature}} or @samp{--disable-@var{feature}}, run
-shell commands @var{action-if-true}. Otherwise run shell commands
-@var{action-if-false}. The name @var{feature} indicates an optional
-user-level facility. It should consist only of alphanumeric characters
-and dashes.
+shell commands @var{action-if-given}. If neither option was given, run
+shell commands @var{action-if-not-given}. The name @var{feature}
+indicates an optional user-level facility. It should consist only of
+alphanumeric characters and dashes.
The option's argument is available to the shell commands
-@var{action-if-true} in the shell variable @code{enableval}.
+@var{action-if-given} in the shell variable @code{enableval}, which is
+actually just the value of the shell variable @code{enable_@var{package}};
+you may use that variable instead, if you wish.
The @var{help-string} argument is like that of @code{AC_ARG_WITH}
(@pxref{External Software}).
@end defmac
-@defmac AC_ENABLE (@var{feature}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]})
+@defmac AC_ENABLE (@var{feature}, @var{action-if-given} @r{[}, @var{action-if-not-given}@r{]})
@maindex ENABLE
This is an obsolete version of @code{AC_ARG_ENABLE} that does not
support providing a help string.
can either be based on the @code{prefix} variable, or be a standard
location such as the user's home directory. It could even be specified
by an environment variable. The programs should examine that file at
-run time, rather than at compile time. That approach is more convenient
-for users and makes the configuration process simpler than getting the
-information while configuring. @xref{Directory Variables, , Variables
-for Installation Directories, standards, GNU Coding Standards}, for more
-information on where to put data files.
+run time, rather than at compile time. Run time configuration is more
+convenient for users and makes the configuration process simpler than
+getting the information while configuring. @xref{Directory Variables, ,
+Variables for Installation Directories, standards, GNU Coding
+Standards}, for more information on where to put data files.
@node Transforming Names, Site Defaults, Site Details, Site Configuration
@section Transforming Program Names When Installing
@end defmac
@menu
-* Transformation Options:: @code{configure} options to transforme names.
+* Transformation Options:: @code{configure} options to transform names.
* Transformation Examples:: Sample uses of transforming names.
* Transformation Rules:: @file{Makefile} uses of transforming names.
@end menu
@samp{--program-prefix=g}, then when you run @samp{make install} it is
installed as @file{/usr/local/bin/gdiff}.
-As a more sophistocated example, you could use
+As a more sophisticated example, you could use
@example
--program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/'
@end example
@code{CC} in that site file, because the cache file is only valid for a
particular compiler, but many systems have several available.
+You can examine or override the value set by a command line option to
+@code{configure} in a site file; options set shell variables that have
+the same names as the options, with any dashes turned into underscores.
+The exceptions are that @samp{--without-} and @samp{--disable-} options
+are like giving the corresponding @samp{--with-} or @samp{--enable-}
+option and the value @samp{no}. Thus, @samp{--cache-file=localcache}
+sets the variable @code{cache_file} to the value @samp{localcache};
+@samp{--enable-warnings=no} or @samp{--disable-warnings} sets the variable
+@code{enable_warnings} to the value @samp{no}; @samp{--prefix=/usr} sets the
+variable @code{prefix} to the value @samp{/usr}; etc.
+
Site files are also good places to set default values for other output
variables, such as @code{CFLAGS}, if you need to give them non-default
values: anything you would normally do, repetitively, on the command
@menu
* Basic Installation:: Instructions for typical cases.
* Compilers and Options:: Selecting compilers and optimization.
-* Build Directory:: Configuring in a different directory.
+* Multiple Architectures:: Compiling for multiple architectures at once.
* Installation Names:: Installing in different directories.
* Optional Features:: Selecting optional features.
* System Type:: Specifying the system type.
this kind of database, but in fact it is not. Instead of listing host
dependencies, it lists program requirements.
-Imake is special-purpose. It is directed at building the X11
-distribution. By comparison to the GNU tools, this is a simple problem.
If you view the GNU suite as a collection of native tools, then the
-problems are similar. But the GNU tools are more powerful than that.
-The development tools can be configured as cross tools in almost any
-host+target permutation. All of these configurations can be installed
-concurrently. They can even be configured to share host independent
-files across hosts. Imake doesn't address these issues.
+problems are similar. But the GNU development tools can be configured
+as cross tools in almost any host+target permutation. All of these
+configurations can be installed concurrently. They can even be
+configured to share host independent files across hosts. Imake doesn't
+address these issues.
Imake templates are a form of standardization. The GNU coding standards
address the same issues without necessarily imposing the same
tree, or the Imake configuration might assume one compiler whereas the
package or the installer needs to use another, or there might be a
version mismatch between the Imake expected by the package and the Imake
-suported by the host. These problems are much rarer with Autoconf,
+supported by the host. These problems are much rarer with Autoconf,
where each package comes with its own independent configuration
processor.
Finally, Mark Eichin notes:
Imake isn't all that extensible, either. In order to add new features to
-Imake, you need to provide you own project template, and duplicate most
+Imake, you need to provide your own project template, and duplicate most
of the features of the existing one. This means that for a sophisticated
project, using the vendor-provided Imake templates fails to provide any
leverage---since they don't cover anything that your own project needs
@file{acsite.m4}. @xref{Invoking autoconf}.
If you distribute @file{install.sh} with your package, rename it to
-@file{install-sh} so @code{make} builtin rules won't inadvertantly
+@file{install-sh} so @code{make} builtin rules won't inadvertently
create a file called @file{install} from it. @code{AC_PROG_INSTALL}
looks for the script under both names, but it is best to use the new name.
of those variables in the environment when @code{configure} is run.
Doing this isn't necessary, but it's a convenience for users.
-Also add @samp{@@configure_input@@} in a comment to each input file for
+Also add @samp{@@configure_input@@} in a comment to each non-@file{Makefile}
+input file for
@code{AC_OUTPUT}, so that the output files will contain a comment saying
they were produced by @code{configure}. Automatically selecting the
right comment syntax for all the kinds of files that people call
@end example
@noindent
-The old feature of replacing those variables without @samp{@@}
+The old behavior of replacing those variables without @samp{@@}
characters around them has been removed.
@node Changed Macros, Invoking autoupdate, Changed Makefiles, Upgrading
-#!/bin/sh
+#! /bin/sh
# autoheader -- create `config.h.in' from `configure.in'
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
done
fi
+# Handle the case where @BOTTOM@ is the first line of acconfig.h.
test -r $localdir/acconfig.h &&
grep @BOTTOM@ $localdir/acconfig.h >/dev/null &&
- sed '1,/@BOTTOM@/d' $localdir/acconfig.h
+ sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
test -f ${config_h}.bot && cat ${config_h}.bot
status=0
-#!/bin/sh
+#! /bin/sh
# autoreconf - remake all Autoconf configure scripts in a directory tree
# Copyright (C) 1994 Free Software Foundation, Inc.
test ! -f $aclocal && aclocal=
if test $force = no && test -f configure &&
- ls -Llt configure configure.in $aclocal | sed 1q |
+ ls -lt configure configure.in $aclocal | sed 1q |
grep 'configure$' > /dev/null
then
:
-#!@PERL@
+#! @PERL@
# autoscan - Create configure.scan (a preliminary configure.in) for a package.
# Copyright (C) 1994 Free Software Foundation, Inc.
-#!/bin/sh
+#! /bin/sh
# autoupdate - modernize a configure.in
# Copyright (C) 1994 Free Software Foundation, Inc.
-#!/bin/sh
+#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# 1.2 uses "1.2" for uname -r.
echo alpha-dec-osf${UNAME_RELEASE}
exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
sun4*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit 0 ;;
- *:IRIX:*:*)
- echo mips-sgi-irix${UNAME_RELEASE}
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i[34]86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit 0 ;;
- CRAY*X-MP:UNICOS:*:*)
+ CRAY*X-MP:*:*:*)
echo xmp-cray-unicos
exit 0 ;;
- CRAY*Y-MP:UNICOS:*:*)
- echo ymp-cray-unicos
- exit 0 ;;
- CRAY-2:UNICOS:*:*)
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY*C90:*:*:*)
+ echo c90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
hp3[0-9][05]:NetBSD:*:*)
echo m68k-hp-netbsd${UNAME_RELEASE}
exit 0 ;;
- i[34]86:BSD/386:*:*)
+ i[34]86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
*:FreeBSD:*:*)
echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux
- exit 0 ;;
+ # Systems without a BFD linker
+ if test -d /usr/lib/ldscripts/. ; then
+ :
+ else
+ echo "${UNAME_MACHINE}-unknown-linuxoldld"
+ exit 0
+ fi
+ # Determine whether the default compiler is a.out or elf
+ cat >dummy.c <<EOF
+main(argc, argv)
+int argc;
+char *argv[];
+{
+#ifdef __ELF__
+ printf ("%s-unknown-linux\n", argv[1]);
+#else
+ printf ("%s-unknown-linuxaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy;;
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
# are messed up and put the nodename in both sysname and nodename.
i[34]86:DYNIX/ptx:4*:*)
fi
exit 0 ;;
i[34]86:*:3.2:*)
- if /bin/uname -X 2>/dev/null >/dev/null ; then
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
- elif test -f /usr/options/cb.name; then
- UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
else
echo ${UNAME_MACHINE}-unknown-sysv32
fi
Intel:Mach:3*:*)
echo i386-unknown-mach3
exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
I don't know.... */
printf ("mips-sony-bsd\n"); exit (0);
#else
- printf ("m68k-sony-newsos\n"); exit (0);
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
#endif
#endif
-#!/bin/sh
+#! /bin/sh
# Configuration validation subroutine script, version 1.1.
-# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
+
# First pass through any local machine types.
case $1 in
*local*)
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
;;
- -lynx)
+ -lynx*)
os=-lynxos
;;
-ptx*)
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
+ tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
+ | arme[lb] | pyramid \
| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
| alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
- | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
- | pdp11 | mips64el | mips64orion | mips64orionel )
+ | powerpc | powerpcle | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
+ | pdp11 | mips64el | mips64orion | mips64orionel \
+ | sparc)
basic_machine=$basic_machine-unknown
;;
# Object if more than one company name word.
# Recognize the basic CPU types with company name.
vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \
| sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
| none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
| hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
| pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
- | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \
- | mips64el-* | mips64orion-* | mips64orionel-* )
+ | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium-*)
- # We will change tis to say i586 once there has been
- # time for various packages to start to recognize that.
- basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'`
+ pentium | p5 | p6)
+ # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium
+ basic_machine=i586-intel
+ ;;
+ pentium-* | p5-* | p6-*)
+ # We don't have specific support for the Intel Pentium (p6) followon yet, so just call it a Pentium
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ k5)
+ # We don't have specific support for AMD's K5 yet, so just call it a Pentium
+ basic_machine=i586-amd
+ ;;
+ nexen)
+ # We don't have specific support for Nexgen yet, so just call it a Pentium
+ basic_machine=i586-nexgen
;;
pn)
basic_machine=pn-gould
;;
+ power) basic_machine=rs6000-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
ps2)
basic_machine=i386-ibm
;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
basic_machine=sparc-sun
os=-sunos4
;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
basic_machine=m68k-wrs
os=-vxworks
;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
xmp)
basic_machine=xmp-cray
os=-unicos
-solaris)
os=-solaris2
;;
+ -unixware* | svr4*)
+ os=-sysv4
+ ;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux|'`
;;
# First accept the basic system types.
# The portable systems comes first.
- # Each alternative must end in a *, to match a version number.
+ # Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
| -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
- | -ptx* | -coff* | -winnt*)
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* )
+ # Remember, each alternative MUST END IN *, to match a version number.
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
-ctix* | -uts*)
os=-sysv
;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
-triton*)
os=-sysv3
;;
*-acorn)
os=-riscix1.2
;;
+ arm*-semi)
+ os=-aout
+ ;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
+ m68*-apollo)
+ os=-domain
+ ;;
i386-sun)
os=-sunos4.0.2
;;
*-sgi)
os=-irix
;;
+ *-siemens)
+ os=-sysv4
+ ;;
*-masscomp)
os=-rtu
;;
-ptx*)
vendor=sequent
;;
+ -vxworks*)
+ vendor=wrs
+ ;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
-#!/bin/sh
-
+#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.1
+# Generated automatically using autoconf version 2.4
# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.1"
+ echo "configure generated by autoconf version 2.4"
exit 0 ;;
-with-* | --with-*)
{ echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
fi
-trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
# File descriptor usage:
-# 0 unused; standard input
+# 0 standard input
# 1 file creation
# 2 errors and warnings
-# 3 unused; some systems may open it to /dev/tty
-# 4 checking for... messages and results
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
# 5 compiler messages saved in config.log
if test "$silent" = yes; then
- exec 4>/dev/null
+ exec 6>/dev/null
else
- exec 4>&1
+ exec 6>&1
fi
exec 5>./config.log
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&5 2>&5'
-ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&5 2>&5'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_path_M4'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
case "$M4" in
/*)
fi
M4="$ac_cv_path_M4"
if test -n "$M4"; then
- echo "$ac_t""$M4" 1>&4
+ echo "$ac_t""$M4" 1>&6
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
test -n "$M4" && break
done
test -n "$M4" || M4="m4"
+for ac_prog in mawk gawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_AWK="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+ echo "$ac_t""$AWK" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+
# Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&4
-if eval "test \"`echo '${'ac_cv_path_PERL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
case "$PERL" in
/*)
fi
PERL="$ac_cv_path_PERL"
if test -n "$PERL"; then
- echo "$ac_t""$PERL" 1>&4
+ echo "$ac_t""$PERL" 1>&6
else
- echo "$ac_t""no" 1>&4
+ echo "$ac_t""no" 1>&6
fi
if test "$PERL" != no; then
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&4
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '${'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&4
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
- case "$ac_dir" in
- ''|.|/etc|/usr/sbin|/usr/etc|/sbin|/usr/afsws/bin|/usr/ucb) ;;
+ # Account for people who put trailing slashes in PATH elements.
+ case "$ac_dir/" in
+ /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
for ac_prog in ginstall installbsd scoinst install; do
fi
INSTALL="$ac_cv_path_install"
fi
-echo "$ac_t""$INSTALL" 1>&4
+echo "$ac_t""$INSTALL" 1>&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
fi
trap '' 1 2 15
-cat > $cache_file.$$ <<\EOF
+cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# --recheck option to rerun configure.
#
EOF
-# Ultrix sh set writes to stderr and can't be redirected directly.
-# Ultrix sh set also returns variables that were read in from the config file
-# with their high bit set.
-(set) 2>&1 | tr '\201-\377' '\001-\177' |
- sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
- >> $cache_file.$$
-if cmp -s $cache_file $cache_file.$$; then
- true
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+ sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
+ >> confcache
+if cmp -s $cache_file confcache; then
+ :
else
if test -w $cache_file; then
echo "updating cache $cache_file"
- cat $cache_file.$$ > $cache_file
+ cat confcache > $cache_file
else
echo "not updating unwritable cache $cache_file"
- diff $cache_file $cache_file.$$
fi
fi
-rm -f $cache_file.$$
+rm -f confcache
-trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
echo creating $CONFIG_STATUS
rm -f $CONFIG_STATUS
cat > $CONFIG_STATUS <<EOF
-#!/bin/sh
+#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.1"
+ echo "$CONFIG_STATUS generated by autoconf version 2.4"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -f Makefile testsuite/Makefile; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile testsuite/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
s%@prefix@%$prefix%g
s%@program_transform_name@%$program_transform_name%g
s%@M4@%$M4%g
+s%@AWK@%$AWK%g
s%@PERL@%$PERL%g
s%@SCRIPTS@%$SCRIPTS%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
# The file is in a subdirectory.
test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/$ac_dir"
+ ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
# A "../" for each directory in $ac_dir_suffix.
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
else
EOF
chmod +x $CONFIG_STATUS
rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
dnl first and get that path embedded in the installed autoconf and
dnl autoheader scripts.
AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
+AC_PROG_AWK
dnl We use a path for perl so the #! line in autoscan will work.
AC_PATH_PROG(PERL, perl, no)
-#!/bin/sh
+#! /bin/sh
# ifnames - print the identifiers used in C preprocessor conditionals
-# Copyright (C) 1994 Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Writes to stdout.
# Written by David MacKenzie <djm@gnu.ai.mit.edu>
+# and Paul Eggert <eggert@twinsun.com>.
usage="\
Usage: ifnames [-h] [--help] [-m dir] [--macrodir=dir] [--version] [file...]"
show_version=no
-test -z "$AC_MACRODIR" && AC_MACRODIR=@datadir@
+: ${AC_MACRODIR=@datadir@}
while test $# -gt 0; do
case "$1" in
exit 0
fi
-if test $# -eq 0; then
- cat > stdin
- set stdin
- trap 'rm -f stdin' 0
- trap 'rm -f stdin; exit 1' 1 3 15
-fi
+@AWK@ '
+ # Record that sym was found in FILENAME.
+ function file_sym(sym, i, fs) {
+ if (sym ~ /^[A-Za-z_]/) {
+ if (!found[sym,FILENAME]) {
+ found[sym,FILENAME] = 1
+
+ # Insert FILENAME into files[sym], keeping the list sorted.
+ i = 1
+ fs = files[sym]
+ while (match(substr(fs, i), /^ [^ ]*/) \
+ && substr(fs, i + 1, RLENGTH - 1) < FILENAME) {
+ i += RLENGTH
+ }
+ files[sym] = substr(fs, 1, i - 1) " " FILENAME substr(fs, i)
+ }
+ }
+ }
+
+ /^[\t ]*#/ {
+ if (sub(/^[\t ]*#[\t ]*ifn?def[\t ]+/, "", $0)) {
+ sub(/[^A-Za-z_0-9].*/, "", $0)
+ file_sym($0)
+ }
+ if (sub(/^[\t ]*#[\t ]*(el)?if[\t ]+/, "", $0)) {
+ # Remove comments. Not perfect, but close enough.
+ gsub(/\/\*[^\/]*(\*\/)?/, "", $0)
+
+ for (i = split($0, field, /[^A-Za-z_0-9]+/); 1 <= i; i--) {
+ if (field[i] != "defined") {
+ file_sym(field[i])
+ }
+ }
+ }
+ }
-for arg
-do
-# The first two substitutions remove comments. Not perfect, but close enough.
-# The second is for comments that end on a later line. The others do:
-# Enclose identifiers in @ and a space.
-# Handle "#if 0" -- there are no @s to trigger removal.
-# Remove non-identifiers.
-# Remove any spaces at the end.
-# Translate any other spaces to newlines.
-sed -n '
-s%/\*[^/]*\*/%%g
-s%/\*[^/]*%%g
-/^[ ]*#[ ]*ifn*def[ ][ ]*\([A-Za-z0-9_]*\).*/s//\1/p
-/^[ ]*#[ ]*e*l*if[ ]/{
- s///
- s/@//g
- s/\([A-Za-z_][A-Za-z_0-9]*\)/@\1 /g
- s/$/@ /
- s/@defined //g
- s/[^@]*@\([^ ]* \)[^@]*/\1/g
- s/ *$//
- s/ /\
-/g
- p
-}
-' $arg | sort -u | sed 's%$% '$arg'%'
-done | awk '
-{ files[$1] = files[$1] " " $2 }
-END { for (sym in files) print sym files[sym] }' | sort
+ END {
+ for (sym in files) {
+ print sym files[sym]
+ }
+ }
+' ${1+"$@"} | sort
-#!/bin/sh
+#! /bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5.
documentation.
@item
-You can remove the program binaries and object files from the source
+You can remove the program binaries and object files from the source code
directory by typing @samp{make clean}. To also remove the files that
@code{configure} created (so you can compile the package for a different
-kind of computer), type @samp{make distclean}.
+kind of computer), type @samp{make distclean}. There is also a
+@samp{make maintainer-clean} target, but that is intended mainly for the
+package's developers. If you use it, you may have to get all sorts of
+other programs in order to regenerate files that came with the distribution.
@end enumerate
@node Compilers and Options
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
@end example
-@node Build Directory
-@section Using a Different Build Directory
+@node Multiple Architectures
+@section Compiling For Multiple Architectures
-You can compile the package in a different directory from the one
-containing the source code. Doing so allows you to compile it on more
-than one kind of computer at the same time. To do this, you must use a
-version of @code{make} that supports the @code{VPATH} variable, such as
-GNU @code{make}. @code{cd} to the directory where you want the object
-files and executables to go and run the @code{configure} script.
-@code{configure} automatically checks for the source code in the
-directory that @code{configure} is in and in @file{..}.
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of @code{make} that
+supports the @code{VPATH} variable, such as GNU @code{make}. @code{cd}
+to the directory where you want the object files and executables to go
+and run the @code{configure} script. @code{configure} automatically
+checks for the source code in the directory that @code{configure} is in
+and in @file{..}.
+
+If you have to use a @code{make} that does not supports the @code{VPATH}
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use @samp{make distclean} before reconfiguring for
+another architecture.
@node Installation Names
@section Installation Names
@table @code
@item --cache-file=@var{file}
-Save the results of the tests in @var{file} instead of
-@file{config.cache}. Set @var{file} to @file{/dev/null} to disable
+Use and save the results of the tests in @var{file} instead of
+@file{./config.cache}. Set @var{file} to @file{/dev/null} to disable
caching, for debugging @code{configure}.
@item --help
simple test to verify that a program is properly installed, this target
should run that test.
+If possible, write the @code{install} target rule so that it does not
+modify anything in the directory where the program was built, provided
+@samp{make all} has just been done. This is convenient for building the
+program under one user name and installing it under another.
+
The commands should create all the directories in which files are to be
installed, if they don't already exist. This includes the directories
specified as the values of the variables @code{prefix} and
create (but not the noninstalled files such as @samp{make all} would
create).
+This rule should not modify the directories where compilation is done,
+only the directories where files are installed.
+
@comment The gratuitous blank line here is to make the table look better
@comment in the printed Make manual. Please leave it in.
@item clean
target for GCC does not delete @file{libgcc.a}, because recompiling it
is rarely necessary and takes a lot of time.
-@item realclean
-Delete everything from the current directory that can be reconstructed
-with this Makefile. This typically includes everything deleted by
-@code{distclean}, plus more: C source files produced by Bison, tags tables,
-Info files, and so on.
+@item maintainer-clean
+Delete almost everything from the current directory that can be
+reconstructed with this Makefile. This typically includes everything
+deleted by @code{distclean}, plus more: C source files produced by
+Bison, tags tables, Info files, and so on.
+
+The reason we say ``almost everything'' is that @samp{make
+maintainer-clean} should not delete @file{configure} even if
+@file{configure} can be remade using a rule in the Makefile. More
+generally, @samp{make maintainer-clean} should not delete anything that
+needs to exist in order to run @file{configure} and then begin to build
+the program. This is the only exception; @code{maintainer-clean} should
+delete everything else that can be rebuilt.
+
+The @samp{maintainer-clean} is intended to be used by a maintainer of
+the package, not by ordinary users. You may need special tools to
+reconstruct some of the files that @samp{make maintainer-clean} deletes.
+Since these files are normally included in the distribution, we don't
+take care to make them easy to reconstruct. If you find you need to
+unpack the full distribution again, don't blame us.
+
+To help make users aware of this, the commands for
+@code{maintainer-clean} should start with these two:
-One exception, however: @samp{make realclean} should not delete
-@file{configure} even if @file{configure} can be remade using a rule in
-the Makefile. More generally, @samp{make realclean} should not delete
-anything that needs to exist in order to run @file{configure}
-and then begin to build the program.
+@example
+@@echo "This command is intended for maintainers to use;"
+@@echo "it deletes files that may require special tools to rebuild."
+@end example
@item TAGS
Update a tags table for this program.
$(libdir) $(infodir) \
$(mandir)
@end smallexample
+
+This rule should not modify the directories where compilation is done.
+It should do nothing but create installation directories.
@end table
@node Command Variables
Installation directories should always be named by variables, so it is
easy to install in a nonstandard place. The standard names for these
-variables are as follows.
+variables are described below. They are based on a standard filesystem
+layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
+other modern operating systems.
These two variables set the root for the installation. All the other
installation directories should be subdirectories of one of these two,
@item prefix
A prefix used in constructing the default values of the variables listed
below. The default value of @code{prefix} should be @file{/usr/local}
-(at least for now).
+When building the complete GNU system, the prefix will be empty and
+@file{/usr} will be a symbolic link to @file{/}.
@item exec_prefix
A prefix used in constructing the default values of some of the
-#!/bin/sh
+#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
-This is Info file ../standards.info, produced by Makeinfo-1.55 from the
-input file ../standards.texi.
+This is Info file standards.info, produced by Makeinfo-1.55 from the
+input file standards.texi.
START-INFO-DIR-ENTRY
* Standards: (standards). GNU coding standards.
\1f
Indirect:
-standards.info-1: 960
-standards.info-2: 49450
+standards.info-1: 954
+standards.info-2: 48207
+standards.info-3: 95193
\1f
Tag Table:
(Indirect)
-Node: Top\7f960
-Node: Preface\7f2096
-Node: Reading Non-Free Code\7f3138
-Node: Contributions\7f4868
-Node: Change Logs\7f6466
-Node: Compatibility\7f10182
-Node: Makefile Conventions\7f11821
-Node: Makefile Basics\7f12178
-Node: Utilities in Makefiles\7f14522
-Node: Standard Targets\7f16219
-Node: Command Variables\7f23328
-Node: Directory Variables\7f26158
-Node: Configuration\7f35220
-Node: Source Language\7f42244
-Node: Formatting\7f43374
-Node: Comments\7f46664
-Node: Syntactic Conventions\7f49450
-Node: Names\7f52342
-Node: Using Extensions\7f53632
-Node: System Functions\7f55373
-Node: Semantics\7f60176
-Node: Errors\7f63464
-Node: Libraries\7f64667
-Node: Portability\7f65891
-Node: User Interfaces\7f69178
-Node: Documentation\7f85106
-Node: Releases\7f89040
+Node: Top\7f954
+Node: Preface\7f2091
+Node: Reading Non-Free Code\7f3127
+Node: Contributions\7f4857
+Node: Change Logs\7f6455
+Node: Compatibility\7f10181
+Node: Makefile Conventions\7f11820
+Node: Makefile Basics\7f12177
+Node: Utilities in Makefiles\7f14521
+Node: Standard Targets\7f16218
+Node: Command Variables\7f24726
+Node: Directory Variables\7f27556
+Node: Configuration\7f36859
+Node: Source Language\7f43787
+Node: Formatting\7f44917
+Node: Comments\7f48207
+Node: Syntactic Conventions\7f50994
+Node: Names\7f53886
+Node: Using Extensions\7f55623
+Node: System Functions\7f57364
+Node: Semantics\7f62167
+Node: Errors\7f65800
+Node: Libraries\7f67004
+Node: Portability\7f68228
+Node: User Interfaces\7f71515
+Node: Documentation\7f88583
+Node: GNU Manuals\7f89090
+Node: Manual Structure Details\7f91101
+Node: NEWS File\7f92506
+Node: Man Pages\7f93185
+Node: Reading other Manuals\7f94409
+Node: Releases\7f95193
\1f
End Tag Table
-This is Info file ../standards.info, produced by Makeinfo-1.55 from the
-input file ../standards.texi.
+This is Info file standards.info, produced by Makeinfo-1.55 from the
+input file standards.texi.
START-INFO-DIR-ENTRY
* Standards: (standards). GNU coding standards.
Version
*******
- Last updated 21 September 1994.
+ Last updated 16 May 1995.
* Menu:
* Formatting:: Formatting Your Source Code
* Comments:: Commenting Your Work
* Syntactic Conventions:: Clean Use of C Constructs
-* Names:: Naming Variables and Functions
+* Names:: Naming Variables, Functions and Files
* Using Extensions:: Using Non-standard Features
* System Functions:: Portability and "standard" library functions
* Semantics:: Program Behavior for All Programs
diff to the `standards.texi' or `make-stds.texi' files, but if you
don't have those files, please mail your suggestion anyway.
- This release of the GNU Coding Standards was last updated 21
-September 1994.
+ This release of the GNU Coding Standards was last updated 16 May
+1995.
\1f
File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Prev: Preface, Up: Top
program; they can give you a history of how the conflicting concepts
arose.
- Use the Emacs command `M-x add-change' to start a new entry in the
-change log. An entry should have an asterisk, the name of the changed
-file, and then in parentheses the name of the changed functions,
-variables or whatever, followed by a colon. Then describe the changes
-you made to that function or variable.
+ Use the Emacs command `M-x add-change-log-entry' to start a new
+entry in the change log. An entry should have an asterisk, the name of
+the changed file, and then in parentheses the name of the changed
+functions, variables or whatever, followed by a colon. Then describe
+the changes you made to that function or variable.
Separate unrelated entries with blank lines. When two entries
represent parts of the same change, so that they work together, then
there is a simple test to verify that a program is properly
installed, this target should run that test.
+ If possible, write the `install' target rule so that it does not
+ modify anything in the directory where the program was built,
+ provided `make all' has just been done. This is convenient for
+ building the program under one user name and installing it under
+ another.
+
The commands should create all the directories in which files are
to be installed, if they don't already exist. This includes the
directories specified as the values of the variables `prefix' and
create (but not the noninstalled files such as `make all' would
create).
+ This rule should not modify the directories where compilation is
+ done, only the directories where files are installed.
+
`clean'
Delete all files from the current directory that are normally
created by building the program. Don't delete the files that
target for GCC does not delete `libgcc.a', because recompiling it
is rarely necessary and takes a lot of time.
-`realclean'
- Delete everything from the current directory that can be
+`maintainer-clean'
+ Delete almost everything from the current directory that can be
reconstructed with this Makefile. This typically includes
everything deleted by `distclean', plus more: C source files
produced by Bison, tags tables, Info files, and so on.
- One exception, however: `make realclean' should not delete
- `configure' even if `configure' can be remade using a rule in the
- Makefile. More generally, `make realclean' should not delete
- anything that needs to exist in order to run `configure' and then
- begin to build the program.
+ The reason we say "almost everything" is that `make
+ maintainer-clean' should not delete `configure' even if
+ `configure' can be remade using a rule in the Makefile. More
+ generally, `make maintainer-clean' should not delete anything that
+ needs to exist in order to run `configure' and then begin to build
+ the program. This is the only exception; `maintainer-clean' should
+ delete everything else that can be rebuilt.
+
+ The `maintainer-clean' is intended to be used by a maintainer of
+ the package, not by ordinary users. You may need special tools to
+ reconstruct some of the files that `make maintainer-clean' deletes.
+ Since these files are normally included in the distribution, we
+ don't take care to make them easy to reconstruct. If you find you
+ need to unpack the full distribution again, don't blame us.
+
+ To help make users aware of this, the commands for
+ `maintainer-clean' should start with these two:
+
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
`TAGS'
Update a tags table for this program.
$(libdir) $(infodir) \
$(mandir)
+ This rule should not modify the directories where compilation is
+ done. It should do nothing but create installation directories.
+
\1f
File: standards.info, Node: Command Variables, Next: Directory Variables, Prev: Standard Targets, Up: Makefile Conventions
Installation directories should always be named by variables, so it
is easy to install in a nonstandard place. The standard names for these
-variables are as follows.
+variables are described below. They are based on a standard filesystem
+layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
+other modern operating systems.
These two variables set the root for the installation. All the other
installation directories should be subdirectories of one of these two,
`prefix'
A prefix used in constructing the default values of the variables
listed below. The default value of `prefix' should be `/usr/local'
- (at least for now).
+ When building the complete GNU system, the prefix will be empty and
+ `/usr' will be a symbolic link to `/'.
`exec_prefix'
A prefix used in constructing the default values of some of the
The `configure' script needs to be able to decode all plausible
alternatives for how to describe a machine. Thus, `sun3-sunos4.1'
-would be a valid alias. So would `sun3-bsd4.2', since SunOS is
-basically BSD and no other BSD system is used on a Sun. For many
-programs, `vax-dec-ultrix' would be an alias for `vax-dec-bsd', simply
-because the differences between Ultrix and BSD are rarely noticeable,
-but a few programs might need to distinguish them.
+would be a valid alias. For many programs, `vax-dec-ultrix' would be
+an alias for `vax-dec-bsd', simply because the differences between
+Ultrix and BSD are rarely noticeable, but a few programs might need to
+distinguish them.
There is a shell script called `config.sub' that you can use as a
subroutine to validate system types and canonicalize aliases.
just how long the pages are, since they do not have to fit on a printed
page. The formfeeds should appear alone on lines by themselves.
-\1f
-File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Top
-
-Commenting Your Work
-********************
-
- Every program should start with a comment saying briefly what it is
-for. Example: `fmt - filter for simple filling of text'.
-
- Please put a comment on each function saying what the function does,
-what sorts of arguments it gets, and what the possible values of
-arguments mean and are used for. It is not necessary to duplicate in
-words the meaning of the C argument declarations, if a C type is being
-used in its customary fashion. If there is anything nonstandard about
-its use (such as an argument of type `char *' which is really the
-address of the second character of a string, not the first), or any
-possible values that would not work the way one would expect (such as,
-that strings containing newlines are not guaranteed to work), be sure
-to say so.
-
- Also explain the significance of the return value, if there is one.
-
- Please put two spaces after the end of a sentence in your comments,
-so that the Emacs sentence commands will work. Also, please write
-complete sentences and capitalize the first word. If a lower-case
-identifer comes at the beginning of a sentence, don't capitalize it!
-Changing the spelling makes it a different identifier. If you don't
-like starting a sentence with a lower case letter, write the sentence
-differently (e.g., "The identifier lower-case is ...").
-
- The comment on a function is much clearer if you use the argument
-names to speak about the argument values. The variable name itself
-should be lower case, but write it in upper case when you are speaking
-about the value rather than the variable itself. Thus, "the inode
-number NODE_NUM" rather than "an inode".
-
- There is usually no purpose in restating the name of the function in
-the comment before it, because the reader can see that for himself.
-There might be an exception when the comment is so long that the
-function itself would be off the bottom of the screen.
-
- There should be a comment on each static variable as well, like this:
-
- /* Nonzero means truncate lines in the display;
- zero means continue them. */
- int truncate_lines;
-
- Every `#endif' should have a comment, except in the case of short
-conditionals (just a few lines) that are not nested. The comment should
-state the condition of the conditional that is ending, *including its
-sense*. `#else' should have a comment describing the condition *and
-sense* of the code that follows. For example:
-
- #ifdef foo
- ...
- #else /* not foo */
- ...
- #endif /* not foo */
-
-but, by contrast, write the comments this way for a `#ifndef':
-
- #ifndef foo
- ...
- #else /* foo */
- ...
- #endif /* foo */
-
-This is Info file ../standards.info, produced by Makeinfo-1.55 from the
-input file ../standards.texi.
+This is Info file standards.info, produced by Makeinfo-1.55 from the
+input file standards.texi.
START-INFO-DIR-ENTRY
* Standards: (standards). GNU coding standards.
versions, except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
+\1f
+File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Top
+
+Commenting Your Work
+********************
+
+ Every program should start with a comment saying briefly what it is
+for. Example: `fmt - filter for simple filling of text'.
+
+ Please put a comment on each function saying what the function does,
+what sorts of arguments it gets, and what the possible values of
+arguments mean and are used for. It is not necessary to duplicate in
+words the meaning of the C argument declarations, if a C type is being
+used in its customary fashion. If there is anything nonstandard about
+its use (such as an argument of type `char *' which is really the
+address of the second character of a string, not the first), or any
+possible values that would not work the way one would expect (such as,
+that strings containing newlines are not guaranteed to work), be sure
+to say so.
+
+ Also explain the significance of the return value, if there is one.
+
+ Please put two spaces after the end of a sentence in your comments,
+so that the Emacs sentence commands will work. Also, please write
+complete sentences and capitalize the first word. If a lower-case
+identifier comes at the beginning of a sentence, don't capitalize it!
+Changing the spelling makes it a different identifier. If you don't
+like starting a sentence with a lower case letter, write the sentence
+differently (e.g., "The identifier lower-case is ...").
+
+ The comment on a function is much clearer if you use the argument
+names to speak about the argument values. The variable name itself
+should be lower case, but write it in upper case when you are speaking
+about the value rather than the variable itself. Thus, "the inode
+number NODE_NUM" rather than "an inode".
+
+ There is usually no purpose in restating the name of the function in
+the comment before it, because the reader can see that for himself.
+There might be an exception when the comment is so long that the
+function itself would be off the bottom of the screen.
+
+ There should be a comment on each static variable as well, like this:
+
+ /* Nonzero means truncate lines in the display;
+ zero means continue them. */
+ int truncate_lines;
+
+ Every `#endif' should have a comment, except in the case of short
+conditionals (just a few lines) that are not nested. The comment should
+state the condition of the conditional that is ending, *including its
+sense*. `#else' should have a comment describing the condition *and
+sense* of the code that follows. For example:
+
+ #ifdef foo
+ ...
+ #else /* not foo */
+ ...
+ #endif /* not foo */
+
+but, by contrast, write the comments this way for a `#ifndef':
+
+ #ifndef foo
+ ...
+ #else /* foo */
+ ...
+ #endif /* foo */
+
\1f
File: standards.info, Node: Syntactic Conventions, Next: Names, Prev: Comments, Up: Top
\1f
File: standards.info, Node: Names, Next: Using Extensions, Prev: Syntactic Conventions, Up: Top
-Naming Variables and Functions
-******************************
+Naming Variables, Functions, and Files
+**************************************
Please use underscores to separate words in a name, so that the Emacs
word commands can be useful within them. Stick to lower case; reserve
were loaded onto an MS-DOS file system--something you may or may not
care about.
+ In general, use `-' to separate words in file names, not `_'. Make
+all letters in file names be lower case, except when following specific
+conventions that call for upper case in certain kinds of names.
+Conventional occasions for using upper case letters in file names
+include `Makefile', `ChangeLog', `COPYING' and `README'. It is common
+to name other `README'-like documentation files in all upper case just
+like `README'.
+
\1f
File: standards.info, Node: Using Extensions, Next: System Functions, Prev: Names, Up: Top
*********************************
Avoid arbitrary limits on the length or number of *any* data
-structure, including filenames, lines, files, and symbols, by allocating
-all data structures dynamically. In most Unix utilities, "long lines
-are silently truncated". This is not acceptable in a GNU utility.
+structure, including file names, lines, files, and symbols, by
+allocating all data structures dynamically. In most Unix utilities,
+"long lines are silently truncated". This is not acceptable in a GNU
+utility.
Utilities reading files should not drop NUL characters, or any other
nonprinting characters *including those with codes above 0177*. The
are easy to examine with the debugger, so there is no point moving them
elsewhere.
+ Do not use a count of errors as the exit status for a program.
+*That does not work*, because exit status values are limited to 8 bits
+(0 through 255). A single run of the program might have 256 errors; if
+you try to return 256 as the exit status, the parent process will see 0
+as the status, and it will appear that the program succeeded.
+
\1f
File: standards.info, Node: Errors, Next: Libraries, Prev: Semantics, Up: Top
would do best to print error messages using the noninteractive style.)
The string MESSAGE should not begin with a capital letter when it
-follows a program name and/or filename. Also, it should not end with a
-period.
+follows a program name and/or file name. Also, it should not end with
+a period.
Error messages from interactive programs, and other messages such as
usage messages, should start with a capital letter. But they should not
function of the command; they should do nothing except print the
requested information.
-`auto-check'
- `-a' in `recode'.
-
-`auto-reference'
- `-A' in `ptx'.
-
`after-date'
`-N' in `tar'.
`ascii'
`-a' in `diff'.
+`assign'
+ `-v' in Gawk.
+
`assume-new'
`-W' in Make.
`assume-old'
`-o' in Make.
+`auto-check'
+ `-a' in `recode'.
+
+`auto-pager'
+ `-a' in `wdiff'.
+
+`auto-reference'
+ `-A' in `ptx'.
+
+`avoid-wraps'
+ `-n' in `wdiff'.
+
`backward-search'
- `-B' in etags.
+ `-B' in `ctags'.
`basename'
`-f' in `shar'.
`compare'
`-d' in `tar'.
+`compat'
+ Used in gawk (no corresponding single-letter option).
+
`compress'
`-Z' in `tar' and `shar'.
`context'
Used in `diff'.
+`copyleft'
+ Used in gawk (no corresponding single-letter option).
+
`copyright'
- `-C' in `ptx' and `recode'.
+ `-C' in `ptx', `recode', and `wdiff'. Also used in gawk (no
+ corresponding single-letter option).
`core'
Used in GDB.
`-c' in `shar'.
`cxref'
- `-x' in `etags'.
+ `-x' in `ctags'.
`date'
`-d' in `touch'.
`-D' in `m4'.
`defines'
- `-d' in Bison and `etags'.
+ `-d' in Bison and `ctags'.
`delete'
`-D' in `tar'.
`discard-locals'
`-X' in `strip'.
-`diversions'
- `-N' in `m4'.
-
`dry-run'
`-n' in Make.
`elide-empty-files'
`-z' in `csplit'.
+`end-delete'
+ `-x' in `wdiff'.
+
+`end-insert'
+ `-z' in `wdiff'.
+
`entire-new-file'
`-N' in `diff'.
`fatal-warnings'
`-E' in `m4'.
+`field-separator'
+ p`-F' in Gawk.
+
`file'
- `-f' in `info', Make, `mt', and `tar'; `-n' in `sed'; `-r' in
- `touch'.
+ `-f' in Gawk, `info', Make, `mt', and `tar'; `-n' in `sed'; `-r'
+ in `touch'.
`file-prefix'
`-b' in Bison.
`format'
Used in `ls', `time', and `ptx'.
-`forward-search'
- `-F' in `etags'.
+`freeze-state'
+ `-F' in `m4'.
`fullname'
Used in GDB.
`-B' in `diff'.
`ignore-case'
- `-f' in `look' and `ptx'; `-i' in `diff'.
+ `-f' in `look' and `ptx'; `-i' in `diff' and `wdiff'.
`ignore-errors'
`-i' in Make.
`-i' in `ptx'.
`ignore-indentation'
- `-S' in `etags'.
+ `-I' in `etags'.
`ignore-init-file'
`-f' in Oleo.
`kilobytes'
`-k' in `du' and `ls'.
+`language'
+ `-l' in `etags'.
+
+`less-mode'
+ `-l' in `wdiff'.
+
`level-for-gzip'
`-g' in `shar'.
`link'
`-l' in `cpio'.
+`lint'
+ Used in gawk (no corresponding single-letter option).
+
`list'
`-t' in `cpio'; `-l' in `recode'.
`no-check-existing'
`-x' in `shar'.
+`no-common'
+ `-3' in `wdiff'.
+
`no-create'
`-c' in `touch'.
`no-defines'
`-D' in `etags'.
+`no-deleted'
+ `-1' in `wdiff'.
+
`no-dereference'
`-d' in `cp'.
+`no-inserted'
+ `-2' in `wdiff'.
+
`no-keep-going'
`-S' in Make.
`no-prof'
`-e' in `gprof'.
+`no-regex'
+ `-R' in `etags'.
+
`no-sort'
`-p' in `nm'.
`no-validate'
Used in Makeinfo.
-`no-verbose'
- `-v' in `shar'.
-
`no-warn'
Used in various programs to inhibit warnings.
`portability'
`-c' in `cpio' and `tar'.
+`posix'
+ Used in gawk (no corresponding single-letter option).
+
`prefix-builtins'
`-P' in `m4'.
`print-symdefs'
`-s' in `nm'.
+`printer'
+ `-p' in `wdiff'.
+
+`prompt'
+ `-p' in `ed'.
+
`query-user'
`-X' in `shar'.
Used in many programs to inhibit the usual output. *Note:* every
program accepting `--quiet' should accept `--silent' as a synonym.
+`quiet-unshar'
+ `-Q' in `shar'
+
`quote-name'
`-Q' in `ls'.
`-r' in `ptx'.
`regex'
- `-r' in `tac'.
+ `-r' in `tac' and `etags'.
`release'
`-r' in `uname'.
+`reload-state'
+ `-R' in `m4'.
+
`relocation'
`-r' in `objdump'.
`sort'
Used in `ls'.
+`source'
+ Used in gawk (no corresponding single-letter option).
+
`sparse'
`-S' in `tar'.
`squeeze-blank'
`-s' in `cat'.
+`start-delete'
+ `-w' in `wdiff'.
+
+`start-insert'
+ `-y' in `wdiff'.
+
`starting-file'
Used in `tar' and `diff' to specify which file within a directory
to start processing with.
+`statistics'
+ `-s' in `wdiff'.
+
`stdin-file-list'
`-S' in `shar'.
`-T' in `ls'.
`terminal'
- `-T' in `tput' and `ul'.
+ `-T' in `tput' and `ul'. `-t' in `wdiff'.
`text'
`-a' in `diff'.
`-t' in `m4'.
`traditional'
- `-t' in `hello'; `-G' in `m4' and `ptx'.
+ `-t' in `hello'; `-G' in `ed', `m4', and `ptx'.
`tty'
Used in GDB.
`typedefs'
- `-t' in `etags'.
+ `-t' in `ctags'.
`typedefs-and-c++'
- `-T' in `etags'.
+ `-T' in `ctags'.
`typeset-mode'
`-t' in `ptx'.
`-u' in `nm'.
`update'
- `-u' in `cp', `etags', `mv', `tar'.
+ `-u' in `cp', `ctags', `mv', `tar'.
+
+`usage'
+ Used in gawk (no corresponding single-letter option).
`uuencode'
`-B' in `shar'.
`-V' in `cp', `ln', `mv'.
`vgrind'
- `-v' in `etags'.
+ `-v' in `ctags'.
`volume'
`-V' in `tar'.
Documenting Programs
********************
- Please use Texinfo for documenting GNU programs. See the Texinfo
-manual, either the hardcopy or the version in the GNU Emacs Info
-subsystem (`C-h i'). See existing GNU Texinfo files (e.g., those under
-the `man/' directory in the GNU Emacs distribution) for examples.
+* Menu:
+
+* GNU Manuals:: Writing proper manuals.
+* Manual Structure Details:: Specific structure conventions.
+* NEWS File:: NEWS files supplement manuals.
+* Man Pages:: Man pages are secondary.
+* Reading other Manuals:: How far you can go in learning
+ from other manuals.
+
+\1f
+File: standards.info, Node: GNU Manuals, Next: Manual Structure Details, Up: Documentation
+
+GNU Manuals
+===========
+
+ The preferred way to document part of the GNU system is to write a
+manual in the Texinfo formatting language. See the Texinfo manual,
+either the hardcopy or the version in the Emacs Info subsystem (`C-h
+i').
+
+ The manual should document all of the program's command-line options
+and all of its commands. It should give examples of their use. But
+don't organize the manual as a list of features. Instead, organize it
+logically, by subtopics. Address the goals that a user will have in
+mind, and explain how to accomplish them.
+
+ In general, a GNU manual should serve both as tutorial and reference.
+It should be set up for convenient access to each topic through Info,
+and for reading straight through (appendixes aside). A GNU manual
+should give a good introduction to a beginner reading through from the
+start, and should also provide all the details that hackers want.
+
+ That is not as hard as it sounds at first. Arrange each chapter as a
+logical breakdown of its topic, but order the sections, and write their
+text, so that reading the chapter straight through makes sense. Do
+likewise when structuring the book into chapters, and when structuring a
+section into paragraphs. The watchword is, *at each point, address the
+most fundamental and important issue raised by the preceding text.*
+
+ If necessary, add extra chapters at the beginning of the manual which
+are purely tutorial and cover the basics of the subject. These provide
+the framework for a beginner to understand the rest of the manual. The
+Bison manual provides a good example of how to do this.
+
+ Don't use Unix man pages as a model for how to write GNU
+documentation; they are a bad example to follow.
+
+ Please do not use the term "pathname" that is used in Unix
+documentation; use "file name" (two words) instead. We use the term
+"path" only for search paths, which are lists of file names.
+
+\1f
+File: standards.info, Node: Manual Structure Details, Next: NEWS File, Prev: GNU Manuals, Up: Documentation
+
+Manual Structure Details
+========================
The title page of the manual should state the version of the program
which the manual applies to. The Top node of the manual should also
than or independent of the program, also state a version number for the
manual in both of these places.
- The manual should document all command-line arguments and all
-commands. It should give examples of their use. But don't organize
-the manual as a list of features. Instead, organize it by the concepts
-a user will have before reaching that point in the manual. Address the
-goals that a user will have in mind, and explain how to accomplish
-them. Don't use Unix man pages as a model for how to write GNU
-documentation; they are a bad example to follow.
-
The manual should have a node named `PROGRAM Invocation' or
`Invoking PROGRAM', where PROGRAM stands for the name of the program
being described, as you would type it in the shell to run the program.
If one manual describes several programs, it should have such a node
for each program described.
+\1f
+File: standards.info, Node: NEWS File, Next: Man Pages, Prev: Manual Structure Details, Up: Documentation
+
+The NEWS File
+=============
+
In addition to its manual, the package should have a file named
`NEWS' which contains a list of user-visible changes worth mentioning.
In each new release, add items to the front of the file and identify
a file named `ONEWS' and put a note at the end referring the user to
that file.
- Please do not use the term "pathname" that is used in Unix
-documentation; use "file name" (two words) instead. We use the term
-"path" only for search paths, which are lists of file names.
+\1f
+File: standards.info, Node: Man Pages, Next: Reading other Manuals, Prev: NEWS File, Up: Documentation
+
+Man Pages
+=========
It is ok to supply a man page for the program as well as a Texinfo
manual if you wish to. But keep in mind that supporting a man page
access the Texinfo documentation.
\1f
-File: standards.info, Node: Releases, Prev: Documentation, Up: Top
-
-Making Releases
-***************
-
- Package the distribution of Foo version 69.96 in a gzipped tar file
-named `foo-69.96.tar.gz'. It should unpack into a subdirectory named
-`foo-69.96'.
-
- Building and installing the program should never modify any of the
-files contained in the distribution. This means that all the files
-that form part of the program in any way must be classified into "source
-files" and "non-source files". Source files are written by humans and
-never changed automatically; non-source files are produced from source
-files by programs under the control of the Makefile.
-
- Naturally, all the source files must be in the distribution. It is
-okay to include non-source files in the distribution, provided they are
-up-to-date and machine-independent, so that building the distribution
-normally will never modify them. We commonly include non-source files
-produced by Bison, Lex, TeX, and Makeinfo; this helps avoid unnecessary
-dependencies between our distributions, so that users can install
-whichever packages they want to install.
-
- Non-source files that might actually be modified by building and
-installing the program should *never* be included in the distribution.
-So if you do distribute non-source files, always make sure they are up
-to date when you make a new distribution.
-
- Make sure that the directory into which the distribution unpacks (as
-well as any subdirectories) are all world-writable (octal mode 777).
-This is so that old versions of `tar' which preserve the ownership and
-permissions of the files from the tar archive will be able to extract
-all the files even if the user is unprivileged.
-
- Make sure that all the files in the distribution are world-readable.
-
- Make sure that no file name in the distribution is more than 14
-characters long. Likewise, no file created by building the program
-should have a name longer than 14 characters. The reason for this is
-that some systems adhere to a foolish interpretation of the POSIX
-standard, and refuse to open a longer name, rather than truncating as
-they did in the past.
-
- Don't include any symbolic links in the distribution itself. If the
-tar file contains symbolic links, then people cannot even unpack it on
-systems that don't support symbolic links. Also, don't use multiple
-names for one file in different directories, because certain file
-systems cannot handle this and that prevents unpacking the distribution.
-
- Try to make sure that all the file names will be unique on MS-DOG. A
-name on MS-DOG consists of up to 8 characters, optionally followed by a
-period and up to three characters. MS-DOG will truncate extra
-characters both before and after the period. Thus, `foobarhacker.c'
-and `foobarhacker.o' are not ambiguous; they are truncated to
-`foobarha.c' and `foobarha.o', which are distinct.
-
- Include in your distribution a copy of the `texinfo.tex' you used to
-test print any `*.texinfo' files.
-
- Likewise, if your program uses small GNU software packages like
-regex, getopt, obstack, or termcap, include them in the distribution
-file. Leaving them out would make the distribution file a little
-smaller at the expense of possible inconvenience to a user who doesn't
-know what other files to get.
-
+File: standards.info, Node: Reading other Manuals, Prev: Man Pages, Up: Documentation
+
+Reading other Manuals
+=====================
+
+ There may be non-free books or documentation files that describe the
+program you are documenting.
+
+ It is ok to use these documents for reference, just as the author of
+a new algebra textbook can read other books on algebra. A large portion
+of any non-fiction book consists of facts, in this case facts about how
+a certain program works, and these facts are necessarily the same for
+everyone who writes about the subject. But be careful not to copy your
+outline structure, wording, tables or examples from preexisting non-free
+documentation. Copying from free documentation may be ok; please check
+with the FSF about the individual case.
--- /dev/null
+This is Info file standards.info, produced by Makeinfo-1.55 from the
+input file standards.texi.
+
+START-INFO-DIR-ENTRY
+* Standards: (standards). GNU coding standards.
+END-INFO-DIR-ENTRY
+
+ GNU Coding Standards Copyright (C) 1992, 1993, 1994 Free Software
+Foundation, Inc.
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+ Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided that
+the entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+
+ Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be stated in a
+translation approved by the Free Software Foundation.
+
+\1f
+File: standards.info, Node: Releases, Prev: Documentation, Up: Top
+
+Making Releases
+***************
+
+ Package the distribution of Foo version 69.96 in a gzipped tar file
+named `foo-69.96.tar.gz'. It should unpack into a subdirectory named
+`foo-69.96'.
+
+ Building and installing the program should never modify any of the
+files contained in the distribution. This means that all the files
+that form part of the program in any way must be classified into "source
+files" and "non-source files". Source files are written by humans and
+never changed automatically; non-source files are produced from source
+files by programs under the control of the Makefile.
+
+ Naturally, all the source files must be in the distribution. It is
+okay to include non-source files in the distribution, provided they are
+up-to-date and machine-independent, so that building the distribution
+normally will never modify them. We commonly include non-source files
+produced by Bison, Lex, TeX, and Makeinfo; this helps avoid unnecessary
+dependencies between our distributions, so that users can install
+whichever packages they want to install.
+
+ Non-source files that might actually be modified by building and
+installing the program should *never* be included in the distribution.
+So if you do distribute non-source files, always make sure they are up
+to date when you make a new distribution.
+
+ Make sure that the directory into which the distribution unpacks (as
+well as any subdirectories) are all world-writable (octal mode 777).
+This is so that old versions of `tar' which preserve the ownership and
+permissions of the files from the tar archive will be able to extract
+all the files even if the user is unprivileged.
+
+ Make sure that all the files in the distribution are world-readable.
+
+ Make sure that no file name in the distribution is more than 14
+characters long. Likewise, no file created by building the program
+should have a name longer than 14 characters. The reason for this is
+that some systems adhere to a foolish interpretation of the POSIX
+standard, and refuse to open a longer name, rather than truncating as
+they did in the past.
+
+ Don't include any symbolic links in the distribution itself. If the
+tar file contains symbolic links, then people cannot even unpack it on
+systems that don't support symbolic links. Also, don't use multiple
+names for one file in different directories, because certain file
+systems cannot handle this and that prevents unpacking the distribution.
+
+ Try to make sure that all the file names will be unique on MS-DOG. A
+name on MS-DOG consists of up to 8 characters, optionally followed by a
+period and up to three characters. MS-DOG will truncate extra
+characters both before and after the period. Thus, `foobarhacker.c'
+and `foobarhacker.o' are not ambiguous; they are truncated to
+`foobarha.c' and `foobarha.o', which are distinct.
+
+ Include in your distribution a copy of the `texinfo.tex' you used to
+test print any `*.texinfo' files.
+
+ Likewise, if your program uses small GNU software packages like
+regex, getopt, obstack, or termcap, include them in the distribution
+file. Leaving them out would make the distribution file a little
+smaller at the expense of possible inconvenience to a user who doesn't
+know what other files to get.
+
+
@setfilename standards.info
@settitle GNU Coding Standards
@c UPDATE THIS DATE WHENEVER YOU MAKE CHANGES!
-@set lastupdate 21 September 1994
+@set lastupdate 16 May 1995
@c %**end of header
@ifinfo
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1992, 1993 Free Software Foundation, Inc.
+Copyright @copyright{} 1992, 1993, 1994 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
* Formatting:: Formatting Your Source Code
* Comments:: Commenting Your Work
* Syntactic Conventions:: Clean Use of C Constructs
-* Names:: Naming Variables and Functions
+* Names:: Naming Variables, Functions and Files
* Using Extensions:: Using Non-standard Features
* System Functions:: Portability and ``standard'' library functions
* Semantics:: Program Behavior for All Programs
of a program; they can give you a history of how the conflicting
concepts arose.
-Use the Emacs command @kbd{M-x add-change} to start a new entry in the
+Use the Emacs command @kbd{M-x add-change-log-entry} to start a new
+entry in the
change log. An entry should have an asterisk, the name of the changed
file, and then in parentheses the name of the changed functions,
variables or whatever, followed by a colon. Then describe the changes
The @code{configure} script needs to be able to decode all plausible
alternatives for how to describe a machine. Thus, @samp{sun3-sunos4.1}
-would be a valid alias. So would @samp{sun3-bsd4.2}, since SunOS is
-basically @sc{BSD} and no other @sc{BSD} system is used on a Sun. For many
-programs, @samp{vax-dec-ultrix} would be an alias for
-@samp{vax-dec-bsd}, simply because the differences between Ultrix and
-@sc{BSD} are rarely noticeable, but a few programs might need to distinguish
-them.
+would be a valid alias. For many programs, @samp{vax-dec-ultrix} would
+be an alias for @samp{vax-dec-bsd}, simply because the differences
+between Ultrix and @sc{BSD} are rarely noticeable, but a few programs
+might need to distinguish them.
+@c Real 4.4BSD now runs on some Suns.
There is a shell script called @file{config.sub} that you can use
as a subroutine to validate system types and canonicalize aliases.
your program is set up to do this, your @code{configure} script can simply
ignore most of its arguments.
-
@node Source Language
@chapter Using Languages Other Than C
Please put two spaces after the end of a sentence in your comments, so
that the Emacs sentence commands will work. Also, please write
complete sentences and capitalize the first word. If a lower-case
-identifer comes at the beginning of a sentence, don't capitalize it!
+identifier comes at the beginning of a sentence, don't capitalize it!
Changing the spelling makes it a different identifier. If you don't
like starting a sentence with a lower case letter, write the sentence
differently (e.g., ``The identifier lower-case is @dots{}'').
pointer constant.
@node Names
-@chapter Naming Variables and Functions
+@chapter Naming Variables, Functions, and Files
Please use underscores to separate words in a name, so that the Emacs
word commands can be useful within them. Stick to lower case; reserve
files were loaded onto an MS-DOS file system---something you may or may
not care about.
+In general, use @samp{-} to separate words in file names, not @samp{_}.
+Make all letters in file names be lower case, except when following
+specific conventions that call for upper case in certain kinds of names.
+Conventional occasions for using upper case letters in file names
+include @file{Makefile}, @file{ChangeLog}, @file{COPYING} and
+@file{README}. It is common to name other @file{README}-like
+documentation files in all upper case just like @file{README}.
@node Using Extensions
@chapter Using Non-standard Features
@chapter Program Behavior for All Programs
Avoid arbitrary limits on the length or number of @emph{any} data
-structure, including filenames, lines, files, and symbols, by allocating
+structure, including file names, lines, files, and symbols, by allocating
all data structures dynamically. In most Unix utilities, ``long lines
are silently truncated''. This is not acceptable in a GNU utility.
are easy to examine with the debugger, so there is no point moving them
elsewhere.
+Do not use a count of errors as the exit status for a program.
+@emph{That does not work}, because exit status values are limited to 8
+bits (0 through 255). A single run of the program might have 256
+errors; if you try to return 256 as the exit status, the parent process
+will see 0 as the status, and it will appear that the program succeeded.
@node Errors
@chapter Formatting Error Messages
would do best to print error messages using the noninteractive style.)
The string @var{message} should not begin with a capital letter when
-it follows a program name and/or filename. Also, it should not end
+it follows a program name and/or file name. Also, it should not end
with a period.
Error messages from interactive programs, and other messages such as
the normal function of the command; they should do nothing except print
the requested information.
+@c longopts begin here (keyword for isearch)
@c Please leave newlines between items in this table; it's much easier
@c to update when it isn't completely squashed together and unreadable.
@c When there is more than one short option for a long option name, put
@table @samp
-@item auto-check
-@samp{-a} in @code{recode}.
-
-@item auto-reference
-@samp{-A} in @code{ptx}.
-
@item after-date
@samp{-N} in @code{tar}.
@item ascii
@samp{-a} in @code{diff}.
+@item assign
+@samp{-v} in Gawk.
+
@item assume-new
@samp{-W} in Make.
@item assume-old
@samp{-o} in Make.
+@item auto-check
+@samp{-a} in @code{recode}.
+
+@item auto-pager
+@samp{-a} in @code{wdiff}.
+
+@item auto-reference
+@samp{-A} in @code{ptx}.
+
+@item avoid-wraps
+@samp{-n} in @code{wdiff}.
+
@item backward-search
-@samp{-B} in etags.
+@samp{-B} in @code{ctags}.
@item basename
@samp{-f} in @code{shar}.
@item compare
@samp{-d} in @code{tar}.
+@item compat
+Used in gawk (no corresponding single-letter option).
+
@item compress
@samp{-Z} in @code{tar} and @code{shar}.
@item context
Used in @code{diff}.
+@item copyleft
+Used in gawk (no corresponding single-letter option).
+
@item copyright
-@samp{-C} in @code{ptx} and @code{recode}.
+@samp{-C} in @code{ptx}, @code{recode}, and @code{wdiff}.
+Also used in gawk (no corresponding single-letter option).
@item core
Used in GDB.
@samp{-c} in @code{shar}.
@item cxref
-@samp{-x} in @code{etags}.
+@samp{-x} in @code{ctags}.
@item date
@samp{-d} in @code{touch}.
@samp{-D} in @code{m4}.
@item defines
-@samp{-d} in Bison and @code{etags}.
+@samp{-d} in Bison and @code{ctags}.
@item delete
@samp{-D} in @code{tar}.
@item discard-locals
@samp{-X} in @code{strip}.
-@item diversions
-@samp{-N} in @code{m4}.
-
@item dry-run
@samp{-n} in Make.
@item elide-empty-files
@samp{-z} in @code{csplit}.
+@item end-delete
+@samp{-x} in @code{wdiff}.
+
+@item end-insert
+@samp{-z} in @code{wdiff}.
+
@item entire-new-file
@samp{-N} in @code{diff}.
@item fatal-warnings
@samp{-E} in @code{m4}.
+@item field-separator
+p@samp{-F} in Gawk.
+
@item file
-@samp{-f} in @code{info}, Make, @code{mt}, and @code{tar};
+@samp{-f} in Gawk, @code{info}, Make, @code{mt}, and @code{tar};
@samp{-n} in @code{sed};
@samp{-r} in @code{touch}.
@item format
Used in @code{ls}, @code{time}, and @code{ptx}.
-@item forward-search
-@samp{-F} in @code{etags}.
+@item freeze-state
+@samp{-F} in @code{m4}.
@item fullname
Used in GDB.
@item ignore-case
@samp{-f} in @code{look} and @code{ptx};
-@samp{-i} in @code{diff}.
+@samp{-i} in @code{diff} and @code{wdiff}.
@item ignore-errors
@samp{-i} in Make.
@samp{-i} in @code{ptx}.
@item ignore-indentation
-@samp{-S} in @code{etags}.
+@samp{-I} in @code{etags}.
@item ignore-init-file
@samp{-f} in Oleo.
@item kilobytes
@samp{-k} in @code{du} and @code{ls}.
+@item language
+@samp{-l} in @code{etags}.
+
+@item less-mode
+@samp{-l} in @code{wdiff}.
+
@item level-for-gzip
@samp{-g} in @code{shar}.
@item link
@samp{-l} in @code{cpio}.
+@item lint
+Used in gawk (no corresponding single-letter option).
+
@item list
@samp{-t} in @code{cpio};
@samp{-l} in @code{recode}.
@item no-check-existing
@samp{-x} in @code{shar}.
+@item no-common
+@samp{-3} in @code{wdiff}.
+
@item no-create
@samp{-c} in @code{touch}.
@item no-defines
@samp{-D} in @code{etags}.
+@item no-deleted
+@samp{-1} in @code{wdiff}.
+
@item no-dereference
@samp{-d} in @code{cp}.
+@item no-inserted
+@samp{-2} in @code{wdiff}.
+
@item no-keep-going
@samp{-S} in Make.
@item no-prof
@samp{-e} in @code{gprof}.
+@item no-regex
+@samp{-R} in @code{etags}.
+
@item no-sort
@samp{-p} in @code{nm}.
@item no-validate
Used in Makeinfo.
-@item no-verbose
-@samp{-v} in @code{shar}.
-
@item no-warn
Used in various programs to inhibit warnings.
@item portability
@samp{-c} in @code{cpio} and @code{tar}.
+@item posix
+Used in gawk (no corresponding single-letter option).
+
@item prefix-builtins
@samp{-P} in @code{m4}.
@item print-symdefs
@samp{-s} in @code{nm}.
+@item printer
+@samp{-p} in @code{wdiff}.
+
+@item prompt
+@samp{-p} in @code{ed}.
+
@item query-user
@samp{-X} in @code{shar}.
program accepting @samp{--quiet} should accept @samp{--silent} as a
synonym.
+@item quiet-unshar
+@samp{-Q} in @code{shar}
+
@item quote-name
@samp{-Q} in @code{ls}.
@samp{-r} in @code{ptx}.
@item regex
-@samp{-r} in @code{tac}.
+@samp{-r} in @code{tac} and @code{etags}.
@item release
@samp{-r} in @code{uname}.
+@item reload-state
+@samp{-R} in @code{m4}.
+
@item relocation
@samp{-r} in @code{objdump}.
@item sort
Used in @code{ls}.
+@item source
+Used in gawk (no corresponding single-letter option).
+
@item sparse
@samp{-S} in @code{tar}.
@item squeeze-blank
@samp{-s} in @code{cat}.
+@item start-delete
+@samp{-w} in @code{wdiff}.
+
+@item start-insert
+@samp{-y} in @code{wdiff}.
+
@item starting-file
Used in @code{tar} and @code{diff} to specify which file within
a directory to start processing with.
+@item statistics
+@samp{-s} in @code{wdiff}.
+
@item stdin-file-list
@samp{-S} in @code{shar}.
@item terminal
@samp{-T} in @code{tput} and @code{ul}.
+@samp{-t} in @code{wdiff}.
@item text
@samp{-a} in @code{diff}.
@item traditional
@samp{-t} in @code{hello};
-@samp{-G} in @code{m4} and @code{ptx}.
+@samp{-G} in @code{ed}, @code{m4}, and @code{ptx}.
@item tty
Used in GDB.
@item typedefs
-@samp{-t} in @code{etags}.
+@samp{-t} in @code{ctags}.
@item typedefs-and-c++
-@samp{-T} in @code{etags}.
+@samp{-T} in @code{ctags}.
@item typeset-mode
@samp{-t} in @code{ptx}.
@samp{-u} in @code{nm}.
@item update
-@samp{-u} in @code{cp}, @samp{etags}, @samp{mv}, @samp{tar}.
+@samp{-u} in @code{cp}, @code{ctags}, @code{mv}, @code{tar}.
+
+@item usage
+Used in gawk (no corresponding single-letter option).
@item uuencode
@samp{-B} in @code{shar}.
@samp{-V} in @code{cp}, @code{ln}, @code{mv}.
@item vgrind
-@samp{-v} in @code{etags}.
+@samp{-v} in @code{ctags}.
@item volume
@samp{-V} in @code{tar}.
@samp{-z} in @code{gprof}.
@end table
+@c longopts end here (keyword for isearch)
@node Documentation
@chapter Documenting Programs
-Please use Texinfo for documenting GNU programs. See the Texinfo
-manual, either the hardcopy or the version in the GNU Emacs Info
-subsystem (@kbd{C-h i}). See existing GNU Texinfo files (e.g., those
-under the @file{man/} directory in the GNU Emacs distribution) for
-examples.
+@menu
+* GNU Manuals:: Writing proper manuals.
+* Manual Structure Details:: Specific structure conventions.
+* NEWS File:: NEWS files supplement manuals.
+* Man Pages:: Man pages are secondary.
+* Reading other Manuals:: How far you can go in learning
+ from other manuals.
+@end menu
+
+@node GNU Manuals
+@section GNU Manuals
+
+The preferred way to document part of the GNU system is to write a
+manual in the Texinfo formatting language. See the Texinfo manual,
+either the hardcopy or the version in the Emacs Info subsystem (@kbd{C-h
+i}).
+
+The manual should document all of the program's command-line options and
+all of its commands. It should give examples of their use. But don't
+organize the manual as a list of features. Instead, organize it
+logically, by subtopics. Address the goals that a user will have in
+mind, and explain how to accomplish them.
+
+In general, a GNU manual should serve both as tutorial and reference.
+It should be set up for convenient access to each topic through Info,
+and for reading straight through (appendixes aside). A GNU manual
+should give a good introduction to a beginner reading through from the
+start, and should also provide all the details that hackers want.
+
+That is not as hard as it sounds at first. Arrange each chapter as a
+logical breakdown of its topic, but order the sections, and write their
+text, so that reading the chapter straight through makes sense. Do
+likewise when structuring the book into chapters, and when structuring a
+section into paragraphs. The watchword is, @emph{at each point, address
+the most fundamental and important issue raised by the preceding text.}
+
+If necessary, add extra chapters at the beginning of the manual which
+are purely tutorial and cover the basics of the subject. These provide
+the framework for a beginner to understand the rest of the manual. The
+Bison manual provides a good example of how to do this.
+
+Don't use Unix man pages as a model for how to write GNU documentation;
+they are a bad example to follow.
+
+Please do not use the term ``pathname'' that is used in Unix
+documentation; use ``file name'' (two words) instead. We use the term
+``path'' only for search paths, which are lists of file names.
+
+@node Manual Structure Details
+@section Manual Structure Details
The title page of the manual should state the version of the program
which the manual applies to. The Top node of the manual should also
than or independent of the program, also state a version number for
the manual in both of these places.
-The manual should document all command-line arguments and all
-commands. It should give examples of their use. But don't organize
-the manual as a list of features. Instead, organize it by the
-concepts a user will have before reaching that point in the manual.
-Address the goals that a user will have in mind, and explain how to
-accomplish them. Don't use Unix man pages as a model for how to
-write GNU documentation; they are a bad example to follow.
-
The manual should have a node named @samp{@var{program} Invocation} or
@samp{Invoking @var{program}}, where @var{program} stands for the name
of the program being described, as you would type it in the shell to run
If one manual describes several programs, it should have such a node for
each program described.
+@node NEWS File
+@section The NEWS File
+
In addition to its manual, the package should have a file named
@file{NEWS} which contains a list of user-visible changes worth
mentioning. In each new release, add items to the front of the file and
into a file named @file{ONEWS} and put a note at the end referring the
user to that file.
-Please do not use the term ``pathname'' that is used in Unix
-documentation; use ``file name'' (two words) instead. We use the term
-``path'' only for search paths, which are lists of file names.
+@node Man Pages
+@section Man Pages
It is ok to supply a man page for the program as well as a Texinfo
manual if you wish to. But keep in mind that supporting a man page
manual is more authoritative, and describing how to access the Texinfo
documentation.
+@node Reading other Manuals
+@section Reading other Manuals
+
+There may be non-free books or documentation files that describe the
+program you are documenting.
+
+It is ok to use these documents for reference, just as the author of a
+new algebra textbook can read other books on algebra. A large portion
+of any non-fiction book consists of facts, in this case facts about how
+a certain program works, and these facts are necessarily the same for
+everyone who writes about the subject. But be careful not to copy your
+outline structure, wording, tables or examples from preexisting non-free
+documentation. Copying from free documentation may be ok; please check
+with the FSF about the individual case.
+
@node Releases
@chapter Making Releases
Makefile: Makefile.in ../config.status
cd ..; ./config.status
-clean mostlyclean distclean realclean::
+clean mostlyclean distclean maintainer-clean::
rm -f autoconf.log autoconf.sum site.exp site.bak AC* confdummy*
-distclean realclean::
+distclean maintainer-clean::
rm -f Makefile config.status config.cache config.log
TAGS:
}
# Capture only stderr in exec_output, not "creating Makefile" etc.
- catch "exec $args >/dev/null" exec_output
+ catch "exec $args --cache=/dev/null >/dev/null" exec_output
if $verbose>1 then {
- send_user "Executed $args\n"
+ send_user "Executed $args --cache=/dev/null\n"
}
if ![string match "" $exec_output] then {
fail "$args, problem with executing"
%You are forbidden to forbid anyone else to use, share and improve
%what you give them. Help stamp out software-hoarding!
+
+% Send bug reports to bug-texinfo@prep.ai.mit.edu.
+% Please include a *precise* test case in each bug report.
+
+
+% Make it possible to create a .fmt file just by loading this file:
+% if the underlying format is not loaded, start by loading it now.
+% Added by gildea November 1993.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+
% This automatically updates the version number based on RCS.
\def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
\deftexinfoversion$Revision$
\message{Loading texinfo package [Version \texinfoversion]:}
-% Print the version number if in a .fmt file.
-\everyjob{\message{[Texinfo version \texinfoversion]}\message{}}
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}\message{}
+ \catcode`+=\active \catcode`\_=\active}
% Save some parts of plain tex whose names we will redefine.
% Do @cropmarks to get crop marks
\def\cropmarks{\let\onepageout=\croppageout }
+\newinsert\margin \dimen\margin=\maxdimen
+
\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
{\catcode`\@ =11
\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
\dimen@=\dp#1 \unvbox#1
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
\else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted.
\fi
}
-\def\setzzz#1#2 \endsetzzz{\expandafter\xdef\csname SET#1\endcsname{#2}}
+% Can't use \xdef to pre-expand #2 and save some time, since \temp or
+% \next or other control sequences that we've defined might get us into
+% an infinite loop. Consider `@set foo @cite{bar}'.
+\def\setzzz#1#2 \endsetzzz{\expandafter\gdef\csname SET#1\endcsname{#2}}
% @clear VAR clears (i.e., unsets) the variable VAR.
%
%% Try out Computer Modern fonts at \magstephalf
\let\mainmagstep=\magstephalf
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+\def\setfont#1#2{\font#1=\fontprefix#2}
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+
\ifx\bigger\relax
\let\mainmagstep=\magstep1
-\font\textrm=cmr12
-\font\texttt=cmtt12
+\setfont\textrm{r12}
+\setfont\texttt{tt12}
\else
-\font\textrm=cmr10 scaled \mainmagstep
-\font\texttt=cmtt10 scaled \mainmagstep
+\setfont\textrm{r10 scaled \mainmagstep}
+\setfont\texttt{tt10 scaled \mainmagstep}
\fi
% Instead of cmb10, you many want to use cmbx10.
% cmbx10 is a prettier font on its own, but cmb10
% looks better when embedded in a line with cmr10.
-\font\textbf=cmb10 scaled \mainmagstep
-\font\textit=cmti10 scaled \mainmagstep
-\font\textsl=cmsl10 scaled \mainmagstep
-\font\textsf=cmss10 scaled \mainmagstep
-\font\textsc=cmcsc10 scaled \mainmagstep
+\setfont\textbf{b10 scaled \mainmagstep}
+\setfont\textit{ti10 scaled \mainmagstep}
+\setfont\textsl{sl10 scaled \mainmagstep}
+\setfont\textsf{ss10 scaled \mainmagstep}
+\setfont\textsc{csc10 scaled \mainmagstep}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
% A few fonts for @defun, etc.
-\font\defbf=cmbx10 scaled \magstep1 %was 1314
-\font\deftt=cmtt10 scaled \magstep1
+\setfont\defbf{bx10 scaled \magstep1} %was 1314
+\setfont\deftt{tt10 scaled \magstep1}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf}
% Fonts for indices and small examples.
% because texinfo normally uses the slanted fonts for that.
% Do not make many font distinctions in general in the index, since they
% aren't very useful.
-\font\ninett=cmtt9
-\font\indrm=cmr9
-\font\indit=cmsl9
+\setfont\ninett{tt9}
+\setfont\indrm{r9}
+\setfont\indit{sl9}
\let\indsl=\indit
\let\indtt=\ninett
\let\indsf=\indrm
\let\indbf=\indrm
-\let\indsc=\indrm
+\setfont\indsc{csc10 at 9pt}
\font\indi=cmmi9
\font\indsy=cmsy9
% Fonts for headings
-\font\chaprm=cmbx12 scaled \magstep2
-\font\chapit=cmti12 scaled \magstep2
-\font\chapsl=cmsl12 scaled \magstep2
-\font\chaptt=cmtt12 scaled \magstep2
-\font\chapsf=cmss12 scaled \magstep2
+\setfont\chaprm{bx12 scaled \magstep2}
+\setfont\chapit{ti12 scaled \magstep2}
+\setfont\chapsl{sl12 scaled \magstep2}
+\setfont\chaptt{tt12 scaled \magstep2}
+\setfont\chapsf{ss12 scaled \magstep2}
\let\chapbf=\chaprm
-\font\chapsc=cmcsc10 scaled\magstep3
+\setfont\chapsc{csc10 scaled\magstep3}
\font\chapi=cmmi12 scaled \magstep2
\font\chapsy=cmsy10 scaled \magstep3
-\font\secrm=cmbx12 scaled \magstep1
-\font\secit=cmti12 scaled \magstep1
-\font\secsl=cmsl12 scaled \magstep1
-\font\sectt=cmtt12 scaled \magstep1
-\font\secsf=cmss12 scaled \magstep1
-\font\secbf=cmbx12 scaled \magstep1
-\font\secsc=cmcsc10 scaled\magstep2
+\setfont\secrm{bx12 scaled \magstep1}
+\setfont\secit{ti12 scaled \magstep1}
+\setfont\secsl{sl12 scaled \magstep1}
+\setfont\sectt{tt12 scaled \magstep1}
+\setfont\secsf{ss12 scaled \magstep1}
+\setfont\secbf{bx12 scaled \magstep1}
+\setfont\secsc{csc10 scaled\magstep2}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
-% \font\ssecrm=cmbx10 scaled \magstep1 % This size an font looked bad.
-% \font\ssecit=cmti10 scaled \magstep1 % The letters were too crowded.
-% \font\ssecsl=cmsl10 scaled \magstep1
-% \font\ssectt=cmtt10 scaled \magstep1
-% \font\ssecsf=cmss10 scaled \magstep1
+% \setfont\ssecrm{bx10 scaled \magstep1} % This size an font looked bad.
+% \setfont\ssecit{cmti10 scaled \magstep1} % The letters were too crowded.
+% \setfont\ssecsl{sl10 scaled \magstep1}
+% \setfont\ssectt{tt10 scaled \magstep1}
+% \setfont\ssecsf{ss10 scaled \magstep1}
-%\font\ssecrm=cmb10 scaled 1315 % Note the use of cmb rather than cmbx.
-%\font\ssecit=cmti10 scaled 1315 % Also, the size is a little larger than
-%\font\ssecsl=cmsl10 scaled 1315 % being scaled magstep1.
-%\font\ssectt=cmtt10 scaled 1315
-%\font\ssecsf=cmss10 scaled 1315
+%\setfont\ssecrm{b10 scaled 1315} % Note the use of cmb rather than cmbx.
+%\setfont\ssecit{ti10 scaled 1315} % Also, the size is a little larger than
+%\setfont\ssecsl{sl10 scaled 1315} % being scaled magstep1.
+%\setfont\ssectt{tt10 scaled 1315}
+%\setfont\ssecsf{ss10 scaled 1315}
%\let\ssecbf=\ssecrm
-\font\ssecrm=cmbx12 scaled \magstephalf
-\font\ssecit=cmti12 scaled \magstephalf
-\font\ssecsl=cmsl12 scaled \magstephalf
-\font\ssectt=cmtt12 scaled \magstephalf
-\font\ssecsf=cmss12 scaled \magstephalf
-\font\ssecbf=cmbx12 scaled \magstephalf
-\font\ssecsc=cmcsc10 scaled \magstep1
+\setfont\ssecrm{bx12 scaled \magstephalf}
+\setfont\ssecit{ti12 scaled \magstephalf}
+\setfont\ssecsl{sl12 scaled \magstephalf}
+\setfont\ssectt{tt12 scaled \magstephalf}
+\setfont\ssecsf{ss12 scaled \magstephalf}
+\setfont\ssecbf{bx12 scaled \magstephalf}
+\setfont\ssecsc{csc10 scaled \magstep1}
\font\sseci=cmmi12 scaled \magstephalf
\font\ssecsy=cmsy10 scaled \magstep1
% The smallcaps and symbol fonts should actually be scaled \magstep1.5,
% but that is not a standard magnification.
% Fonts for title page:
-\font\titlerm = cmbx12 scaled \magstep3
+\setfont\titlerm{bx12 scaled \magstep3}
\let\authorrm = \secrm
% In order for the font changes to affect most math symbols and letters,
\newcount\fontdepth \fontdepth=0
% Fonts for short table of contents.
-\font\shortcontrm=cmr12
-\font\shortcontbf=cmbx12
-\font\shortcontsl=cmsl12
+\setfont\shortcontrm{r12}
+\setfont\shortcontbf{bx12}
+\setfont\shortcontsl{sl12}
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax %initialize!
+% workhorse for all \fooindexes
+% #1 is name of index, #2 is stuff to put there
\def\doind #1#2{%
+% Put the index entry in the margin if desired.
+\ifx\SETmarginindex\relax\else%
+\insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}%
+\fi%
{\count10=\lastpenalty %
{\indexdummies % Must do this here, since \bf, etc expand at this stage
\escapechar=`\\%
\def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz
\def\chapterzzz #1{\seccheck{chapter}%
\secno=0 \subsecno=0 \subsubsecno=0
-\global\advance \chapno by 1 \message{Chapter \the\chapno}%
+\global\advance \chapno by 1 \message{\putwordChapter \the\chapno}%
\chapmacro {#1}{\the\chapno}%
\gdef\thissection{#1}%
\gdef\thischaptername{#1}%
\unnumbchapmacro{#1}\def\thischapter{}%
\begingroup % Set up to handle contents files properly.
\catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
+ \catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
\raggedbottom % Worry more about breakpoints than the bottom.
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
}
\gdef\functionparens{\boldbrax\let&=\amprm\parencount=0 }
\gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+% This is used to turn on special parens
+% but make & act ordinary (given that it's active).
+\gdef\boldbraxnoamp{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb\let&=\ampnr}
% Definitions of (, ) and & used in args for functions.
% This is the definition of ( outside of all parentheses.
\def\deftypefunargs #1{%
% Expand, preventing hyphenation at `-' chars.
% Note that groups don't affect changes in \hyphenchar.
-\functionparens
+% Use \boldbraxnoamp, not \functionparens, so that & is not special.
+\boldbraxnoamp
\tclose{#1}% avoid \code because of side effects on active chars
\interlinepenalty=10000
\advance\rightskip by 0pt plus 1fil
% Use \turnoffactive so that punctuation chars such as underscore
% work in node names.
-\def\dosetq #1#2{{\let\folio=0 \turnoffactive%
+\def\dosetq #1#2{{\let\folio=0 \turnoffactive \auxhat%
\edef\next{\write\auxfile{\internalsetq {#1}{#2}}}%
\next}}
\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
% textwidth; \voffset; \hoffset (!); binding offset. All require a dimension;
% header is additional; added length extends the bottom of the page.
-\def\changepagesizes#1#2#3#4#5
-{\global\vsize= #1
+\def\changepagesizes#1#2#3#4#5{
+ \global\vsize= #1
\advance\vsize by \topskip
\global\voffset= #3
\global\hsize= #2
\def\afourlatex{\changepagesizes{22cm}{15cm}{7mm}{4.6mm}{5mm}}
+% Use @afourwide to print on European A4 paper in wide format.
+\def\afourwide{\afourpaper
+\changepagesizes{9.5in}{6.5in}{\hoffset}{\normaloffset}{\bindingoffset}}
+
% Define macros to output various characters with catcode for normal text.
\catcode`\"=\other
\catcode`\~=\other
\def~{{\tt \char '176}}
\chardef\hat=`\^
\catcode`\^=\active
+\def\auxhat{\def^{'hat}}
\def^{{\tt \hat}}
\catcode`\_=\active
{\catcode`\==\active
\global\def={{\tt \char 61}}}
+\catcode`+=\active
+\catcode`\_=\active
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
\catcode`\@=0
% \rawbackslashxx output one backslash character in current font
@let>=@normalgreater
@let+=@normalplus}
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
% That is what \eatinput is for; after that, the `\' should revert to printing
% a backslash.
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
% the first `\{ in the file would cause an error. This macro tries to fix
% that, assuming it is called before the first `\' could plausibly occur.
+% Also back turn on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
%
-@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi}
+@gdef@fixbackslash{@ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active @catcode`@_=@active}
%% These look ok in all fonts, so just make them not special. The @rm below
%% makes sure that the current font starts out as the newly loaded cmr10