autoconf2.59-2.59+dfsg/0000755000175000017500000000000012067673425014054 5ustar taffittaffitautoconf2.59-2.59+dfsg/configure.ac0000644000175000017500000001104207752412273016335 0ustar taffittaffit# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # Copyright (C) 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # We need AC_CONFIG_TESTDIR. AC_PREREQ([2.57]) AC_INIT([GNU Autoconf], [2.59], [bug-autoconf@gnu.org]) AC_SUBST([PACKAGE_NAME])dnl AC_CONFIG_SRCDIR([ChangeLog]) AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES([config/Makefile]) AM_INIT_AUTOMAKE([check-news 1.7.8 dist-bzip2 readme-alpha]) # Initialize the test suite and build position independent wrappers. AC_CONFIG_TESTDIR([tests]) AC_CONFIG_FILES([tests/Makefile tests/atlocal]) AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in], [chmod +x tests/autoconf]) AC_CONFIG_FILES([tests/autoheader:tests/wrapper.in], [chmod +x tests/autoheader]) AC_CONFIG_FILES([tests/autom4te:tests/wrapper.in], [chmod +x tests/autom4te]) AC_CONFIG_FILES([tests/autoreconf:tests/wrapper.in], [chmod +x tests/autoreconf]) AC_CONFIG_FILES([tests/autoscan:tests/wrapper.in], [chmod +x tests/autoscan]) AC_CONFIG_FILES([tests/autoupdate:tests/wrapper.in], [chmod +x tests/autoupdate]) AC_CONFIG_FILES([tests/ifnames:tests/wrapper.in], [chmod +x tests/ifnames]) AC_PATH_PROG([EXPR], [expr]) ## ---- ## ## M4. ## ## ---- ## # We use a path for GNU m4 so even if users have another m4 first in # their path, the installer can configure with a path that has GNU m4 # first and get that path embedded in the installed autoconf and # autoheader scripts. AC_PROG_GNU_M4 if test x"$ac_cv_prog_gnu_m4" != xyes; then AC_MSG_ERROR([GNU M4 1.4 is required]) fi ## ----------- ## ## Man pages. ## ## ----------- ## AC_CONFIG_FILES(man/Makefile) AM_MISSING_PROG(HELP2MAN, help2man) ## ------ ## ## Perl. ## ## ------ ## # We use a path for perl so the #! line in autoscan will work. AC_PATH_PROG([PERL], perl, no) AC_SUBST([PERL])dnl if test "$PERL" = no; then AC_MSG_ERROR([perl is not found]) fi $PERL -e 'require 5.005_03;' || { AC_MSG_ERROR([Perl 5.005_03 or better is required]) } ## ------- ## ## Emacs. ## ## ------- ## AC_CONFIG_FILES([lib/emacs/Makefile]) TEST_EMACS=$EMACS test x"$TEST_EMACS" = xt && TEST_EMACS= AC_CHECK_PROGS([TEST_EMACS], [emacs xemacs], [no]) # autoconf-mode.el and autotest-mode.el do not work with older version of # Emacs (i.e. 18.x.x). During byte-compilation, Emacs complains: # "Variable (broken nil) seen on pass 2 of byte compiler but not pass 1" # We detect this problem here. AS_IF([test "$TEST_EMACS" != no], [AC_CACHE_CHECK([whether $TEST_EMACS is sufficiently recent], [ac_cv_prog_emacs_ok], [# Note: The quoted "EOF" is intentional. It protects the ` in the text. cat >conftest.el << "EOF" (defvar broken) (defun broken-mode () (setq broken-defaults `(broken nil))) EOF AS_IF([AC_RUN_LOG( [$TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2])], [ac_cv_prog_emacs_ok=yes], [ac_cv_prog_emacs_ok=no]) rm -f conftest.el conftest.elc]) AS_IF([test $ac_cv_prog_emacs_ok = no], [TEST_EMACS=no])]) AC_SUBST([EMACS], [$TEST_EMACS]) AM_PATH_LISPDIR ## ------------ ## ## Conclusion. ## ## ------------ ## AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile]) AC_OUTPUT # Report the state of this version of Autoconf if this is a beta. m4_bmatch(m4_defn([AC_PACKAGE_VERSION]), [[a-z]], [ cat <. Below you will find information on the status of this version of Autoconf. EOF sed -n '/^\* Status/,$p' $srcdir/BUGS ]) autoconf2.59-2.59+dfsg/Makefile.am0000644000175000017500000000577007734514461016120 0ustar taffittaffit## Process this file with automake to create Makefile.in. -*-Makefile-*- ## Makefile for Autoconf. ## Copyright (C) 1999, 2000, 2001, 2002, 2003 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. # bin/ and tests/ must be run first, as they build the tests executables # (tests/autom4te etc.), that we happen to use here. SUBDIRS = bin tests . lib config man doc ACLOCAL_AMFLAGS = -I config EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \ BUGS \ GNUmakefile Makefile.maint Makefile.cfg MAINTAINERCLEANFILES = INSTALL ## -------------------- ## ## Forwarding targets. ## ## -------------------- ## html: cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ .PHONY: html ## --------- ## ## INSTALL. ## ## --------- ## pkgdata_DATA = INSTALL AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split INSTALL: $(top_srcdir)/doc/install.texi $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -o $(srcdir)/INSTALL \ $(top_srcdir)/doc/install.texi ## maintainer-check ## maintainer-check: maintainer-check-tests maintainer-check-tests: cd tests && make maintainer-check ## ----------------------------------- ## ## Updating Perl files from Automake. ## ## ----------------------------------- ## ## Fetch the latest versions of files we care about. automake_cvsweb = \ http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/automake automake_cvsargs = \ 'content-type=text/plain&cvsroot=automake' autom4te_files = \ Autom4te/Configure_ac.pm \ Autom4te/Channels.pm \ Autom4te/FileUtils.pm \ Autom4te/Struct.pm \ Autom4te/XFile.pm autom4te-update: rm -rf Fetchdir > /dev/null 2>&1 mkdir Fetchdir; mkdir Fetchdir/Autom4te ## If a get fails then that is a problem. (cd Fetchdir && \ $(WGET) $(automake_cvsweb)/lib/Automake/Configure_ac.pm?$(automake_cvsargs) -O Autom4te/Configure_ac.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/Channels.pm?$(automake_cvsargs) -O Autom4te/Channels.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/FileUtils.pm?$(automake_cvsargs) -O Autom4te/FileUtils.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/Struct.pm?$(automake_cvsargs) -O Autom4te/Struct.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/XFile.pm?$(automake_cvsargs) -O Autom4te/XFile.pm; \ :) perl -pi -e 's/Automake::/Autom4te::/g' Fetchdir/Autom4te/*.pm for file in $(autom4te_files); do \ $(move_if_change) Fetchdir/$$file $(srcdir)/lib/$$file; \ done autoconf2.59-2.59+dfsg/ChangeLog.00000644000175000017500000003134707340225367015770 0ustar taffittaffitMon Jul 20 01:08:01 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_ALLOCA): Don't try -lucb -- it's too often broken. Sat Jul 18 13:40:46 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_MAJOR_HEADER): Add missing "$". * acspecific.m4 (AC_ALLOCA): Put -lc before -lucb. Fri Jul 17 00:00:07 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.sh: Print the lines of the input file where unresolved macros occur. From Francois Pinard. * acspecific.m4 (AC_PROG_INSTALL), acgeneral.m4 (AC_PROGRAM_CHECK): Use test -f instead of -s. * autoconf.sh: grep for undefined macros in output. Tue Jul 14 01:19:26 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) * acgeneral.m4 (AC_PROGRAM_CHECK): Search PATH manually to avoid "command not found" messages on /dev/tty. Remove "args for check" argument. (AC_INIT): Don't define checkfor; no longer needed. * acspecific.m4 (AC_PROG_CC, AC_PROG_RANLIB, AC_PROG_YACC, AC_PROG_LEX): Don't pass "args for check" argument. * acgeneral.m4 (AC_PROGRAMS_CHECK): New macro. * acspecific.m4 (AC_PROG_AWK): Use it. Check for mawk, gawk, nawk, and awk. (AC_PROG_YACC): Check for byacc if bison isn't found. * acspecific.m4 (AC_PROG_CC): Renamed from AC_PROG_GCC. (AC_PROG_YACC): Renamed from AC_PROG_BISON. (AC_PROG_AWK): Renamed from AC_PROG_GAWK. (AC_PROG_LEX): Renamed from AC_PROG_FLEX. * acgeneral.m4 (AC_TEST_PROGRAM): Redirect stderr to /dev/null both inside and outside the subshell to try to prevent core dumped messages. Who knows, it might even help. Thu Jul 9 21:37:45 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Check for DGUX before SVR4. Fri Jul 3 01:01:50 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_REMOTE_TAPE): Renamed from AC_MTIO. Define HAVE_SYS_MTIO_H instead of NO_MTIO. (AC_LONG_FILE_NAMES): Renamed from AC_LONG_FILENAMES. (AC_RSH): Define HAVE_NETDB_H instead of USE_REXEC. Above mostly from Richard Stallman. * acgeneral.m4 (AC_MISSING_FUNCS): Macro removed. * acspecific.m4 (AC_VPRINTF, AC_WAIT3, AC_UTIME_NULL, AC_TIMEZONE, AC_ST_BLOCKS, AC_ST_BLKSIZE): Change from FOO_MISSING to HAVE_FOO. (AC_WAIT3): Renamed from AC_WAIT3_RUSAGE. (AC_TIMEZONE): Require AC_STRUCT_TM. (AC_STRUCT_TM): Provide itself. * acgeneral.m4 (AC_OUTPUT): Add --recheck option to config.status. * acspecific.m4 (AC_ST_RDEV, AC_CONST): New macros. * acgeneral.m4 (AC_DEFINE): Don't consider an empty value arg to be an omitted arg. Thu Jul 2 16:05:05 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): New macro. * autoconf.sh: Only reject an arg that's not a known option if it is an option. Tue Jun 30 16:08:04 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_INIT, AC_OUTPUT): Eliminate vpsub. Thu Jun 25 12:42:10 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) * autoconf.sh: Add --version option. * acgeneral.m4: Support it. Wed Jun 24 14:04:13 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_TIMEZONE): Do the checks unconditionally, not only if strftime.o is in LIBOBJS. * acspecific.m4 (AC_DIR_HEADER): Don't assume sys/dir.h exists. * acgeneral.m4 (AC_PROGRAM_CHECK): Don't include the program name in the value-if-found. From Rich Murphey. * acspecific.m4 (AC_PROG_{GCC,RANLIB,GAWK,BISON,FLEX}): Change callers. * acgeneral.m4 (AC_OUTPUT): Mention the args given to configure in a comment in config.status. Fri Jun 19 13:18:12 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_FUNC_CHECK): Use the third arg when it's non-null, not when it's null. From Ian Lance Taylor. Thu Jun 18 12:10:27 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_BEFORE): Print message in next-error format. From Franc,ois Pinard. * acgeneral.m4 (AC_PROGRAM_CHECK): If args-for-use is empty, don't put a space after the program name. * acspecific.m4 (AC_DECLARE_YYTEXT): Move AC_REQUIREs from AC_PROG_FLEX to here, where they belong. * acspecific.m4 (AC_MEMORY_H): Look for memchr instead of memcpy. From Karl Berry. Wed Jun 17 09:56:59 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_BEFORE): New macro. * acspecific.m4 (AC_PROG_GCC, AC_DIR_HEADER, AC_AIX, AC_MINIX, AC_ISC_POSIX): Use it. Tue Jun 16 14:46:29 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * autoconf.sh: Remove incomplete output file if interrupted. * acgeneral.m4 (AC_INIT): Avoid running an extra subshell for pwd. From Franc,ois Pinard. Mon Jun 15 21:27:49 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_TEST_PROGRAM): Take another arg for cross-compiling. * acspecific.m4 (AC_CROSS_CHECK): New program. * acgeneral.m4 (AC_REQUIRE, AC_PROVIDE): New macros. (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_TEST_CPP): Use them. * acspecific.m4 (AC_PROG_GCC, AC_GCC_TRADITIONAL, AC_PROG_CPP, AC_PROG_FLEX, AC_INLINE): Ditto. Sat Jun 13 17:54:24 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_MEMORY_H): echo what it's doing. Thu Jun 11 14:18:35 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_MINUS_C_MINUS_O, AC_INLINE, AC_SETVBUF_REVERSED): New macros. (AC_ALLOCA): Define HAVE_ALLOCA_H if appropriate. * acgeneral.m4 (AC_INIT): Do pwd in the srcdir, not current dir. Scan through "$@" (implicitly) instead of $*. (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP): Supply a `:' if `true' argument is empty. * acgeneral.m4, acspecific.m4: Omit `:' in callers. Wed Jun 10 12:03:11 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_HEADER_CHECK, AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP, AC_FUNC_CHECK): Make the last argument (program to run if test fails) optional. (AC_HAVE_FUNCS, AC_HAVE_HEADERS): Don't pass optional last args. * acspecific.m4 (most macros): Likewise. Mon Jun 8 16:27:10 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_VFORK): Get rid of backquotes. * acgeneral.m4 (AC_OUTPUT): Exit with 0 status when --no-create was given. Only write to the AC_CONFIG_NAME file if it doesn't exist or is different from what we'd write. From Ian Lance Taylor. Thu Jun 4 14:46:22 1992 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_UNISTD_H, AC_UID_T, AC_SIZE_T, AC_PID_T, AC_ST_BLKSIZE, AC_STRUCT_TM): Quote the whole macro body. * acgeneral.m4 (AC_OUTPUT): Look for config header.in in top_srcdir, not srcdir. From Garrett Wollman. * acgeneral.m4 (AC_OUTPUT): Don't add make .NOEXPORT rule to output files. * acgeneral.m4, acspecific.m4: Rename AC_PROG_CHECK to AC_PROGRAM_CHECK, AC_PROG_EGREP to AC_PROGRAM_EGREP, AC_TEST_PROG to AC_TEST_PROGRAM. Wed Jun 3 14:00:07 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_INIT, AC_OUTPUT): Add --no-create option. * acgeneral.m4 (AC_COMPILE_CHECK): Check the C compiler exit status instead of trying to run the test program. * acspecific.m4 (AC_RESTARTABLE_SYSCALLS): Use AC_TEST_PROG instead of doing it by hand. * acspecific.m4 (AC_PROG_GCC, AC_AIX, AC_XENIX_DIR, AC_SCO_INTL, AC_DYNIX_SEQ): Use AC_PROG_EGREP instead of AC_TEST_PROG. * acgeneral.m4 (AC_TEST_PROG): Renamed from AC_TEST_PROGRAM. * acgeneral.m4 (AC_INIT): Don't relativize `.'. (AC_OUTPUT): Substitute the subdirectory path, not the top path, for srcdir, unless the top path is `.'. * acgeneral.m4 (AC_OUTPUT): Special-case substituting DEFS. From Ian Lance Taylor. * acspecific.m4 (AC_GCC_TRADITIONAL): Use CPP instead of compiling a test program. * acgeneral.m4 (AC_TEST_CPP): Pass DEFS to CPP. (AC_HEADER_EGREP): Don't echo anything. (AC_PROG_EGREP): New macro. Tue Jun 2 14:07:27 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_CONFIG_HEADER): Renamed from AC_HEADER_FILE. Rename AC_HEADER_NAME TO AC_CONFIG_NAME. (AC_SUBST): Add the arg variable to a diversion for config.status. (AC_OUTPUT): Write the code to create output files into config.status, then run that. Always use `awk'; checking for nawk in a subshell doesn't seem to work on 4.3BSD. * acgeneral.m4 (AC_HEADER_EGREP): Pass DEFS to CPP. * acspecific.m4 (AC_SIZE_T): Define size_t as int, not long. From Ian Lance Taylor. * acspecific.m4 (AC_STDC_HEADERS): Also check for stdarg.h. From Garrett Wollman. Wed May 20 00:34:03 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Use nawk if available. * acgeneral.m4 (AC_INIT): Make srcdir=`.' absolute. * acspecific.m4 (AC_DIR_HEADER): Include sys/types.h before dir header in closedir test. * acgeneral.m4, acspecific.m4: AC_LIBTHING_CHECK renamed to AC_COMPILE_CHECK. * acspecific.m4 (AC_AIX, AC_XENIX_DIR, AC_SCO_INTL, AC_DYNIX_SEQ): Use the C preprocessor instead of just looking for files. Mon May 18 20:51:50 1992 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (WORDS_BIGENDIAN): Fix exit expression. (AC_DECLARE_YYTEXT): Eval $CPP. (AC_DIR_HEADER): Compile the test program; don't just preprocess it. Above all from Karl Berry. Fri May 15 00:57:01 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_AIX): Don't define _BSD, to avoid getting union wait. * acgeneral.m4 (AC_HEADER_EGREP): New macro, replacing AC_IDENT*. * acspecific.m4 (AC_MEMORY_H, AC_RETSIGTYPE, AC_{UID,SIZE,PID}_T): Use it. * acgeneral.m4 (AC_TEST_CPP): New macro. (AC_IDENT_{PRESENT,MISSING}): Macros deleted. (AC_HEADER_CHECK): Use AC_TEST_CPP, replaces AC_HEADER_{PRESENT, MISSING}. (AC_LIBTHING_CHECK): Replace AC_LIBTHING_{PRESENT,MISSING}. (AC_FUNC_CHECK): Replace AC_FUNC_PRESENT. (AC_INIT): Don't set INCLUDEDIR. * acspecific.m4 (AC_DIR_HEADER): Use AC_TEST_CPP. * All other macros: Don't refer to INCLUDEDIR; use AC_HEADER_CHECK instead. * acspecific.m4 (AC_PROG_CPP): Don't evaluate $CC until called. Try $CC -E before /lib/cpp. Thu May 14 23:15:02 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Remove each file before creating it. Sat May 9 14:52:57 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_WAIT3_RUSAGE): New macro. * acgeneral.m4 (AC_INIT, AC_OUTPUT): Use AC_SUBST instead of a special mechanism to substitute for srcdir. * acgeneral.m4 (AC_OUTPUT): Substitute for exec_prefix if it was given, even if not substituting for prefix. * acgeneral.m4 (AC_INIT, AC_OUTPUT): Remove @VPATH@ substitution; use @srcdir@ instead. Sun May 3 01:21:47 1992 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_NOTICE): New macro taken from AC_INIT, to avoid m4 coredump. From Karl Berry. * acgeneral.m4 (AC_OUTPUT): Look for header-file.in in $srcdir, not current dir. * acgeneral.m4 (AC_IDENT_{MISSING,PRESENT}): Make them agree with the documentation -- the third arg is a shell command, not an identifier to define. * acspecific.m4 (AC_DIR_HEADER): Change the caller. Mon Apr 27 09:15:15 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acspecific.m4: Use AC_TEST_PROGRAM wherever $compile was being used directly. * acgeneral.m4 (AC_HAVE_HEADERS, AC_HAVE_FUNCS, AC_FUNC_PRESENT, AC_TEST_PROGRAM): New macros from Ian Lance Taylor. * acspecific.m4 (AC_PROG_INSTALL): Screen out /usr/sbin/install. (AC_CHAR_UNSIGNED): Don't define __CHAR_UNSIGNED__ if it's predefined. Fri Apr 24 10:08:21 1992 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Make the arg a list of files instead of directories. * acspecific.m4 (AC_ALLOCA): Check whether the alternate libraries actually contain alloca. From Ian Lance Taylor. * acspecific.m4 (AC_PROG_CPP): New macro. * acgeneral.m4 (AC_OUTPUT): Allow newly defined values to be more than one word for AC_HEADER_FILE. From Karl Berry. * acgeneral.m4 (AC_OUTPUT): Don't substitute DEFS if AC_HEADER_FILE. (AC_LIBTHING{PRESENT,MISSING}): Run conftest in subshell. From Ian Lance Taylor. ----- Copyright 1992 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/Makefile.maint0000644000175000017500000004034507722605453016627 0ustar taffittaffit# -*-Makefile-*- # This Makefile fragment is shared between the coreutils, # CPPI, Bison, and Autoconf. ## Copyright (C) 2001-2003 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. # This is reported not to work with make-3.79.1 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ME := Makefile.maint # Do not save the original name or timestamp in the .tar.gz file. GZIP_ENV = '--no-name --best --rsyncable' CVS = cvs ifeq ($(origin prev_version_file), undefined) prev_version_file = .prev-version endif PREV_VERSION := $(shell cat $(prev_version_file)) tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]') tag-this-version = $(subst .,_,$(VERSION)) this-cvs-tag = $(tag-package)-$(tag-this-version) my_distdir = $(PACKAGE)-$(VERSION) # Old releases are stored here. # Used for diffs and xdeltas. release_archive_dir ?= ../release # Prevent programs like 'sort' from considering distinct strings to be equal. # Doing it here saves us from having to set LC_ALL elsewhere in this file. export LC_ALL = C ## --------------- ## ## Sanity checks. ## ## --------------- ## # Checks that don't require cvs. # Run `changelog-check' last, as previous test may reveal problems requiring # new ChangeLog entries. local-checks-available = \ po-check copyright-check writable-files m4-check author_mark_check \ changelog-check strftime-check syntax-check makefile_path_separator_check \ makefile-check .PHONY: $(local-checks-available) local-check = $(filter-out $(local-checks-to-skip), $(local-checks-available)) # Make sure C source files in src/ don't include xalloc.h directly, # since they all already include it via sys2.h. # It's not a big deal -- just aesthetics. .PHONY: $(syntax-check-rules) syntax-check-rules = \ sc_cast_of_argument_to_free \ sc_cast_of_x_alloc_return_value \ sc_changelog \ sc_error_exit_success \ sc_space_tab \ sc_sun_os_names \ sc_system_h_headers \ sc_unmarked_diagnostics \ sc_xalloc_h_in_src syntax-check: $(syntax-check-rules) # @grep -E '# *include <(limits|std(def|arg|bool))\.h>' \ # $$(find -type f -name '*.[chly]') && \ # { echo '$(ME): found conditional include' 1>&2; \ # exit 1; } || : # grep -E '^# *include <(string|stdlib)\.h>' \ # $(srcdir)/{lib,src}/*.[chy] && \ # { echo '$(ME): FIXME' 1>&2; \ # exit 1; } || : # FIXME: don't allow `#include .strings\.h' anywhere # Look for diagnostics that aren't marked for translation. # This won't find any for which error's format string is on a separate line. sc_unmarked_diagnostics: @grep --exclude=$(srcdir)/src/shred.c -E \ '\&2; \ exit 1; } || : sc_cast_of_argument_to_free: @grep -E '\&2; \ exit 1; } || : sc_cast_of_x_alloc_return_value: @grep -E --exclude=$(srcdir)/lib/regex.c \ '\*\) *x(m|c|re)alloc\>' $(srcdir)/{lib,src}/*.[chy] && \ { echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \ exit 1; } || : sc_space_tab: @( cvsu --list ) > /dev/null 2>&1 || : && \ grep '[ ] ' \ $$(cvsu --list | grep -vEf .x-$@ ) && \ { echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \ 1>&2; exit 1; } || : # Using EXIT_SUCCESS as the first argument to error is misleading, # since when that parameter is 0, error does not exit. Use `0' instead. sc_error_exit_success: @grep -F 'error (EXIT_SUCCESS,' \ $$(find -type f -name '*.[chly]') && \ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \ exit 1; } || : # FIXME: merge this with sc_system_h_headers below. # xalloc.h is included via system.h, so should not be included # directly by any file in src/. sc_xalloc_h_in_src: @if test -f $(srcdir)/src/sys2.h; then \ if grep 'xalloc\.h' $(srcdir)/src/*.c; then \ exit 1; \ fi; \ fi # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ # Each nonempty line must start with a year number, or a TAB. sc_changelog: @grep '^[^12 ]' $$(find . -name ChangeLog -maxdepth 2) && \ { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \ exit 1; } || : header_regexp = \ alloca\ |closeout\ |ctype\ |dirent\ |errno\ |fcntl\ |inttypes\ |limits\ |locale\ |pathmax\ |std(lib|bool)\ |string\ |sys/(stat|dir|time)\ |time\ |unistd\ |utime\ |version-etc\ |xalloc h_re := $(shell echo '$(header_regexp)'|tr -d ' ') # Files in src/ should not include directly any of # the headers already included via system.h. # Get list of candidates with this: # grep -h include src/sys*.h|sed 's/.*include //'|sort - sc_system_h_headers: @( cvsu --list ) > /dev/null 2>&1 || : && \ grep -E '^# *include ["<]($(h_re))\.h[">]' \ $$(cvsu --list src | grep -Ev 'sys(2|tem)\.h$$') \ && { echo '$(ME): the above are already included via system.h'\ 1>&2; exit 1; } || : sc_sun_os_names: @( cvsu --list ) > /dev/null 2>&1 || : && \ grep -Ei \ 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \ $$(cvsu --list | grep -vEf .x-$@ ) && \ { echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \ exit 1; } || : # Ensure that date's --help output stays in sync with the info # documentation for GNU strftime. The only exception is %N, # which date accepts but GNU strftime does not. extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/' strftime-check: if test -f $(srcdir)/src/date.c; then \ grep '^ %. ' $(srcdir)/src/date.c | sort \ | $(extract_char) > $@-src; \ { echo N; \ info libc date calendar format | grep '^ `%.'\' \ | $(extract_char); } | sort > $@-info; \ diff -u $@-src $@-info || exit 1; \ rm -f $@-src $@-info; \ fi # Ensure that we use only the standard $(VAR) notation, # not @...@ in Makefile.am, now that we can rely on automake # to emit a definition for each substituted variable. makefile-check: grep -E '@[A-Z_0-9]+@' `find . -name Makefile.am` \ && { echo 'Makefile.maint: use $(...), not @...@' 1>&2; exit 1; } || : changelog-check: if head ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \ :; \ else \ echo "$(VERSION) not in ChangeLog" 1>&2; \ exit 1; \ fi m4-check: @grep 'AC_DEFUN([^[]' m4/*.m4 \ && { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \ exit 1; } || : # Verify that all source files using _() are listed in po/POTFILES.in. po-check: if test -f po/POTFILES.in; then \ grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \ files=; \ for file in lib/*.[chly] src/*.[chly]; do \ case $$file in \ *.[ch]) \ base=`expr " $$file" : ' \(.*\)\..'`; \ { test -f $$base.l || test -f $$base.y; } && continue;; \ esac; \ files="$$files $$file"; \ done; \ grep -E -l '\bN?_\([^)"]*("|$$)' $$files | sort > $@-2; \ diff -u $@-1 $@-2 || exit 1; \ rm -f $@-1 $@-2; \ fi # In a definition of #define AUTHORS "... and ..." where the RHS contains # the English word `and', the string must be marked with `N_ (...)' so that # gettext recognizes it as a string requiring translation. author_mark_check: @grep '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \ { echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \ exit 1; } || : # Sometimes it is useful to change the PATH environment variable # in Makefiles. When doing so, it's better not to use the Unix-centric # path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'. # It'd be better to use `find -print0 ...|xargs -0 ...', but less portable, # and there probably aren't many projects with so many Makefile.am files # that we'd have to worry about limits on command line length. msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead' makefile_path_separator_check: @grep 'PATH=.*:' `find $(srcdir) -name Makefile.am` \ && { echo $(msg) 1>&2; exit 1; } || : # Check that `make alpha' will not fail at the end of the process. writable-files: if test -d $(release_archive_dir); then :; else \ mkdir $(release_archive_dir); \ fi for file in $(distdir).tar.gz $(xd-delta) \ $(release_archive_dir)/$(distdir).tar.gz \ $(release_archive_dir)/$(xd-delta); do \ test -e $$file || continue; \ test -w $$file \ || { echo ERROR: $$file is not writable; fail=1; }; \ done; \ test "$$fail" && exit 1 || : v_etc_file = lib/version-etc.c # Make sure that the copyright date in $(v_etc_file) is up to date. copyright-check: @if test -f $(v_etc_file); then \ grep '"Copyright (C) $(shell date +%Y) Free' $(v_etc_file) \ >/dev/null \ || { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \ exit 1; }; \ fi # Sanity checks with the CVS repository. cvs-tag-check: echo $(this-cvs-tag); \ if $(CVS) -n log -h README | grep -e $(this-cvs-tag): >/dev/null; then \ echo "$(this-cvs-tag) as already been used; not tagging" 1>&2; \ exit 1; \ else :; fi cvs-diff-check: if $(CVS) diff >cvs-diffs; then \ rm cvs-diffs; \ else \ echo "Some files are locally modified:" 1>&2; \ cat cvs-diffs; \ exit 1; \ fi cvs-check: cvs-diff-check cvs-tag-check maintainer-distcheck: changelog-check $(MAKE) distcheck $(MAKE) my-distcheck # Tag before making distribution. Also, don't make a distribution if # checks fail. Also, make sure the NEWS file is up-to-date. # FIXME: use dist-hook/my-dist like distcheck-hook/my-distcheck. cvs-dist: $(local-check) cvs-check maintainer-distcheck $(CVS) update po $(CVS) tag -c $(this-cvs-tag) $(MAKE) dist # Use this to make sure we don't run these programs when building # from a virgin tgz file, below. null_AM_MAKEFLAGS = \ ACLOCAL=false \ AUTOCONF=false \ AUTOMAKE=false \ AUTOHEADER=false \ MAKEINFO=false # Detect format-string/arg-list mismatches that would normally be obscured # by the use of _(). The --disable-nls effectively defines away that macro, # and building with CFLAGS='-Wformat -Werror' causes any format warning to be # treated as a failure. TMPDIR ?= /tmp t=$(TMPDIR)/$(PACKAGE)/test my-distcheck: $(local-check) -rm -rf $(t) mkdir -p $(t) GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz cd $(t)/$(distdir) \ && ./configure --disable-nls \ && $(MAKE) CFLAGS='-Wformat -Werror' \ AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \ && $(MAKE) dvi \ && $(MAKE) check \ && $(MAKE) distclean (cd $(t) && mv $(distdir) $(distdir).old \ && $(AMTAR) -zxf - ) < $(distdir).tar.gz diff -ur $(t)/$(distdir).old $(t)/$(distdir) -rm -rf $(t) @echo "========================"; \ echo "$(distdir).tar.gz is ready for distribution"; \ echo "========================" WGET = wget WGETFLAGS = -C off tgz-md5 = $(shell md5sum < $(my_distdir).tar.gz|sed 's/ -//') tgz-sha1 = $(shell sha1sum < $(my_distdir).tar.gz|sed 's/ -//') bz2-md5 = $(shell md5sum < $(my_distdir).tar.bz2|sed 's/ -//') bz2-sha1 = $(shell sha1sum < $(my_distdir).tar.bz2|sed 's/ -//') xdelta-md5 = $(shell md5sum < $(xd-delta)|sed 's/ -//') xdelta-sha1 = $(shell sha1sum < $(xd-delta)|sed 's/ -//') tgz-size = $(shell du --human $(my_distdir).tar.gz|sed 's/\([MkK]\).*/ \1B/') bz2-size = $(shell du --human $(my_distdir).tar.bz2|sed 's/\([MkK]\).*/ \1B/') xd-size = $(shell du --human $(xd-delta)|sed 's/\([MkK]\).*/ \1B/') rel-check: tarz=/tmp/rel-check-tarz-$$$$; \ md5_tmp=/tmp/rel-check-md5-$$$$; \ set -e; \ trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \ $(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \ echo "$(md5) -" > $$md5_tmp; \ md5sum -c $$md5_tmp < $$tarz prev-tgz = $(PACKAGE)-$(PREV_VERSION).tar.gz xd-delta = $(PACKAGE)-$(PREV_VERSION)-$(VERSION).xdelta signatures ?= $(distdir).tar.bz2.asc $(distdir).tar.gz.asc %.asc: % rm -f $@ gpg --armor --detach-sign -o $@ $< rel-files = $(xd-delta) $(distdir).tar.bz2 $(distdir).tar.gz $(signatures) announce_gen ?= ./announce-gen announcement: NEWS ChangeLog $(rel-files) $(signatures) @$(announce_gen) \ --release-type=$(RELEASE_TYPE) \ --package=$(PACKAGE) \ --prev=$(PREV_VERSION) \ --curr=$(VERSION) \ --release-archive-directory=$(release_archive_dir) \ --news=NEWS \ $(addprefix --url-dir=, $(url_dir_list)) \ ## ---------------- ## ## Updating files. ## ## ---------------- ## ftp-gnu = ftp://ftp.gnu.org/gnu www-gnu = http://www.gnu.org # Use mv, if you don't have/want move-if-change. move_if_change ?= move-if-change # --------------------- # # Updating everything. # # --------------------- # .PHONY: update local_updates ?= wget-update cvs-update po-update update: $(local_updates) # ------------------- # # Updating PO files. # # ------------------- # po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE) .PHONY: do-po-update po-update do-po-update: tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\ rm -rf $$tmppo && \ mkdir $$tmppo && \ (cd $$tmppo && \ $(WGET) $(WGETFLAGS) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\ cp $$tmppo/*.po po cd po && $(MAKE) update-po $(MAKE) po-check po-update: if test -d "po"; then \ $(MAKE) do-po-update; \ fi # -------------------------- # # Updating GNU build tools. # # -------------------------- # # The following pseudo table associates a local directory and a URL # with each of the files that belongs to some other package and is # regularly updated from the specified URL. wget_files ?= \ $(srcdir)/config/config.guess \ $(srcdir)/config/config.sub \ $(srcdir)/config/texinfo.tex \ $(srcdir)/src/ansi2knr.c get-targets = $(patsubst %, get-%, $(wget_files)) config.guess-url_prefix = $(ftp-gnu)/config/ config.sub-url_prefix = $(ftp-gnu)/config/ ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/ texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/ standards.texi-url_prefix = $(www-gnu)/prep/ make-stds.texi-url_prefix = $(standards.texi-url_prefix) target = $(patsubst get-%, %, $@) url = $($(notdir $(target))-url_prefix)$(notdir $(target)) .PHONY: $(get-targets) $(get-targets): $(WGET) $(WGETFLAGS) $(url) -O $(target).t \ && $(move_if_change) $(target).t $(target) cvs_files ?= \ $(srcdir)/config/depcomp \ $(srcdir)/config/install-sh \ $(srcdir)/config/missing \ $(srcdir)/config/mkinstalldirs \ $(srcdir)/src/ansi2knr.c automake_repo=:pserver:anoncvs:anoncvs@sources.redhat.com:/cvs/automake .PHONY: wget-update wget-update: $(get-targets) .PHONY: cvs-update cvs-update: fail=; \ for f in $(cvs_files); do \ test -f $$f || { echo "*** skipping $$f" 1>&2; continue; }; \ cvs diff $$f > /dev/null \ || { echo "*** $$f is locally modified; skipping it" 1>&2; \ fail=yes; continue; }; \ file=$$(basename $$f); \ echo checking out $$file...; \ $(CVS) -d $(automake_repo) co -p automake/lib/$$file> $$f.t \ && $(move_if_change) $$f.t $$f; \ done; \ test "$$fail" && exit 1 define emit-upload-commands echo ===================================== echo ===================================== echo upload $(PACKAGE) $(PREV_VERSION) $(VERSION) echo '# send the /tmp/announcement e-mail' echo ===================================== echo ===================================== endef $(xd-delta): $(release_archive_dir)/$(prev-tgz) $(distdir).tar.gz xdelta delta -9 $^ $@ || : .PHONY: alpha beta major alpha beta major: $(local-check) $(MAKE) cvs-dist $(MAKE) $(xd-delta) $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) ln $(rel-files) $(release_archive_dir) chmod a-w $(rel-files) echo $(VERSION) > $(prev_version_file) $(CVS) ci -m. $(prev_version_file) @$(emit-upload-commands) autoconf2.59-2.59+dfsg/THANKS0000644000175000017500000002354607747426374015011 0ustar taffittaffitAutoconf was originally written by David J. MacKenzie . It would not be what it is today without the invaluable help of these people: Aaron Crane aaronc@pobox.com Aaron M. Ucko amu@alum.mit.edu Aharon Robbins arnold@gnu.org Akim Demaille akim@freefriends.org Akinori Musha knu@iDaemons.org Alain Knaff Alain.Knaff@imag.fr Adam J. Richter adam@yggdrasil.com Alec Wolman wolman@cs.washington.edu Alexandre Duret-Lutz duret_g@epita.fr Alexandre Oliva oliva@lsd.ic.unicamp.br Andreas Buening andreas.buening@nexgo.de Andreas Jaeger aj@suse.de Andreas Schott schott@rzg.mpg.de Andreas Schwab schwab@issan.informatik.uni-dortmund.de Andrej Borsenkow borsenkow.msk@sni.de Art Haas ahaas@neosoft.com Artur Frysiak wiget@pld.org.pl Assar Westerlund assar@sics.se Axel Thimm Axel.Thimm@physik.fu-berlin.de Ben Elliston bje@redhat.com Bill Moseley moseley@hank.org Bill Sommerfeld sommerfeld@apollo.hp.com Bob Friesenhahn bfriesen@simple.dallas.tx.us Bob Proulx bob@proulx.com Bob Wilson bwilson@tensilica.com Bram Moolenaar bram@vim.org Bruno Haible haible@ilog.fr Carl Edman cedman@princeton.edu Carlos Velasco carlosev@newipnet.com Chad R. Larson chad@anasazi.com Chris P. Ross cross@uu.net Chris Provenzano proven@cygnus.com Christian Cornelssen ccorn@cs.tu-berlin.de Christian Krackowizer ckrackowiz@std.schuler-ag.com Christian Krone krischan@sql.de Christopher Lee chrislee@ri.cmu.edu Chris Torek torek@bsdi.com Cort Dougan cort@cs.nmt.edu Daniel Carroll dan@mesastate.edu Daniele Arena daniele@ripe.net Dave Adams adams@hpesdwa.fc.hp.com Dave Love fx@gnu.org David Carter david@carter.net David Morgan dmorgan@symark.com Derek R. Price derek.price@openavenue.com Didier Desseaux didess@infonie.fr Didier Verna didier@xemacs.org Dietmar P. Schindler schd@mra.man.de Doug Evans dje@canuck.cygnus.com Eli Zaretskii eliz@gnu.org Enrique Robledo Arnuncio enrique.robledo@wanadoo.es Erez Zadok ezk@cs.columbia.edu Eric Backus ericb@lsid.hp.com Eric Mumpower nocturne@mit.edu Eric Sunshine sunshine@sunshineco.com Ezra Peisach epeisach@zif.mit.edu Felix Lee flee@cygnus.com Franc,ois Pinard pinard@iro.umontreal.ca Frank Denis j@jedi.claranet.fr Gareth McCaughan gareth.mccaughan@pobox.com Gary V. Vaughan gvaughan@oranda.demon.co.uk Geir Ove Myhr myhr@stud.fim.ntnu.no Gerrit P. Haase gp@familiehaase.de Giuseppe Guerrini guisguerrini@racine.ra.it Glenn P. Davis davis@unidata.ucar.edu Godmar Back gback@cs.utah.edu Gordon Matzigkeit gord@trick.fig.org Graham Jenkins c714553@vus415.telstra.com.au Greg A. Woods woods@weird.com Gregory Giannoni sand@narguile.org Guido Draheim Guido.Draheim@gmx.de Guido Flohr gufl0000@stud.uni-sb.de Guillermo Gomez gomez@mi.uni-erlangen.de Hans Olsson Hans.Olsson@dna.lth.se Harlan Stenn stenn@whimsy.udel.edu Henk Krus h.krus@cyclone.nl H.J. Lu hjl@gnu.org H. Merijn Brand h.m.brand@hccnet.nl Ian Lance Taylor ian@cygnus.com Ian Redfern Ian.Redfern@logicacmg.com Ilya Zakharevich ilya@Math.Berkeley.EDU James A. Lupo lupoja@feynman.ml.wpafb.af.mil Jason Molenda jsm@cygnus.com Jeff Garzik jgarzik@pobox.com Jeffrey A Law law@cygnus.com Jens Petersen petersen@redhat.com Jeremy Yallop jeremy@yallop.org Jim Blandy jimb@wookumz.gnu.ai.mit.edu Jim Meyering meyering@ascend.com Jiro Takabatake jiro@din.or.jp Johan Danielsson joda@pdc.kth.se John David Anglin dave@hiauly1.hia.nrc.ca John Fortin fortinj@attglobal.net John Interrante interran@uluru.stanford.edu John W. Eaton jwe@bevo.che.wisc.edu Jonathan Kamens jik@kamens.brookline.ma.us J"orn Rennecke amylaar@cygnus.co.uk Joseph S. Myers jsm28@cam.ac.uk Julian Onions j.onions@nexor.co.uk Karl Berry karl@cs.umb.edu Karl Heuer kwzh@gnu.org Kathryn Hargreaves kathryn@deas.harvard.edu Kaveh R. Ghazi ghazi@caip.rutgers.edu Kelly Anderson tgcorp@attglobal.net Ken Pizzini ken@halcyon.com Ken Raeburn raeburn@cygnus.com Kevin Ryde user42@zip.com.au Klee Dienes kdienes@apple.com Koji Arai JCA02266@nifty.ne.jp Kurt D. Zeilenga kurt@openldap.org Larry Jones larry.jones@sdrc.com Larry Schmitt larry@mail.haleakalawebdesigns.com Larry Schwimmer rosebud@cyclone.stanford.edu Lars Hecking lhecking@nmrc.ucc.ie Lars J. Aas larsa@sim.no Marc Espie Marc.Espie@liafa.jussieu.fr Marcus Daniels marcus@sysc.pdx.edu Marcus Thiessel marcus@xemacs.org Mark Elbrecht snowball3@usa.net Mark Kettenis kettenis@gnu.org Markku Savela msa@msa.tte.vtt.fi Markus Oberhumer markus.oberhumer@jk.uni-linz.ac.at Martin Buchholz martin@xemacs.org Martin Frydl martin@systinet.com Martin Mokrejs mmokrejs@natur.cuni.cz Martin Wilck martin@tropos.de Martyn Johnson Martyn.Johnson@cl.cam.ac.uk Matthew D. Langston langston@SLAC.Stanford.EDU Matthias Andree matthias.andree@gmx.de Michael Elizabeth Chastain chastain@cygnus.com Michael Schoene mrs@mlc.de Michael Matz matz@kde.org Mike Hopkirk hops@sco.com Mike Stump mrs@wrs.com Miles Bader miles@gnu.ai.mit.edu Mo DeJong mdejong@cygnus.com Morten Eriksen mortene@sim.no Motoyuki Kasahara m-kasahr@sra.co.jp Nicolas Joly njoly@pasteur.fr Nishio Futoshi fut_nis@d3.dion.ne.jp Noah Elliott elliott@hera.llnl.gov Noah Friedman friedman@gnu.ai.mit.edu Oliver Kiddle opk@zsh.org Olly Betts olly@survex.com Ossama Othman ossama@debian.org Patrick Tullmann tullmann@cs.utah.edu Patrick Welche prlw1@newn.cam.ac.uk Paul Berrevoets paul@swi.com Paul Eggert eggert@twinsun.com Paul Gampe paulg@apnic.net Paul Jarc prj@po.cwru.edu Paul Martinolich martinol@datasync.com Pavel Roskin pavel_roskin@geocities.com Peter Eisentraut peter_e@gmx.net Peter Hendrickson pdh@wiredyne.com Peter Simons simons@research.cys.de Peter Stephenson pws@csr.com Philipp Thomas kthomas@gwdg.de Pontus Skoeld pont@soua.net Rainer Orth ro@TechFak.Uni-Bielefeld.DE Raja R Harinath harinath@cs.umn.edu Ralf Corsepius corsepiu@faw.uni-ulm.de Ralf S. Engelschall rse@engelschall.com Richard Dawe rich@phekda.freeserve.co.uk Richard Stallman rms@gnu.org Robert Lipe robertlipe@usa.net Robert S. Maier rsm@math.arizona.edu Roberto Bagnara bagnara@cs.unipr.it Roland McGrath roland@gnu.org Ruediger Kuhlmann info@ruediger-kuhlmann.de Russ Allbery rra@stanford.edu Ryuji Abe raeva@t3.rim.or.jp Sam Varshavchik mrsam@courier-mta.com Sander Niemeijer niemeijer@science-and-technology.nl Scott Bambrough scottb@corelcomputer.com Scott Stanton stanton@scriptics.com Simon Leinen simon@lia.di.epfl.ch Stephen Gildea filtered@against.spam Steve Chamberlain sac@cygnus.com Steve Huston shuston@riverace.com Steve Robbins steve@nyongwa.montreal.qc.ca Steven G. Johnson stevenj@alum.mit.edu Stu Grossman grossman@cygnus.com Syd Polk spolk@cygnus.com T.E. Dickey dickey@clark.net Theodore Ts'o" tytso@mit.edu Thien-Thi Nguyen ttn@gnu.org Thomas Winder tom@vlsivie.tuwien.ac.at Tim Van Holder tim.van.holder@pandora.be Tom Lane tgl@sss.pgh.pa.us Tom Purcell Tom.Purcell@wang.com Tom Tromey tromey@cygnus.com Tom Yu tlyu@mit.edu Tony Leneis tony@plaza.ds.adp.com Uwe Seimet us@orbacus.com Vance Shipley vances@motivity.ca Ville Karaila karaila@iki.fi Viktor Dukhovni viktor@anaheim.esm.com Vladimir Volovich vvv@vsu.ru Volker Borchert bt@teknon.de Werner Lemberg wl@gnu.org Wilfredo Sanchez wsanchez@apple.com Wolfgang Mueller Wolfgang.Mueller@cui.unige.ch Zack Weinberg zack@codesourcery.com Many people are not named here because we lost track of them. We thank them! Please, help us keep this list up to date. Local Variables: mode: text End: autoconf2.59-2.59+dfsg/AUTHORS0000644000175000017500000000253607340225367015126 0ustar taffittaffitAutoconf was originally written by David MacKenzie, with help from Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, Roland McGrath, Noah Friedman, david d zuhn, and many others. Ben Elliston next took over the maintenance, facing a huge Autoconf backlog that had been piling up since the departure of David. Today, there are no less than five maintainers: Akim Demaille, Paul Eggert, Jim Meyering, Alexandre Oliva, and Tom Tromey, especially helped by Lars J. Aas, Mo DeJong, Steven G. Johnson, Matthew D. Langston, Pavel Roskin, and many others listed in the THANKS file. ----- Copyright 1996, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/Makefile.in0000644000175000017500000004645107752412546016133 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL \ Makefile.am NEWS THANKS TODO configure configure.ac ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__installdirs = $(DESTDIR)$(pkgdatadir) pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgdata_DATA) ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # bin/ and tests/ must be run first, as they build the tests executables # (tests/autom4te etc.), that we happen to use here. SUBDIRS = bin tests . lib config man doc ACLOCAL_AMFLAGS = -I config EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \ BUGS \ GNUmakefile Makefile.maint Makefile.cfg MAINTAINERCLEANFILES = INSTALL pkgdata_DATA = INSTALL AM_MAKEINFOFLAGS = --no-headers --no-validate --no-split automake_cvsweb = \ http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/automake automake_cvsargs = \ 'content-type=text/plain&cvsroot=automake' autom4te_files = \ Autom4te/Configure_ac.pm \ Autom4te/Channels.pm \ Autom4te/FileUtils.pm \ Autom4te/Struct.pm \ Autom4te/XFile.pm all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) uninstall-info-am: install-pkgdataDATA: $(pkgdata_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @list='$(pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \ $(pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \ done uninstall-pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdata_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \ rm -f $(DESTDIR)$(pkgdatadir)/$$f; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @case `sed 15q $(srcdir)/NEWS` in \ *"$(VERSION)"*) : ;; \ *) \ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac $(am__remove_distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/config $(distdir)/tests @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-pkgdataDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-pkgdataDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-recursive ctags \ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ dist-tarZ dist-zip distcheck distclean distclean-generic \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pkgdataDATA install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-pkgdataDATA html: cd doc && $(MAKE) $(AM_MAKEFLAGS) $@ .PHONY: html INSTALL: $(top_srcdir)/doc/install.texi $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -o $(srcdir)/INSTALL \ $(top_srcdir)/doc/install.texi maintainer-check: maintainer-check-tests maintainer-check-tests: cd tests && make maintainer-check autom4te-update: rm -rf Fetchdir > /dev/null 2>&1 mkdir Fetchdir; mkdir Fetchdir/Autom4te (cd Fetchdir && \ $(WGET) $(automake_cvsweb)/lib/Automake/Configure_ac.pm?$(automake_cvsargs) -O Autom4te/Configure_ac.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/Channels.pm?$(automake_cvsargs) -O Autom4te/Channels.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/FileUtils.pm?$(automake_cvsargs) -O Autom4te/FileUtils.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/Struct.pm?$(automake_cvsargs) -O Autom4te/Struct.pm; \ $(WGET) $(automake_cvsweb)/lib/Automake/XFile.pm?$(automake_cvsargs) -O Autom4te/XFile.pm; \ :) perl -pi -e 's/Automake::/Autom4te::/g' Fetchdir/Autom4te/*.pm for file in $(autom4te_files); do \ $(move_if_change) Fetchdir/$$file $(srcdir)/lib/$$file; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/ChangeLog.10000644000175000017500000020641107340225367015765 0ustar taffittaffitThu May 12 15:55:40 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Version 1.11. * autoconf.texi: Document filename restriction on CPP. Thu May 12 10:11:20 1994 David J. MacKenzie (djm@hill.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Treat "./Makefile" like "Makefile". From Karl Berry. Tue May 10 00:08:19 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Set prefix and exec_prefix if they weren't set already. Sat May 7 20:06:59 1994 Noah Friedman (friedman@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL): If using install.sh, add `-c' to INSTALL. Sat May 7 15:36:22 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4 (AC_OUTPUT): If configuring in the source tree, don't end top_srcdir with "/.". * acspecific.m4 (AC_SET_MAKE): Remove temp file. From John Interrante . Fri May 6 15:26:48 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acgeneral.m4 (AC_SIZEOF_TYPE): Fatal error if test program fails. Fri May 6 12:52:19 1994 David J. MacKenzie (djm@gamera.eng.umd.edu) * acgeneral.m4 (AC_OUTPUT): Run "./config.status", not "config.status". From Kevin Gallagher . Fri May 6 00:45:29 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * acspecific.m4 (AC_WAIT3): Sleep in the parent to avoid rm problems on fast machines. From david d zuhn. Thu May 5 12:51:32 1994 David J. MacKenzie (djm@gamera.eng.umd.edu) * Version 1.10. * Makefile.in (install): Don't install INSTALL. (installcheck, install-info): New targets. Mon May 2 16:31:33 1994 David J. MacKenzie (djm@aria.eng.umd.edu) * autoconf.sh, autoheader.sh: If M4 is an absolute file name that no longer exists, use M4=m4. Mon May 2 13:06:06 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * acspecific.m4 (AC_HAVE_POUNDBANG): Quote # in message. From schwab@issan.informatik.uni-dortmund.de (Andreas Schwab). * autoconf.texi: Document config.h.bot. Fix typo in AC_HAVE_POUNDBANG. * acspecific.m4 (AC_PROG_CXX): Look for "cxx" (DEC C++ compiler) too. * autoheader.sh: Fix tr string for Solaris tr. Add config.h.bot if present. From richard@sol.kbsi.com (Richard Henderson). Fri Apr 29 12:53:53 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * acspecific.m4 (AC_PROG_INSTALL): Use install.sh from srcdir or srcdir/.. or srcdir/../.. and never default to cp. Thu Apr 28 12:01:01 1994 David J. MacKenzie (djm@burnout.eng.umd.edu) * acconfig.h: Add HAVE_MMAP entry. * acspecific.m4 (AC_MMAP): If NBPC is not defined, use PAGESIZE. From "Kaveh R. Ghazi" . * acgeneral.m4 (AC_OUTPUT_HEADER): For each file being created, munge a copy of conftest.sed rather than the original. From brook@trillium.botany.utexas.edu (Brook Milligan). Tue Apr 26 00:27:21 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_LANG_C, AC_LANG_CPLUSPLUS): Remove CFLAGS and CXXFLAGS from ac_cpp. Thu Apr 21 19:43:20 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Version 1.9. * autoconf.texi: Document special AC_FIND_XTRA ordering dependencies. * acspecific.m4 (AC_FIND_XTRA): Reorder AC_REQUIREs. * acspecific.m4 (AC_FIND_X): AC_REQUIRE_CPP. * acspecific.m4 (AC_PROG_LEX): Say what we set LEXLIB to. Wed Apr 20 13:17:05 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Allow . in hostnames. Use string comparison on them. (AC_HAVE_LIBRARY): namespace cleanup. * autoconf.texi: Describe changes to AC_FIND_X, AC_FIND_XTRA, and AC_YYTEXT_POINTER. * acconfig.h: Replace DECLARE_YYTEXT with YYTEXT_POINTER. * acgeneral.m4 (AC_PARSEARGS): --gas and --x set with_gas and with_x to yes, not 1. * acspecific.m4 (AC_YYTEXT_POINTER): New macro, replacing AC_DECLARE_YYTEXT. (AC_FIND_X): Assume no X if --without-x was given. (AC_FIND_XTRA): Quotes AC_REQUIRE args. Run uname in a subshell in case it's missing. Put -l options in X_EXTRA_LIBS. Print values of the variables we set if verbose. Tue Apr 19 14:14:25 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Note GNU m4 1.0 bugs. * acspecific.m4 (AC_FIND_X_XMKMF): Set variables correctly. * autoconf.texi: Don't @setchapternewpage odd by default. Mention autoheader AC_SIZEOF_TYPE symbol generation. * acgeneral.m4 (AC_SIZEOF_TYPE): Fix typo. * Makefile.in (install): Don't install aclocal.m4. * autoheader.sh: Generate entries for AC_SIZEOF_TYPE automatically. Mon Apr 18 22:14:59 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_SIZEOF_TYPE): Remove second arg, and generate a symbol name automatically. * autoconf.texi: Document new AC_SIZEOF_TYPE usage. * acspecific.m4 (AC_PROG_INSTALL): Only filter out "install" containing "dspmsg". (AC_FIND_X_XMKMF): Fix variable names to not conflict with grep -v. * autoconf.texi: Various small fixes. * INSTALL: Say configure takes "awhile". Sat Apr 16 15:05:31 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4: Call AC_LANG_C in AC_PREPARE, not AC_INIT. Fri Apr 15 07:00:37 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Version 1.8. * acgeneral.m4: Rename ac_configure_args back to configure_args, since some people have been using it. Thu Apr 14 14:45:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Note that AC_ENABLE and AC_WITH arguments shouldn't contain blanks, for now. Wed Apr 13 17:26:36 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_SET_MAKE): Use $MAKE if defined, else "make". * autoconf.texi: Add missing files to diagram. * acgeneral.m4 (AC_TEST_CPP): Propogate comment about Coherent lossage into configures. Sat Apr 9 17:34:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Unknown option is a fatal error. * acgeneral.m4: Remove ac_ prefix from some variables set by options, for consistency and backward compatibility. Fri Apr 8 13:24:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_XTRA): Don't test for -lsocket on IRIX. From Karl Berry. * acspecific.m4 (AC_FIND_X_XMKMF, AC_FIND_X_DIRECT): Don't override --x-includes and --x-libraries. Check openwin last due to its bugs. * acgeneral.m4: Add --x-includes, --x-libraries options. Document them and --build, --host, --target. * autoconf.texi: Mention --x-includes and --x-libraries. * INSTALL: Mention --x-includes and --x-libraries. Tue Apr 5 12:46:47 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Document top_srcdir substitution. * acspecific.m4 (AC_PROG_INSTALL): Look for install.sh in @top_srcdir@, not $srcdir. * acgeneral.m4 (AC_OUTPUT): AC_SUBST top_srcdir. Set it. Mon Apr 4 20:13:08 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Fix dependencies examples. * Makefile.in: Update configuration dependencies. * acgeneral.m4: Add back --no-create option. Make config.status --recheck use it. * autoheader.sh: Go back to doing move-if-change. (Work around in dependencies by using stamp files.) Thu Mar 31 11:34:50 1994 David J. MacKenzie (djm@hill.gnu.ai.mit.edu) * Makefile.in (autoconf, autoheader, configure): Write to $@.tmp instead of to $@ directly so that after a disk full error, the targets to not exist. Otherwise, a subsequent make could install a corrupt (but not executable) script. From Jim Meyering. Thu Mar 31 08:22:29 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Re-document --with argument. * acgeneral.m4 (AC_PARSEARGS): --with can take an argument again. Wed Mar 30 20:01:57 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Document --disable- options. * acgeneral.m4 (AC_PARSEARGS): Add --disable-FEATURE. * INSTALL: Mention --enable- options. Mon Mar 28 17:43:22 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Make multiple non-option args a fatal error. * acspecific.m4: Change all occurrences of $(MAKE_VAR) to ${MAKE_VAR}. * autoconf.texi (Command Line): New node. Move some descriptions here from General Feature Tests. Describe --without- options. * acgeneral.m4 (AC_PARSEARGS): Rewrite again, using ideas from the GNU libc configure.in. All options that take an argument set shell variables. (AC_COMPILE_CHECK): Add `return' in `int' function. * INSTALL: Fix typo. Sun Mar 27 00:44:07 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_NOTICE): Don't save original args or initialize options here. (AC_PARSEARGS): Do them here. (AC_PREPARE): Save a copy of original args here, if it hasn't been done yet. Sat Mar 26 01:32:40 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4: Omit obsolete options from usage message. Quote args to AC_CHECKING that contain m4 variables. * INSTALL: Note that env can be used to set env vars. * autoconf.texi: Document AC_SET_MAKE. Note that vsprintf and vfprintf come with vprintf. Note that env can be used to set env vars. * acspecific.m4 (AC_SET_MAKE): New macro. (AC_PROG_INSTALL): Find scoinst as a good install program. * acgeneral.m4: Initialize variables set by options. (AC_HAVE_HEADERS): Require cpp. * autoconf.texi: Document AC_ENABLE and @prefix@ and @exec_prefix@ substitutions. * acgeneral.m4: Recognize all the Cygnus configure options; warn about other arguments. Make default value for --with "yes", not "1". AC_SUBST for prefix and exec_prefix. (AC_ENABLE): New macro. Thu Mar 24 18:11:00 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * INSTALL: Describe recently added configure options. * autoconf.texi: Style cleanups. Mention config.h.top. * autoheader.sh: Add ${config_h}.top to the output, if it's present. Thu Mar 24 13:36:19 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.sh: Remove all temp files when exiting. If m4 fails, produce no output and exit with the m4 exit status. * autoconf.texi: Document AC_PREREQ. * acgeneral.m4 (AC_PREREQ): New macro, with some helper macros. Thu Mar 24 01:20:49 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * Makefile.in (acdatadir): New variable based on datadir, giving Autoconf lib files their own subdirectory. Use it instead of datadir. Wed Mar 23 22:41:54 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * autoconf.texi: Change names of nodes that describe invoking configure and config.status to conform to coding standards. Document --version, --help, --silent/--quiet, --verbose options to configure and config.status. * acgeneral.m4 (AC_PARSEARGS): Add --help and --version to configure. Simplify getting option arguments. Complain about impossible host arguments. (AC_OUTPUT): Add --help and --version to config.status. Wed Mar 23 00:16:28 1994 Roland McGrath (roland@mole.gnu.ai.mit.edu) * acgeneral.m4 (AC_CHECKING): Do nothing if $ac_silent is set. (AC_PARSEARGS): Grok -q/--quiet/--silent and set $ac_silent. Tue Mar 22 18:28:30 1994 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * autoconf.texi: Document AC_SIZEOF_TYPE. * acspecific.m4 (AC_INT_16_BITS, AC_LONG_64_BITS): Mark obsolete with advice to use AC_SIZEOF_TYPE instead. * acgeneral.m4 (AC_SIZEOF_TYPE): New macro. Tue Mar 22 08:44:40 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * autoconf.texi: Describe AC_CHECKING et al. * acspecific.m4: Use AC_CHECKING et al. where appropriate. * acgeneral.m4 (AC_CHECKING, AC_VERBOSE, AC_ERROR, AC_WARN): New macros. Use them where appropriate. (AC_LANG_C, AC_LANG_CPLUSPLUS): Fix quoting of ac_cpp. * acspecific.m4 (AC_PROG_CPP): Don't add $CFLAGS to CPP. (AC_PROG_CXXCPP): Don't add $CXXFLAGS to CXXCPP. * acgeneral.m4 (AC_OUTPUT): Don't remove VPATH lines containing colons. From Jim Meyering (meyering@comco.com). (AC_LANG_C): Add CFLAGS to ac_cpp. (AC_LANG_CPLUSPLUS): Add CXXFLAGS to ac_cpp. Sat Mar 19 16:38:03 1994 David J. MacKenzie (djm@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_LANG_RESTORE): Only emit shell code to change the current language if it actually changed. * autoconf.texi: Add info dir entry. Describe new C++ macros and AC_MMAP. (Language Choice): New section. Add another example of dependencies. * acspecific.m4 (AC_PROG_CXX, AC_PROG_CXXCPP, AC_REQUIRE_CPP): New macros based on work by zoo@aggregate.com (david d zuhn). (AC_DECLARE_YYTEXT): Use AC_REQUIRE_CPP. Warn that it's broken. (AC_STDC_HEADERS): Use AC_REQUIRE_CPP. (AC_MMAP): New macro from Mike Haertel and Jim Avera. * acgeneral.m4 (AC_PARSEARGS): Check for missing arguments to options. Recognize --target. Save the original args before modifying them. (AC_INIT): Call AC_LANG_C. (AC_PREPARE): Don't save the original args here (too late). (AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_SAVE, AC_LANG_RESTORE): New macros based on work by zoo@aggregate.com (david d zuhn). (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP): Use AC_REQUIRE_CPP and ac_ext and ac_cpp. * autoheader.sh: Update the file even if it is unchanged, to avoid foiling a Makefile rule that makes it from configure.in. If you let the rule for making config.status from configure create config.h from config.h.in, then an unnecessary update here will not cause unneeded recompilation. Recompilation should only happen if config.h is updated, which won't occur if config.h.in had the same contents, even if its timestamp changed. (Ick.) * Makefile.in (Makefile): Don't depend on config.status, to avoid running config.status too many times. Fri Mar 18 00:43:21 1994 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * autoconf.texi: Document AC_FIND_XTRA. * acgeneral.m4 (AC_OUTPUT): Remove VPATH lines if srcdir=., to work around Sun make bug. From Karl Berry. Rename internal use shell variables to start with "ac_". Trap signal 2 (SIGINT), not signal 3 (SIGQUIT), which means stop without cleaning up. From eggert@twinsun.com (Paul Eggert). * acspecific.m4 (AC_FIND_XTRA): New macro from Karl Berry (karl@cs.umb.edu). (AC_FIND_X, AC_ISC_POSIX): Provide self. (AC_DECLARE_YYTEXT): Move AC_SUBST. Don't quote value of DECLARE_YYTEXT. From Karl Berry. (AC_PROG_CPP): Include $CFLAGS in CPP. Rename internal use shell variables to start with "ac_". * autoconf.sh, autoheader.sh: Trap signal 2 (SIGINT), not signal 3 (SIGQUIT), which means stop without cleaning up. From eggert@twinsun.com (Paul Eggert). * autoconf.texi: Mention shell variable prefixes. * autoconf.texi: Work around RCS substitution in AC_REVISION example. Wed Mar 16 19:55:17 1994 Noah Friedman (friedman@prep.ai.mit.edu) * acgeneral.m4 (compile): Include $LDFLAGS. Thu Mar 10 01:27:20 1994 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): Don't absolutize relative paths. (AC_OUTPUT): For relative paths, prepend to $srcdir as many "../" as the number of subdirectories deep the file being created is. Tue Feb 15 16:02:19 1994 Noah Friedman (friedman@prep.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL): Reject /sbin/install. Sun Feb 13 21:15:45 1994 Noah Friedman (friedman@prep.ai.mit.edu) * autoconf.texi (Setting Variables, Sample configure.in): Replace references to AC_UNISTD_H with AC_HAVE_HEADERS(unistd.h). Thu Feb 10 21:39:43 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_SYS_SIGLIST_DECLARED): New macro. Sat Feb 5 13:35:52 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Check for -lkvm separately after -lutil check. Fri Feb 4 17:17:11 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT_HEADER): Move creation of conftest.sed outside of `for' loop. We need only do this once for all the output files. Fri Jan 21 16:35:00 1994 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL_INSTALL_SH): New macro for INSTALL value to use install.sh. (AC_PROG_INSTALL): Use it. Thu Jan 6 16:22:25 1994 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE): Use AC_QUOTE_SQUOTE instead of AC_DEFINE_QUOTE on AC_VAL. From Bruno Haible . * acgeneral.m4 (AC_DEFINE_UNQUOTED): pushdef/popdef AC_QUOTE_SQUOTE instead of AC_DEFINE_QUOTE. Wed Dec 22 03:51:53 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE): in verbose strings, put AC_DEFINE_QUOTE exprs in double quotes to avoid shell wildcard expansion. * acgeneral.m4 (AC_PROGRAM_PATH, AC_PROGRAMS_PATH): New macros. * autoconf.texi (General Tests): Document them. * configure.in: Use AC_PROGRAMS_PATH to find m4, not AC_PROGRAMS_CHECK. Put `m4' in the list of progs-to-check, since we want the absolute pathname for that too if we can get it. Fri Dec 17 13:44:24 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_ALLOCA): define HAVE_ALLOCA if alloca is present in system libraries. Tue Dec 14 14:53:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): Remove $ac_clean_files in traps. * acspecific.m4 (AC_STDC_HEADERS): Check that free appears in stdlib.h. Fri Dec 10 06:35:25 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL): Don't look for install in `.'. Wed Dec 8 12:10:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X_XMKMF): Redirect stderr to /dev/null in eval'd make pipeline. * acgeneral.m4 (AC_QUOTE_SED): Quote ! as well. Mon Dec 6 23:41:05 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_CPP): Try 'cc -E -traditional-cpp' for NeXT. Thu Dec 2 02:25:39 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): use rm -r to remove conftest* both in exit traps and at start of script. Wed Dec 1 03:22:21 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X_DIRECT): Search for includes and libs in more places. Sun Nov 28 21:57:31 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acgeneral.m4 (AC_NOTICE): Replace "this program" with "this configure script" to disambiguate between configure and the program it is distributed with (which can have different terms). Tue Nov 23 19:41:53 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X_DIRECT): Use the shell variable `x_direct_test_include' to choose the include file to search for. Sat Nov 20 17:58:09 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X_DIRECT): Search for R6 includes & libs in various places. Look for /usr/athena/include & /usr/athena/lib. Make AC_HAVE_LIBRARY check for the library specified by the shell variable `x_direct_test_library', rather than hardcoding Xt (to which the shell variable now defaults). Thu Nov 18 18:17:21 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT_HEADER): Use ! instead of @ as the sed substitution separator. * install.sh: New file. * Makefile.in (DISTFILES): Add it. * acspecific.m4 (AC_PROG_INSTALL): Use it as the default instead of cp, if it's there. Sat Nov 13 12:24:57 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Extend that last change to also happen for .C, .cc, and .m (objc) files. Wed Nov 10 09:26:35 1993 Noah Friedman (friedman@gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): When substituting .c or .h files, put autoconf-added comments in '/* ... */'. Mon Nov 8 16:22:48 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_NOTICE): Put autoconf version number in configure. Fri Nov 5 23:31:28 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X_XMKMF): properly quote `acfindx' rule. Fri Oct 29 21:46:57 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (HAVE_LONG_DOUBLE): Add code to detect Stardent Vistra lossage. From Kaveh R. Ghazi (ghazi@noc.rutgers.edu). Tue Oct 26 15:24:33 1993 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * Version 1.7. Tue Oct 19 23:49:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_TEST_PROGRAM): Don't remove conftest* before running $2 or $3 or $4; just once at the end. Mon Oct 18 01:38:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): Echo a newline into confdefs.h so it is never empty. Fri Oct 15 18:49:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_CONST): Added test of trivial use for broken Ultrix-32 V3.1 Rev 9 vcc. Fri Oct 15 15:44:39 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_OBSOLETE): New macro. * acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H): Call it. * acspecific.m4 (AC_LONG_FILE_NAMES): Try to create files in ${prefix}/lib and ${exec_prefix}/lib instead of ${prefix} and ${exec_prefix}; they are more likely to be writable. * Makefile.in (clean): Remove *.ma and *.mas, the macro index files. Tue Oct 12 16:02:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_RETSIGTYPE): AC_PROVIDE self. Mon Oct 11 19:09:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * Makefile.in (editsh): Obfuscate @M4@ and @datadir@ references so configure doesn't edit them. Sun Oct 10 14:01:35 1993 Jim Meyering (meyering@comco.com) * autoconf.sh (--help): Exit successfully. Sat Oct 9 08:29:15 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * Version 1.6. * acconfig.h (inline): New entry. * acspecific.m4 (AC_DIR_HEADER_CHECK): Don't call opendir, in case the needed libraries (e.g., -ldir on Xenix) aren't in LIBS yet. From Jim Meyering (meyering@comco.com). * acspecific.m4 (AC_PROG_LEX): Fix typo. * acgeneral.m4 (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP): Remove any temporary files before doing the actions, in case they're nested tests. From gray@antaire.com (Gray Watson). * configure.in: Check for GNU m4 under several names. * Makefile.in: Use that value. From Franc,ois Pinard. * acspecific.m4 (AC_STRUCT_TM): Use a member of struct tm, to make sure the compiler complains if it's not defined. From Bruno Haible (haible@ma2s2.mathematik.uni-karlsruhe.de). * acspecific.m4 (AC_FIND_X_XMKMF): If libX11.a isn't in USRLIBDIR, check in LIBDIR. Filter out any make verbose messages. Tue Oct 05 19:21:29 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_LONG_DOUBLE): Announce that this feature is being checked even if the test is simply whether $CC is gcc. Tue Oct 5 14:23:28 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh: Produce HAVE_LIBfoo for AC_HAVE_LIBRARY. Sun Oct 3 15:41:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Write assignment for `extrasub'; in sed cmds, write "$extrasub" so configure.in can set it to do sed frobs. Take second arg and write it to config.status before `exit 0'. * acspecific.m4 (AC_CONST): Say `checking for lack of working const'. That is precisely accurate. Wed Sep 22 15:47:50 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4: If not using GNU m4, abort. * acgeneral.m4 (AC_PREPARE): Lose if we're not in the srcdir, not if we're in it. But disable the check for now. Mon Sep 20 15:32:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): Check for $srcdir being configured, diagnose and lose. * acgeneral.m4 (AC_QUOTE_SED): Quote @ and %. * acgeneral.m4 (AC_OUTPUT): Say "$file is unchanged" when it is. Sat Sep 18 14:32:04 1993 Ian Lance Taylor (ian@airs.com) * acgeneral.m4: Substitute for CONFIG_FILES and CONFIG_HEADERS before using them, in case they have multiple values. Fri Sep 17 14:40:20 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_WAIT3): wait3 works if ru_stime is nonzero, too. Thu Sep 16 15:39:53 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X_XMKMF): Code moved from AC_FIND_X. (AC_FIND_X_DIRECT): New function, derived from code by Karl Berry and Rob Savoye. (AC_FIND_X): Call them. Wed Sep 15 19:06:46 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): Remove confdefs* on exit with trap 0. (AC_OUTPUT): Don't bother removing it. * acgeneral.m4: Remove --no-create option; not useful. Mon Sep 13 21:54:46 1993 Paul Eggert (eggert@twinsun.com) * autoheader.sh: Rename the temporary output to the real output if their contents differ, not if their contents are identical. This fixes bug introduced in Aug 30 change. Mon Sep 13 16:50:30 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Run config.status with CONFIG_SHELL if defined. Same for configure run from config.status. Rename gen_files to CONFIG_FILES and gen_config to CONFIG_HEADERS. * acgeneral.m4 (AC_PREPARE): Remove confdefs* in trap. Fri Sep 10 00:29:20 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_LONG_FILE_NAMES): Test /var/tmp as well. In loop, skip past nonexistent dirs. * acspecific.m4 (AC_CONST): Say "working", not "broken". We are checking for a working const as opposed to a broken or absent const, not for a broken const as opposed to a working one. Thu Sep 9 09:25:49 1993 Jim Meyering (meyering@comco.com) * acspecific.m4, acconfig.h (AC_LONG_64_BITS): New macro. Wed Sep 1 18:54:12 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PROGRAM_CHECK): Use && instead of test -a. Tue Aug 31 19:21:35 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT_HEADER): Support generating multiple .h files. From gray@antaire.com (Gray Watson). * acspecific.m4 (AC_ALLOCA): If using alloca.o, define C_ALLOCA. * acgeneral.m4 (compile, AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_COMPILE_CHECK, AC_TEST_PROGRAM, AC_TEST_CPP): Remove $DEFS from cc and cpp command lines; include "confdefs.h" in test files. (AC_DEFINE): Append a #define to confdefs.h. Reduce duplicated code by introducing a temp variable, AC_VAL. Mon Aug 30 17:36:54 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh: Don't write output if it is the same as output file. Wed Aug 25 14:14:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_VFORK): Check for SunOS 5.2 bug with ignoring signal in parent before vfork. From eggert. Fri Aug 20 10:14:42 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Support giving values to --with options. Go back to using sed for invalid test, but without using '*' in the regex. Thu Aug 19 14:53:29 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_LONG_FILE_NAMES): eval the args. * acgeneral.m4 (AC_PARSEARGS): Use case instead of sed and test to detect invalid package names. Remove =value from --with options until we support it. Wed Aug 11 18:52:41 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X): Don't set x_includes if it's /usr/include or x_libraries if it's /lib or /usr/lib. Wed Aug 11 13:00:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_LONG_FILE_NAMES): If we cannot write $dir, echo a warning msg and continue the loop to skip that directory. * acgeneral.m4 (AC_REVISION): Also eat double quotes. Thu Aug 5 14:55:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acconfig.h: Add TIME_WITH_SYS_TIME. Mon Aug 2 14:55:16 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_DECLARE_YYTEXT): \-escape "s in rhs of AC_DEFINE_UNQUOTED. Remove gratuitous second arg to AC_SUBST. Sun Aug 1 19:13:08 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Define HAVE_GETLOADAVG if we find one and don't use our own getloadavg.c. * acconfig.h: Add HAVE_GETLOADAVG. Sat Jul 31 17:28:48 1993 Karl Berry (karl@cs.umb.edu) * acspecific.m4 (AC_PROG_INSTALL): Report results under -v. Fri Jul 30 18:08:30 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh (syms, headers, funcs, libs): Run values through sort|uniq to remove duplicates. Wed Jul 28 00:02:34 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * Makefile.in (config.status): Run config.status --recheck, not configure. (install): Remove refs to install-info until it's released, because people are getting confused. * acgeneral.m4 (AC_OUTPUT): For config.status --recheck, echo the configure command line that we run. * acspecific.m4 (AC_PROG_FLEX): Use AC_HAVE_LIBRARY. Mon Jul 26 19:11:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Check that both -lutil and -lkvm exist before choosing them in hopes they will define getloadavg. * autoheader.sh (frob): Put $2 and $3 in the expansion of AC_HAVE_LIBRARY, so AC_DEFINE there is noticed. Mon Jul 26 14:21:33 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (INT_16_BITS): Check the obvious way, so it doesn't pick up machines with 64 bit longs. Mon Jul 26 14:01:38 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Check for -lelf with AC_HAVE_LIBRARY instead of checking for with AC_HEADER_CHECK. Mon Jul 26 13:58:39 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_SCO_INTL, AC_IRIX_SUN, AC_DYNIX_SEQ): Use AC_HAVE_LIBRARY. Mon Jul 26 13:55:17 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh (eval frob): Restore hairy sed use; we need it to handle multi-line macro invocations. Mon Jul 26 00:50:43 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_FIND_X): Quote the Imakefile. Sun Jul 25 08:17:11 1993 Jim Meyering (meyering@comco.com) * acconfig.h (CRAY_STACKSEG_END): New #undef. Thu Jul 22 20:26:12 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * Version 1.5. * acspecific.m4 (AC_FIND_X): Let make substitute any variables in INCROOT and USRLIBDIR, instead of using sed. From wojo@veritas.com (Jack Woychowski). * acgeneral.m4 (AC_DEFINE): When printing value verbosely, use double quotes and AC_DEFINE_QUOTE, like we do when assigning the value, so shell variables get expanded the same way. * acgeneral.m4 (AC_REVISION): New macro. From wollman@uvm-gen.EMBA.UVM.EDU (Garrett Wollman). * acgeneral.m4 (AC_DEFINE): Add newline before open brace. Thu Jul 22 17:07:15 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_STAT_MACROS_BROKEN): New macro. * acconfig.h (STAT_MACROS_BROKEN): New #undef. Wed Jul 21 15:44:32 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_DECLARE_YYTEXT): Use AC_DEFINE_UNQUOTED so shell var is replaced in rhs. Wed Jul 21 13:31:38 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acconfig.h (size_t, mode_t, off_t): Added. * acspecific.m4 (AC_OFF_T): New macro. Tue Jul 20 15:39:44 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * autoheader.sh: Put header-file.in in comment at top. * acconfig.h (NDIR): Added. Mon Jul 19 22:10:49 1993 David J. MacKenzie (djm@churchy.gnu.ai.mit.edu) * Makefile.in (info, dvi): New targets. Sun Jul 18 22:36:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh (frob): Use `#' as the first line of each definition. (eval frob): Totally simplify sed use to just handle "^@@@.*@@@$". Wed Jul 14 22:44:25 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acconfig.h: Restore blank lines between paragraphs. * autoheader.sh (libs): New variable and frob to set it from AC_HAVE_LIBRARY uses. Produce #undef HAVE_* for each $libs. Tue Jul 13 19:03:46 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acconfig.h: Sort the entries, like the comment says. * acspecific.m4 (AC_GETLOADAVG): Only check for the AIX library once, looking in both local and system dirs. Consolidate SVR4 and Solaris cases. Mon Jul 12 20:33:36 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): If we find sys/dg_sys_info.h, do AC_HAVE_LIBRARY on -ldgc. Sun Jul 11 00:43:51 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): BSD library is -lutil, not -lutils, and requires -lkvm too. Check for local AIX library using AC_HAVE_LIBRARY, not AC_COMPILE_CHECK. Un-nest some conditionals. Stop checking once we've found a way to get getloadavg. Thu Jul 8 20:21:28 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * Makefile.in: Remove rules for making *.conf; make Autoconf's configure script semi-normally. Wed Jul 7 14:37:35 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * autoheader.sh (--help): Print help message to stdout and exit 0. (--version): Exit after printing version number. * autoconf.sh (--version): Exit after printing version number. * acspecific.m4 (AC_LONG_DOUBLE): Make sure that long double isn't smaller than double, as in Ultrix 4.[23] cc. * acgeneral.m4 (AC_REPLACE_FUNCS): Include ctype.h in the test program to get stubs. * acspecific.m4 (AC_FIND_X): New macro. Tue Jul 6 19:15:17 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Try ls -L first, in case /dev/kmem is a symlink (as on Solaris). Wed Jun 30 22:08:22 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_MINUS_C_MINUS_O): Remove spurious `then'. Fri Jun 25 23:16:42 1993 Paul Eggert (eggert@twinsun.com) * acspecific.m4 (AC_CONST): Replace `p = ' with `ccp = '; the former wasn't ANSI C, and was causing working compilers to be rejected. Fri Jun 25 13:26:34 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_LONG_FILE_NAMES): Redirect rm's stderr to /dev/null. Thu Jun 24 15:58:04 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * autoconf.sh, autoheader.sh, acgeneral.m4 (AC_PREPARE): Undo change of Jun 16 1993. Only set `LANG' and `LC_ALL' to "C" if already set. Sat Jun 19 00:01:51 1993 Jim Meyering (meyering@comco.com) * acgeneral.m4: Undefine m4's `format' builtin. * acspecific.m4 (AC_HAVE_POUNDBANG): Make conftest executable, but not necessarily writable by group or other. Thu Jun 17 21:10:33 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_CPP): Put double quotes around ${CC-cc}, not single quotes. If --verbose option given, say what CPP is being set to. Wed Jun 16 17:50:00 1993 Jim Blandy (jimb@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_CPP): Make sure that `cc -E` doesn't run the program through the C compiler too. Bob Olson says it does on the NeXT. Wed Jun 16 16:17:05 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * autoconf.sh, autoheader.sh, acgeneral.m4 (AC_PREPARE): Always set `LANG' and `LC_ALL' environment variables to `C'. Fri Jun 11 14:29:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_MINUS_C_MINUS_O): Test that cc works at all, and only test it for -c -o if it does. Tue Jun 8 01:47:22 1993 Paul Eggert (eggert@twinsun.com) * acgeneral.m4 (AC_OUTPUT): The line DEFS="`echo \"$DEFS\" | sed 's%[&\\\]%\\\&%g'`" doesn't work in some shells, which don't allow nesting \"\" inside `` inside "", and which don't unescape \\\& in the expected (?) way. Also, some versions of echo interpret backslashes inside $DEFS. Put $DEFS into a temporary file to avoid these portability minefields. Mon Jun 7 20:11:50 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): In setting KMEM_GROUP, use new sed magic from friedman which should win with both meanings of ls -lg. Mon Jun 7 06:48:49 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * Makefile.in (dist): Change gzipped tar file extension to `.gz'. Use explicit --gzip option to tar to make sure tar uses the right compression program (or else exits from failure to understand the option). * acgeneral.m4 (AC_OUTPUT): Don't split sed expr for exec_prefix across two lines, since not all versions of sed understand that. * acspecific.m4 (AC_HAVE_POUNDBANG): Complete rewrite which doesn't depend on csh. Tue Jun 1 03:06:28 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * Version 1.4.1 (not announced to the general public, but a snapshot was put on the June '93 GNU CDROM). * Makefile.in (dist): If ln fails (e.g. because of cross-device links), mention on stdout that file is being copied. * acgeneral.m4 (AC_PREPARE): Use `[$]*' in assignment to configure_args to get shell positional args, rather than m4 args to AC_PREPARE. (AC_OUTPUT): Use `configure_args' in config.status when invoked with --recheck, rather than $*. Mon May 31 13:12:56 1993 Paul Eggert (eggert@twinsun.com) * acspecific.m4 (AC_LONG_FILE_NAMES): rm $dir/conftest*, not conftest*. Mon May 31 04:18:18 1993 Roland McGrath (friedman@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_HAVE_LIBRARY): Quote libname in define. Sun May 30 19:52:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_SETVBUF_REVERSED): Pass (char *) main to setvbuf instead of zero. Thu May 27 20:30:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREPARE): Save $* in shell var `configure_args'. (AC_OUTPUT): Use $configure_args in place of $*. Wed May 26 16:19:51 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * autoconf.texi (AC_PROG_INSTALL): Doc fix. (Automatic Remaking): Put code fragment in @example ... @end example. Mon May 24 15:46:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh (frob): Redefine AC_CONFIG_HEADER to set shell variable `config_h'. (config_h): New variable, initialize to "config.h" before frobbing. (final output): Write ${config_h}.in. Sat May 22 17:45:19 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * Version 1.4 released. Thu May 20 20:25:45 1993 Jim Blandy (jimb@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_IDENTITY): New function. (AC_DEFINE_UNQUOTED): Use it to fix this; due to a misunderstanding of m4, this was using its first argument as the definition. Thu May 20 09:21:55 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_ALLOCA) [find_stack_direction]: Return the value from the recursive call. If it worked before, it was by luck. From Bruno Haible . Tue May 18 23:40:21 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_STDC_HEADERS): Require AC_PROG_CPP. Mon May 17 18:01:09 1993 Karl Berry (karl@hal.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Use variables gen_files and gen_config in the loop that generates the output (Make)files, instead of hardwiring the filenames. Sat May 15 17:23:19 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * autoconf.sh: Accept `-' to mean read stdin as input. * autoheader.sh: Likewise. Fri May 14 12:41:02 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * autoheader.sh, acspecific.m4 (AC_PREPARE): If `LANG' environment variable is set, reset its value to `C'. This is so `tr [...]' works more portably. Thu May 13 22:56:20 1993 Paul Eggert (eggert@twinsun.com) * acspecific.m4 (VOID_CLOSEDIR): Test closedir instead of assuming that it works. E.g. dynix closedir yields garbage, but has no prototype. Presumably Xenix closedir had the same problem, so stop special-casing it. Wed May 12 20:25:36 1993 Jim Meyering (meyering@comco.com) * acconfig.h: Add HAVE_LONG_DOUBLE. Wed May 12 15:07:36 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE_UNQUOTED): New macro. * acgeneral.m4 (AC_FUNC_CHECK): Include ctype.h instead of stdio.h. We want it only to define __stub_* in glibc. Using stdio.h lost when it contained a conflicting prototype for $1; ctype.h has fewer prototypes. * acconfig.h: Add GETGROUPS_T. * acspecific.m4 (AC_PROG_RANLIB): Use : instead of @: for no-op. Some braindead make does bizarre magical things with @ in variables. Mon May 10 14:24:27 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_HAVE_POUNDBANG): New feature. * acgeneral.m4 (AC_OUTPUT): Add more backslashes to character class in DEFS filter (sigh). Sun May 9 14:04:31 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE_QUOTE): No AC_QUOTE_SED (was innermost). (AC_HEADER_EGREP, AC_PROGRAM_EGREP, AC_TEST_CPP): Put a \ before $DEFS in string to be evalled. (AC_OUTPUT): Run DEFS through a sed filter that quotes things in it from sed (woo woo!) before writing it into config.status. * acspecific.m4 (AC_ALLOCA): Use AC_PROGRAM_EGREP to test for [CRAY && !CRAY2], instead of AC_TEST_PROGRAM. No need to run a program for this. * acgeneral.m4 (AC_PROGRAM_CHECK): Extract the first word of $2 when looking for it in PATH, so it can be a program name with args. Omit default assignment if $4 is empty. Only write verbose msg if $1 was set nonempty. * acspecific.m4 (AC_PROG_YACC): Pass 'bison -y' (quoted like that) in list to AC_PROGRAMS_CHECK. Don't test for bison later to add -y flag. Sat May 8 00:23:58 1993 Jim Meyering (meyering@comco.com) * acgeneral.m4 (AC_REPLACE_FUNCS): Add a trailing newline in code for AC_COMPILE_CHECK. Otherwise it got spurious failures. * acspecific.m4 (TIME_WITH_SYS_TIME): New macro. * Makefile.in (dist): Depend on Makefile. Use gzip instead of compress. Link files individually instead of en masse; if a link fails, use `cp -f' on the losing file. * acspecific.m4 (AC_ALLOCA): Define CRAY_STACKSEG_END (the name of a function used in alloca.c) for CRAY-1, CRAY X-MP, and CRAY Y-MP. Fri May 7 15:56:26 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Check for mach/mach.h, but don't disable nlist checks if found. Fri May 7 04:59:25 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL): Don't look for `install' in /usr/ucb. Thu May 6 20:41:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_FUNC_CHECK): The test program should choke on #ifdef __stub___$1 as well. (AC_REPLACE_FUNCS): Make the test program choke on stubs. Wed May 5 20:43:13 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoconf.sh ($infile existence check): Fixed test for nonemptiness of $print_version to not always be true. Wed May 5 17:22:42 1993 David J. MacKenzie (djm@wookumz.gnu.ai.mit.edu) * acgeneral.m4 (AC_PREFIX, AC_PROGRAM_CHECK), acspecific.m4 (AC_PROG_INSTALL): If IFS wasn't set initially, give it a normal default value. Happens on LynxOS (x86), says Pete Klammer . Wed May 5 13:22:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4: Undefine the `shift' builtin. * acspecific.m4 (AC_PROG_YACC): Use AC_PROGRAMS_CHECK to check for both bison and yacc, instead of two AC_PROGRAM_CHECK uses. * autoheader.sh ($# -eq 0): Set var $tmpout to name of temp file, send stdout there instead of config.h.in. (just before exit): If $# -eq 0, then move $tmpout to config.h.in if $status -eq 0, or remove $tmpout otherwise. * acspecific.m4 (AC_STRCOLL): Rewritten to use a test program that verifies that `strcoll' does vaguely reasonable ordering. Tue May 4 19:59:00 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_LONG_DOUBLE): Don't explicitely echo `checking for long double'. Mon May 3 22:04:35 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_GETGROUPS_T): New macro. Sat May 1 22:37:55 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_LONG_DOUBLE): New macro. Wed Apr 28 15:52:42 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PROGRAM_CHECK): Write msg under --verbose. Thu Apr 22 18:24:40 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_FUNC_CHECK): Remove spurious `#endif' line at end. * acgeneral.m4 (AC_WITH): Fix reversed args to patsubst. Test $with_FOO, not $FOO. Wed Apr 21 18:14:19 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_QUOTE_TOKEN): New macro. (AC_DEFINE_QUOTE): Use it. Tue Apr 20 18:02:46 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_DECLARE_YYTEXT): Guess name of lex output file and do AC_SUBST of `LEX_OUTPUT_ROOT'. Add `dnl' after calling some autoconf macros. Mon Apr 19 15:46:24 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_MINUS_C_MINUS_O): Do each compile a second time after testing for the existence of the output. Some compilers refuse to overwrite an existing .o file with -o, though they will create one. * acspecific.m4 (AC_DECLARE_YYTEXT): Changed lex input to two lines of "%%", not just one. Sat Apr 17 17:26:12 1993 Jim Meyering (meyering@comco.com) * acgeneral.m4 (AC_COMPILE_CHECK): Don't print `checking for ...' message if first argument is empty. Sat Apr 17 01:18:41 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_PID_T): provide self. (AC_VFORK): Require AC_PID_T. Fri Apr 16 11:57:35 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_PROGRAMS_CHECK): Take optional third arg; if given, use it as the default value. Thu Apr 15 16:43:45 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_REPLACE_FUNCS): Print a message under --verbose. * acgeneral.m4 (AC_HAVE_LIBRARY): Use m4's patsubst and translit instead of running sed and tr at runtime. * acconfig.h: Add STACK_DIRECTION. Wed Apr 14 17:08:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_ALLOCA): If we chose alloca.c, run a test program to define STACK_DIRECTION. Mon Apr 5 19:02:52 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_LONG_FILE_NAMES): Put test inside a for loop on several directories: . /tmp $prefix $exec_prefix. Define HAVE_LONG_FILE_NAMES iff long names win in all those directories. Sun Apr 4 18:38:23 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * Makefile.in (%.info): Removed pattern rule. (autoconf.info, standards.info): New rules. * autoconf.sh (version_only): New variable, set nonempty for `autoconf --version' with no input file. (output writing): No output if $version_only is set. Wed Mar 31 17:33:57 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_CONST): Uncomment and fix second AIX test. Wed Mar 31 16:58:12 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_CONST): Rewrite first AIX XL C 1.02.0.0 test. Comment out bogosity in second AIX test. Wed Mar 31 12:45:59 1993 Jim Meyering (meyering@comco.com) * acgeneral.m4 (AC_DEFINE): Put single quotes around definition that is echoed with --verbose. AC_DEFINE(MVDIR, "$(libdir)/mvdir") was generating losing code. Mon Mar 29 15:44:24 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_STDC_HEADERS): Add a missing pair of [quotes]. Mon Mar 29 14:54:00 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_DECLARE_YYTEXT): Change sed regexp so it won't match other identifiers beginning with `yytext'. Sat Mar 27 00:11:16 1993 Paul Eggert (eggert@twinsun.com) * acspecific.m4 (AC_CONST): Detect broken AIX XL C 1.2.0.0 compiler. Thu Mar 25 19:54:50 1993 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_CONST): Remove single quotes from the C program; they produce shell syntax errors. * acgeneral.m4 (AC_DEFINE): Add a newline after "}" to prevent commands following on the same line of configure.in from generating shell syntax errors. * acgeneral.m4 (AC_COMPILE_CHECK): Use explicit return types to avoid warnings. (AC_TEST_CPP): Add parens to force redirection order. (AC_OUTPUT): Allow hostname to return bogus exit status. From Jean-loup Gailly . Mon Mar 22 16:53:01 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoconf.sh: Use $M4, not m4 explicitly. (M4): If unset in env, initialize to @m4@. * autoheader.sh: Likewise. * Makefile.in (M4): Define new variable. (autoconf.conf, %.conf): Use it. (editsh): New variable: sed command to replace @datadir@; also replace @M4@ with $(M4). (autoconf, autoheader): Use $(editsh) instead of explicit sed command. Mon Mar 22 13:08:10 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_CONST): IBM's /bin/cc under AIX-3.2 on an rs6000 rejects attempts to modify *any* member of a struct that has a member declared like `const int *ap[2]'. Wed Mar 17 18:08:30 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * autoconf.sh, autoheader.sh (MACRODIR): Variable renamed to AC_MACRODIR. Don't initialize it at runtime if it is already set in the environment. (MACROFILES): Don't set until after options are processed. (print_version): New temp variable. * autoconf.sh, autoheader.sh: Rewrote argument parsing. Added `-m', `--macrodir', `-h', `--help', and `--' options. Updated usage string. * autoconf.texi: Documented --macrodir option and its effects for both scripts. Tue Mar 16 09:10:48 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_CONST): Sun's SC1.0 ANSI compiler (acc) won't increment a `const int *' pointer declared through a typedef. Mon Mar 15 16:08:42 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Grok `--verbose' flag; set verbose=yes. (AC_DEFINE): Only echo "defining $1" if $verbose is set. Sun Mar 14 18:19:21 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL): Choose `installbsd' if we find it, in preference to `install'. * acspecific.m4 (AC_CONST): Add a check for `const int *foo' not allowing modification of FOO (not *FOO). Fri Mar 12 15:27:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT_HEADER): Remove conftest.sh before creating it. Thu Mar 11 12:57:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE): Surround defn with { and }. * acgeneral.m4 (AC_OUTPUT_HEADER): Split up $SEDDEFS into smaller chunks, since some shells can't handle large here documents. We write several commands in config.status to create conftest.sed in pieces. Mon Mar 8 14:40:53 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_WITH): Don't echo anything. Use the m4 patsubst fn instead of a run-time sed invocation to massage $1. * acspecific.m4 (AC_DIR_HEADER_CHECK): #include before the header we are testing. * acgeneral.m4 (AC_DEFINE): If $2 is empty, echo "defining $1 to be empty", rather than "defining $1 to be ". * acspecific.m4 (AC_DIR_HEADER_CHECK): New; subr of AC_DIR_HEADER. (AC_DIR_HEADER): Use it to test for each possible header file. Tue Mar 2 01:06:25 1993 Noah Friedman (friedman@nutrimat.gnu.ai.mit.edu) * autoheader.sh: Don't use /p1/,/p2/ construct with sed---it's not portable. Handle broken AIX sed that strips \n from hold space when it shouldn't. From Jun Hamano . Tue Mar 02 00:08:39 1993 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_CONST): Fix typo that caused spurious lossage with /bin/cc from Irix-4. From Karl Berry. Fri Feb 26 17:14:58 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_CONST): Add bizarre case that loses on SCO 3.2v4. Mon Feb 22 13:02:27 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_QUOTE_HERE, AC_QUOTE_SED): Change the quote chars to { and } instead of nothing. Then use {} (empty quotes) to separate the patsubst forms from the following dnl. Otherwise the result of patsubst is pasted together with dnl and the result is seen as a single token. * acspecific.m4 (AC_MINUS_C_MINUS_O): Print msg saying what we are doing before we do it. * acgeneral.m4 (AC_PREFIX): Print out the choice made. (AC_DEFINE): Print out the definition being done. * acgeneral.m4 (AC_DEFINE_QUOTE): Add dnl at end of line. * acspecific.m4 (AC_GETLOADAVG): Do changequote around listing of /dev/kmem and sed frobbing which needs to use [ and ]. Sun Feb 21 13:57:55 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh: Use brackets in tr range args. * acspecific.m4 (AC_SETVBUF_REVERSED): Make the test fail if setvbuf returns nonzero. * acspecific.m4 (AC_GETLOADAVG): If we need to install setgid, figure out what group owns /dev/kmem, and set KMEM_GROUP to that. * acspecific.m4 (AC_MINUS_C_MINUS_O): Test plain `cc' after testing $CC. We want to make sure both compilers grok -c -o. Thu Feb 18 18:05:14 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_QUOTE_{DQUOTE,SQUOTE,HERE,SED}): New macros. (AC_DEFINE_{QUOTE,SEDQUOTE}): New macros; subrs of AC_DEFINE. (AC_DEFINE): Use them to quote $2. Wed Feb 17 14:49:14 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_TIMEZONE): Fixed quoting in tzname check. changequote inside quotes lost. Mon Feb 8 14:22:11 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acconfig.h (_ALL_SOURCE): Use #ifndef; AIX compiler way too dumb. Sun Jan 31 16:39:46 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_TIMEZONE): Put newlines before `#include ...' in $defs value. Thu Jan 28 18:06:53 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acconfig.h (_ALL_SOURCE): Use "!defined (_ALL_SOURCE) || _ALL_SOURCE == 0" rather than "!_ALL_SOURCE", which bombs on the AIX compiler. Mon Jan 25 12:09:43 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acconfig.h (HAVE_UNION_WAIT, SYS_SIGLIST_DECLARED): New #undef's. * acconfig.h (_ALL_SOURCE): Surround with #if !_ALL_SOURCE. Fri Jan 22 15:08:33 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): If /usr/local/lib/libgetloadavg.a exists, add -L/usr/local/lib to LDFLAGS. Fri Jan 22 12:49:11 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT_HEADER): Only comment out the #undef NAME part of the line, to avoid causing errors from existing comments. Thu Jan 21 14:50:20 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_HAVE_LIBRARY): Use $libname in "checking for" message, not $1, to avoid "checking for -l-lfoo". * acgeneral.m4 (AC_PREPARE): In compile defn, include $CFLAGS. * acgeneral.m4 (AC_OUTPUT): Broke AC_CONFIG_NAME writing out into: (AC_OUTPUT_HEADER): New macro broken out of AC_OUTPUT. Add to conftest.sed a new sed command to turn #undef's into comments. * acgeneral.m4 (AC_OUTPUT): Use new shell variable, $maxsedlines, for max number of lines to feed to one sed invocation. Lower this limit to 20; UTekV 3.2e can't cope with 40. Tue Jan 19 13:21:02 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * Version 1.3. Fri Jan 15 16:28:18 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_CONFIG_HEADER, AC_HEADER_EGREP, AC_TEST_PROGRAM): Make DEFS always contain -D commands, not C code. Thu Jan 14 17:05:17 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Check for -lkvm; don't assume it. Thu Jan 14 16:46:41 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh (selecting $syms from $TEMPLATES): Use sed to replace lines containing only blanks with empty lines. Thu Jan 14 15:15:31 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_MODE_T): New macro. * acgeneral.m4 (AC_OUTPUT): Check for grep -c returning nothing (AIX 3.1) as well as returning 0. Wed Jan 13 16:05:59 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_FUNC_CHECK): Add missing #endif. * acgeneral.m4 (AC_OUTPUT): Use sed, not basename. From Francois Pinard. Wed Jan 13 15:49:18 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Set exec_prefix to ${prefix}, not $(prefix); it now works in both makefiles and shell scripts. Wed Jan 13 15:29:04 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * autoheader.sh: If input is empty, don't print all of acconfig.h. From Francois Pinard. * acgeneral.m4 (AC_OUTPUT): Have config.status check all of its args for validity. Tue Jan 12 11:11:45 1993 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Preserve whitespace around = in prefix and exec_prefix assignments. * acspecific.m4 (AC_GETLOADAVG): Values for getloadavg_missing were reversed. Fri Jan 8 18:45:59 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Make config.status not complain with usage msg when given no args. * acgeneral.m4 (AC_HAVE_LIBRARY): Say "checking for -lfoo", not just "checking for foo". * acgeneral.m4 (AC_HAVE_LIBRARY): Remove excess quoting around $2 and $3. * acspecific.m4 (AC_GETLOADAVG): Check for getloadavg library, both a normally installed one, and one in /usr/local/lib. After figuring out params for getloadavg.c, figure out whether it defined LDAV_PRIVILEGED, and if so, set NEED_SETGID to true, and define GETLOADAVG_PRIVILEGED. * acconfig.h: Added GETLOADAVG_PRIVILEGED. Fri Jan 8 16:16:35 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE, AC_OUTPUT): Restore the third sed string. * acgeneral.m4 (AC_FUNC_CHECK): Use __stub_funcname. * autoheader.sh: Use Autoconf version number. * acgeneral.m4 (AC_OUTPUT): Diagnose usage errors for config.status. Use grep -c to count nonempty lines instead of test -s. * acspecific.m4 (AC_GETLOADAVG): Use AC_HAVE_LIBRARY. Wed Jan 6 19:54:47 1993 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * autoheader.sh (coverage check): Use $TEMPLATES in error msg, not hard-wired "config.h". Wed Jan 6 18:24:41 1993 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): If AC_CONFIG_NAME, change @DEFS@ to -DHAVE_CONFIG_H in Makefiles etc. Idea from Roland McGrath. * acgeneral.m4 (AC_FUNC_CHECK): If __STUB_funcname is defined, assume the function isn't present. * acgeneral.m4 (AC_OUTPUT): Make no args to AC_OUTPUT work again. From Ian Lance Taylor. * acspecific.m4 (AC_CONST): Fix quoting problem. * acconfig.h [const]: New addition. Thu Dec 31 17:56:18 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_HAVE_LIBRARY): New macro from Noah Friedman. * acconfig.h: Renamed from config.h. * autoheader.sh: Renamed from autohead.sh. Support a local acconfig.h. Use \\012 instead of \\n for tr for portability. Thu Dec 31 12:30:34 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) * config.h: Added #undef vfork. Tue Dec 29 14:26:43 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_COMPILE_CHECK): Use cat rather than echo to create conftest.c, to avoid " problems. Fri Dec 25 15:07:06 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_CONST): Don't define HAVE_CONST. * acgeneral.m4 (AC_OUTPUT, AC_DEFINE): Combine the two sed commands for #undef lines. * acgeneral.m4 (AC_PROGRAM_EGREP, AC_TEST_PROGRAM, AC_TEST_CPP, AC_OUTPUT), acspecific.m4 (AC_PROG_CC): Put > before << when using both, to avoid HP-UX sh bug. Wed Dec 23 20:47:53 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Use if, not &&, for --with. From Jan Brittenson. Mon Dec 21 17:13:57 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Use sed instead of head and tail. Trap to remove the temp files. * acgeneral.m4 (AC_OUTPUT): Quote DEFS assignment. From Ian Lance Taylor. Mon Dec 21 14:27:44 1992 Jim Meyering (meyering@comco.com) * acspecific.m4 (AC_STDC_HEADERS): Make sure ctype.h macros are ANSI. Nest tests so we don't need shell temporary variable. Sun Dec 20 18:12:33 1992 Roland McGrath (roland@albert.gnu.ai.mit.edu) * Makefile.in (%.h: %.in): New rule using autohead. (all): Do autohead. (install): Install autohead and config.h. (autohead): New rule. (DISTFILES): Added autohead.sh. * autohead: New script. Fri Dec 18 00:21:23 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acgeneral.m4 (AC_HAVE_FUNCS, AC_HAVE_HEADERS): Change method of tr quoting to keep old shells happy. From Ian Lance Taylor. * acgeneral.m4 (AC_DEFINE): Add to SEDDEFS. (AC_OUTPUT): Use sed instead of awk. From Ian Lance Taylor. Mon Dec 14 14:33:29 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_STDC_HEADERS): Check for string.h declaring memchr. * acgeneral.m4 (AC_NOTICE): Fix comment. Fri Dec 11 17:59:23 1992 David J. MacKenzie (djm@kropotkin.gnu.ai.mit.edu) * acspecific.m4 (AC_ALLOCA): Don't use libPW; it causes too much trouble. Wed Dec 9 14:04:30 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) * config.h: Added HAVE_SYS_WAIT, HAVE_WAITPID, SVR4, UMAX, [ugp]id_t, UMAX4_3, DGUX. Thu Dec 3 13:37:17 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_INSTALL): Ignore AFS install. From James Clark, jjc@jclark.com. Tue Nov 24 07:47:45 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_LEX, AC_DECLARE_YYTEXT, AC_VFORK, AC_WAIT3, AC_INT_16_BITS, AC_WORDS_BIGENDIAN, AC_ARG_ARRAY): End with a newline. * acspecific.m4 (AC_DIR_HEADER): If ndir.h exists and the other choices don't, define NDIR. Sat Nov 21 00:14:51 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_RETSIGTYPE): Instead of grepping for the signal declaration, try redeclaring it and see if we get an error. Always define RETSIGTYPE, not just if it's int. From Ian Lance Taylor. Fri Nov 20 17:06:09 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE): Only put -D option in quotes if it actually contains blanks. Thu Nov 19 17:18:40 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): Set a shell var for --with-*. (AC_WITH): New macro. * acspecific.m4 (AC_CONST): If const works, define HAVE_CONST. * acspecific.m4 (AC_ALLOCA): Don't use libPW on HP-UX. Wed Nov 18 17:36:08 1992 Roland McGrath (roland@churchy.gnu.ai.mit.edu) * acgeneral.m4 (AC_DEFINE): When writing a -D with a value, surround it with 's so the value can contain spaces. Thu Nov 12 22:49:35 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_PROG_CC): Don't add -O to CC if GNU C. (-O2, or nothing, might be more appropriate.) Sun Nov 8 23:33:23 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com) * acspecific.m4 (AC_GETLOADAVG): Check for dwarf.h for general svr4, then elf.h for Solaris 2, which needs additional libraries. Thu Nov 12 22:18:54 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS): --exec_prefix -> --exec-prefix. Tue Nov 10 16:15:10 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4: undef m4 `include' builtin. * acspecific.m4 (AC_STDC_HEADERS): Don't test for limits.h due to Ultrix conflict with float.h. Thu Oct 29 16:16:11 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acgeneral.m4 (AC_PARSEARGS, AC_PREPARE): New macros, broken out parts of AC_INIT. (AC_INIT): Use them. Thu Oct 22 20:48:12 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_INSTALL): Comment out arg to `:'. AIX doesn't like it. Wed Oct 14 12:41:02 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * Version 1.2. * acspecific.m4 (AC_INSTALL): Avoid the AIX install script. * acspecific.m4 (AC_RESTARTABLE_SYSCALLS): Wait for child if sys calls are not restarted, to avoid leaving the child still running. From Ian Lance Taylor. Tue Oct 13 15:43:56 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acspecific.m4 (AC_CONST): Add more tests for brokenness. From Jim Meyering. * acgeneral.m4: Use % instead of ? to avoid shell variable expansion. Fri Oct 2 06:55:05 1992 David J. MacKenzie (djm@goldman.gnu.ai.mit.edu) * acgeneral.m4: Use ? instead of , to separate parts of sed arg. Mon Sep 14 12:33:41 1992 David J. MacKenzie (djm@apple-gunkies.gnu.ai.mit.edu) * acspecific.m4 (AC_STDC_HEADERS): Also check for float.h. * acspecific.m4 (AC_TIMEZONE): Protect [] from being quotes. Thu Sep 10 17:12:10 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_OUTPUT): Include the hostname in config.status. * acgeneral.m4 (AC_OUTPUT): Use a separate flag in the awk script instead of checking for non-empty values, so things like defining const as empty work. From Steve Emmerson . Fri Aug 28 18:51:13 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_INIT): If there's no path on $0, use '.'. Thu Aug 27 16:15:14 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * config.h: New file. * acgeneral.m4 (AC_INIT): Look for source files in the directory containing `configure', if not given explicitly. * acspecific.m4 (AC_TIMEZONE): Adjust tzname decl for RS6000. * acspecific.m4 (AC_GETLOADAVG): Don't use double quotes in the test program. Thu Aug 27 15:26:49 1992 Roland McGrath (roland@wookumz.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): Don't check nlist.h if we found one of specific things. Mon Aug 24 16:22:45 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Version 1.1. * acspecific.m4 (AC_TIMEZONE): Include time.h. Don't declare tzname if it's a macro. From Jim Meyering. Fri Aug 21 14:12:35 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acspecific.m4 (AC_ALLOCA): Check whether the alloca defined by alloca.h works when given a non-constant argument. * acspecific.m4 (AC_GETLOADAVG): Define NLIST_STRUCT and NLIST_NAME_UNION if appropriate. * acgeneral.m4 (AC_OUTPUT): If no args are given, omit the loop to produce output files. * acgeneral.m4 (AC_TEST_PROGRAM): Add a call to exit to try to suppress core dumped message. From Ian Lance Taylor. * acgeneral.m4 (AC_PREFIX): Only print the message if prefix hasn't been set. From James Clark. * acspecific.m4 (AC_SIZE_T, AC_UID_T, AC_PID_T, AC_RETSIGTYPE): Print a message saying what it's checking for. (AC_SIZE_T): Define size_t to be unsigned, not int, for ANSI-friendliness. * acspecific.m4 (AC_GETLOADAVG): Just check for elf.h, not dwarf.h too. * autoconf.sh: Exit with status 1 if there are unresolved macros. Isolate the pattern to make adding other prefixes easy. Look for aclocal.m4 in . as well as MACRODIR. Tue Aug 18 16:35:46 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_STRCOLL): New macro. Tue Aug 18 15:22:45 1992 Roland McGrath (roland@geech.gnu.ai.mit.edu) * acspecific.m4 (AC_GETLOADAVG): elf.h implies SVR4. Mon Jul 27 14:20:32 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_TEST_PROGRAM): Check for cross-compiling was missing "test -n". From Ian Lance Taylor. Sun Jul 26 16:25:19 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * acgeneral.m4 (AC_SUBST): Support multiple substitutions in a line. Mon Jul 20 01:08:01 1992 David J. MacKenzie (djm@nutrimat.gnu.ai.mit.edu) * Version 1.0. ----- Copyright 1992, 1993, 1994 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/Makefile.cfg0000644000175000017500000000414207747424414016254 0ustar taffittaffit# Customize Makefile.maint for Autoconf. -*- Makefile -*- # Copyright (C) 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. prev_version_file = $(srcdir)/config/prev-version.txt move_if_change = $(srcdir)/config/move-if-change announce_gen = $(srcdir)/config/announce-gen release_archive_dir = releases # Use alpha.gnu.org for alpha and beta releases. # Use ftp.gnu.org for major releases. gnu_ftp_host-alpha = alpha gnu_ftp_host-beta = alpha gnu_ftp_host-major = ftp gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE)) url_dir_list = \ ftp://$(gnu_rel_host).gnu.org/gnu/autoconf # Files to update automatically. wget_files = \ $(srcdir)/config/config.guess \ $(srcdir)/config/config.sub \ $(srcdir)/config/texinfo.tex \ $(srcdir)/doc/standards.texi \ $(srcdir)/doc/make-stds.texi cvs_files = \ $(srcdir)/config/elisp-comp \ $(srcdir)/config/install-sh \ $(srcdir)/config/mdate-sh \ $(srcdir)/config/missing \ $(srcdir)/config/mkinstalldirs # Keep executables executable. Make it robust to parallel makes. local_updates = executable-update .PHONY: executable-update # autom4te-update is defined in Makefile.am. executable-update: wget-update cvs-update autom4te-update chmod +x $(cvs_files) \ $(srcdir)/config/config.guess \ $(srcdir)/config/config.sub # Tests not to run. local-checks-to-skip ?= \ po-check m4-check author_mark_check \ strftime-check syntax-check makefile_path_separator_check \ makefile-check autoconf2.59-2.59+dfsg/NEWS0000644000175000017500000012245107752412536014557 0ustar taffittaffit* Major changes in Autoconf 2.59 -*- outline -*- Released 2003-11-04, by Akim Demaille ** ac_abs_builddir etc. Absolute paths were actually relative in 2.58. * Major changes in Autoconf 2.58 Released 2003-11-04, by Akim Demaille ** core.* core.* files are no longer removed, as they may be valid user files. ** autoreconf and auxiliary directory Autoreconf creates the auxiliary directory if needed. This is especially useful for initial "bootstrapping" of fresh CVS checkouts. ** AC_CONFIG_MACRO_DIR Use this macro to declare the directory for local m4 macros for aclocal. ** AC_LIBOBJS No longer includes twice the same file in LIBOBJS if invoked multiple times. ** AC_CONFIG_COMMANDS The directory for its first argument is automatically created. For instance, with AC_CONFIG_COMMANDS([src/modules.hh], [...]) $top_builddir/src/ is created if needed. ** Autotest and local.at The optional file local.at is always included in Autotest test suites. ** Warnings The warnings are always issued, including with cached runs. This became a significant problem since aclocal and automake can run autoconf behind the scene. ** autoheader warnings The warnings of autoheader can be turned off, using --warning. For instance, -Wno-obsolete disables the complaints about acconfig.h and other deprecated constructs. ** New macros AC_C_RESTRICT, AC_INCLUDES_DEFAULT, AC_LANG_ASSERT, AC_LANG_WERROR, AS_SET_CATFILE. ** AC_DECL_SYS_SIGLIST Works again. ** AC_FUNC_MKTIME Now checks that mktime is the inverse of localtime. ** Improve DJGPP portability The Autoconf tools and configure behave better under DJGPP. ** Present But Cannot Be Compiled New FAQ section dedicated to the mystic configure: WARNING: pi.h: present but cannot be compiled configure: WARNING: pi.h: check for missing prerequisite headers? configure: WARNING: pi.h: proceeding with the preprocessor's result messages. ** Concurrent executions of autom4te autom4te now locks its internal files, which enables concurrent executions of autom4te, likely to happen if automake, autoconf, autoheader etc. are run simultaneously. ** Libtool Use of Libtool 1.5 and higher is encouraged. Compatibility with Libtool pre-1.4 is not checked. ** Autotest Testsuites no longer rerun failed tests in verbose mode; instead, failures are logged while the test is run. In addition, expected failures can be marked as such. * Major changes in Autoconf 2.57 Released 2002-12-03 by Paul Eggert. Bug fixes for problems with AIX linker, with freestanding C compilers, with GNU m4 limitations, and with obsolete copies of GNU documents. The Free Documentation License has been upgraded from 1.1 to 1.2. * Major changes in Autoconf 2.56 Released 2002-11-15 by Akim Demaille. One packaging problem fixed (config/install-sh was not executable). * Major changes in Autoconf 2.55 Released 2002-11-14 by Akim Demaille. Release tips: Have your configure.ac checked by autoscan ("autoscan"). Try the warning options ("autoreconf -fv -Wall"). ** Documentation - AC_CHECK_HEADER, AC_CHECK_HEADERS More information on proper use. - Writing Test Programs This sections explains how to write good test sources to use with AC_COMPILE_IFELSE etc. It documents AC_LANG_PROGRAMS and so forth. - AC_FOO_IFELSE vs. AC_TRY_FOO Explains why Autoconf moves from AC_TRY_COMPILE etc. to AC_COMPILE_IFELSE and AC_LANG_PROGRAM etc. ** autoreconf - Is more robust to different Gettext installations. - Produces messages (when --verbose) to be understood by Emacs' compile mode. - Supports -W/--warnings. - -m/--make Once the GNU Build System reinstalled, run `./config.status --recheck && ./config.status && make' if possible. ** autom4te - Supports --cache, and --no-cache. - ~/.autom4te.cfg makes it possible to disable the caching mechanism (autom4te.cache). See `Customizing autom4te' in the documentation. ** config.status Supports --quiet. ** Obsolete options Support for the obsoleted options -m, --macrodir, -l, --localdir is dropped in favor of the safer --include/--prepend-include scheme. ** Macros - New macros AC_COMPILER_IFELSE, AC_FUNC_MBRTOWC, AC_HEADER_STDBOOL, AC_LANG_CONFTEST, AC_LANG_SOURCE, AC_LANG_PROGRAM, AC_LANG_CALL, AC_LANG_FUNC_TRY_LINK, AC_MSG_FAILURE, AC_PREPROC_IFELSE. - Obsoleted Obsoleted macros are kept for Autoconf backward compatibility, but should be avoided in configure.ac. Running autoupdate is advised. AC_DECL_SYS_SIGLIST. - AC_DEFINE/AC_DEFINE_UNQUOTED We have to stop using the old compatibility scheme --that tried to avoid useless backslashes-- because Libtool 1.4.3 contains a AC_DEFINE([error_t], [int], [Define to a type to use for \`error_t' if it is not otherwise available.]) We have to quote the single quotes and backslashes with \. The old compatibility scheme saw that ` was backslashed, and therefore did not quote the single quote... Failure. Hence, Autoconf 2.54 is not compatible with Libtool. Autoconf 2.55 is, but in some cases might produce more \ than wanted. Please, note that in the future the same problem will happen with AC_MSG_*: use `autoreconf -f -Wall'. ** Bug Fixes - Portability of the Autoconf package to Solaris. - Spurious warnings caused by config.status. This bug is benign, but painful: on some systems (typically FreeBSD), warnings such as: config.status: creating Makefile mv: Makefile: set owner/group (was: 1357/0): Operation not permitted could be issued. This is fixed. - Parallel Builds Simultaneous executions of config.status are possible again. - Precious variables accumulation config.status could stack several copies of the precious variables assignments. ** Plans for later versions - ./configure The compatibility hooks with the old scheme will be completely removed. Please, advice/use `--build', `--host', and `--target' only. - AC_CHECK_HEADER, AC_CHECK_HEADERS The tests will be stricter, please make sure your invocations are valid. - shell functions Shell functions will gradually be introduced, probably starting with Autotest. If you know machines which are in use that you suspect *not* to support shell functions, please run the test suite of Autoconf 2.55 on it, and report the results to bug-autoconf@gnu.org. - AC_MSG_* Special characters in AC_MSG_* need not be quoted. Currently, Autoconf has heuristics to decide when a string is escaped, or has to be escaped. This scheme is fragile, and will be removed; the only risk is uglified messages. Please, run `autoreconf -f -Wall' to find occurrences that will be affected. * Major changes in Autoconf 2.54 Released 2002-09-13 by Akim Demaille. ** Executables - autoreconf no longer changes the version of the gettext/po/intl support files. It now adds the files the correspond to the AM_GNU_GETTEXT_VERSION declared in configure.ac. Warning: It now relies on the 'autopoint' program, which is part of GNU gettext 0.11.4 and newer. Please note that you need to have a GNU gettext version that corresponds at least to the AM_GNU_GETTEXT_VERSION declared in configure.ac. You can upgrade to newer GNU gettext versions, though, without needing to change configure.ac. - The -I DIR or --include=DIR option now appends DIR to the include path instead of prepending; this is for consistency with other GNU tools. The new -B DIR or --prepend-include=DIR option has the old behavior. ** Macros - AC_OUTPUT Now handles all the gory details about LIBOBJS and LTLIBOBJS. Please, remove lines such as # This is necessary so that .o files in LIBOBJS are also # built via the ANSI2KNR-filtering rules. LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'` and read the `AC_LIBOBJ vs LIBOBJS' section. Do not define U in your Makefiles either. - AC_CONFIG_LINKS now makes copies if it can't make links. - AC_FUNC_FNMATCH now tests only for POSIX compatibility, reverting to Autoconf 2.13 behavior. The new macro AC_FUNC_FNMATCH_GNU also tests for GNU extensions to fnmatch, and replaces fnmatch if needed. - AC_FUNC_SETVBUF_REVERSED no longer fails when cross-compiling. - AC_PROG_CC_STDC is integrated into AC_PROG_CC. - AC_PROG_F77 default search no longer includes cf77 and cfg77. - New macros AC_C_BACKSLASH_A, AC_CONFIG_LIBOBJ_DIR, AC_GNU_SOURCE, AC_PROG_EGREP, AC_PROG_FGREP, AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_FUNC_REALLOC, AC_TYPE_MBSTATE_T. - AC_FUNC_GETLOADAVG looks for getloadavg.c in the CONFIG_LIBOBJ_DIR. - AC_FUNC_MALLOC Now defines HAVE_MALLOC to 0 if `malloc' does not work, and asks for an AC_LIBOBJ replacement. ** Bug fixes - Spurious complaints from `m4_bmatch' about invalid regular expressions are suppressed. - Empty top_builddirs are properly handled. - AC_CHECK_MEMBER works correctly when the member is an aggregate. - AC_PATH_PROG Now colon in the optional path arguments are properly handled. ** Improved portability - Both Autoconf the package, and the scripts it produces, should run more reliably with Zsh. Bear in mind it is the default Bourne shell on Darwin. - Autoconf and the scripts it produces no longer assume the existence of the obsolescent commands egrep and fgrep. ** Documentation - Limitations of Make More of them. - GNATS The GNATS base has moved to http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=autoconf ** Misc. - config.log Now contains the list of ouput variables and files (AC_SUBST, AC_SUBST_FILES). * Major changes in Autoconf 2.53 Released 2002-03-08 by Akim Demaille. ** Requirements Perl 5.005_03 or later is required: autom4te is written in Perl and is needed by autoconf. autoheader, autoreconf, ifnames, and autoscan are rewritten in Perl. ** Documentation - AC_INIT Argument requirements, output variables, defined macros. - M4sugar, M4sh, Autotest First sketch. - Double quoting macros AC_TRY_CPP, AC_TRY_COMPILE, AC_TRY_LINK and AC_TRY_RUN. - Licensing The Autoconf manual is now distributed under the terms of the GNU FDL. - Section `Hosts and Cross-Compilation' Explains the rationale for the 2.5x changes in the cross-compilation chain, and in the relationships between build, host, and target types. Emphasizes that `cross-compilation' == `--host is given'. If you are working on compilers etc., be sure to read this section. - Section `AC_LIBOBJ vs. LIBOBJS' Explains why assigning LIBOBJS directly is now an error. Details how to update the code. ** configure - $LINENO Now used instead of hard coded line numbers. This eases the comparison of `configure's, and diminishes the pressure over control version archives. Automatic replacement for shells that don't support this feature. - New output variables @builddir@, @top_builddir@, @abs_srcdir@, @abs_top_srcdir@, @abs_builddir@, @abs_top_builddir@. ** Emacs Autoconf and Autotest modes are provided. ** Executables - autom4te New, used by the Autoconf suite to cache and speed up most processing. - --force, -f Supported by autom4te, autoconf and autoheader. - --include, -I Replaces --autoconf-dir and --localdir in autoconf, autoheader, autoupdate, and autoreconf. - autoreconf No longer passes --cygnus, --foreign, --gnits, --gnu, --include-deps: automake options are to be given via AUTOMAKE_OPTIONS. - autoreconf Runs gettextize and libtoolize when appropriate. - autoreconf --m4dir is no longer supported. - autoreconf Now runs only in the specified directories, defaulting to `.', but understands AC_CONFIG_SUBDIRS for dependent directories. Before, it used to run on all the `configure.ac' found in the current tree. Independent packages are properly updated. ** Bug fixes - The top level $prefix is propagated to the AC_CONFIG_SUBDIRS configures. - AC_TRY_RUN Under the user pressure, $? is finally available. Probably a mistake. - AC_F77_LIBRARY_LDFLAGS now supports the HP/UX f90 compiler. - Precious variables accumulation config.status could stack several copies of the precious variables assignments. - AC_PATH_PROG and family. Works properly when given a literal path. - AC_FUNC_SETPGRP Somewhere since 2.13, the result had been reversed. ** C Macros - AC_C_BIGENDIAN supports the cross-compiling case. - AC_C_BIGENDIAN accepts ACTION-IF-TRUE, ACTION-IF-FALSE, and ACTION-IF-UNKNOWN arguments. All are facultative, and the default for ACTION-IF-TRUE is to define WORDS_BIGENDIAN like AC_C_BIGENDIAN always did. - AC_C_LONG_DOUBLE now succeeds only if `long double' has more range or precision than `double'. ** Generic macros - AC_INIT It now defines the preprocessor symbols PACKAGE_NAME, PACKAGE_TARNAME, PACKAGE_VERSION, PACKAGE_STRING, and PACKAGE_BUGREPORT. - AC_INIT Admits a fourth optional parameter: the tar name. - AC_CONFIG_COMMANDS, HEADERS, FILES, LINKS. Provide the user with srcdir, ac_srcdir, ac_top_srcdir, ac_builddir, ac_top_builddir, ac_abs_srcdir, ac_abs_top_srcdir, ac_abs_builddir, ac_abs_top_builddir. - AC_CONFIG_COMMANDS, HEADERS, FILES, LINKS and AC_OUTPUT. Are much less expensive when using long lists of files. - AC_PREFIX_PROGRAM Works with shell variables, and non alphanumeric names. ** Library macros - AC_FUNC_STRERROR_R now sets STRERROR_R_CHAR_P, not HAVE_WORKING_STRERROR_R, because POSIX 1003.1-200x draft 7 says strerror_r returns int, not char *. - AC_FUNC_STRTOD substitutes POW_LIB. - AC_FUNC_STRNLEN New. * Major changes in Autoconf 2.52 Released 2001-07-18 by Akim Demaille. ** Documentation - AC_ARG_VAR - Quadrigraphs This feature was present in autoconf 2.50 but was not documented. For example, `@<:@' is translated to `[' just before output. This is useful when writing strings that contain unbalanced quotes, or other hard-to-quote constructs. - m4_pattern_forbid, m4_pattern_allow - Tips for upgrading from 2.13. - Using autoscan to maintain a configure.ac. ** Default includes - Now include stdint.h. - sys/types.h and sys/stat.h are guarded. - strings.h is included if available, and not conflicting with string.h. ** Bug fixes - The test suite is more robust and presents less false failures. - Invocation of GNU M4 now robust to POSIXLY_CORRECT. - configure accepts --prefix='' again. - AC_CHECK_LIB works properly when its first argument is not a literal. - HAVE_INTTYPES_H is defined only if not conflicting with sys/types.h. - build_, host_, and target_alias are AC_SUBST as in 2.13. - AC_ARG_VAR properly propagates precious variables inherited from the environment to ./config.status. - Using --program-suffix/--program-prefix is portable. - Failures to detect the default compiler's output extension are less likely. - `config.status foo' works properly when `foo' depends on variables set in an AC_CONFIG_THING INIT-CMD. - autoheader is more robust to broken input. - Fixed Fortran name-mangling and link tests on a number of systems, e.g. NetBSD; see AC_F77_DUMMY_MAIN, below. ** Generic macros - AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to specify pre-includes. In this case, the headers are compiled with cc, not merely preprocessed by cpp. Therefore it is the _usability_ of a header which is checked for, not just its availability. - AC_ARG_VAR refuses to run configure when precious variables have changed. - Versions of compilers are dumped in the logs. - AC_CHECK_TYPE recognizes use of `foo_t' as a replacement type. ** Specific Macros - AC_PATH_XTRA only adds -ldnet to $LIBS if it's needed to link. - AC_FUNC_WAIT3 and AC_SYS_RESTARTABLE_SYSCALLS are obsoleted. - AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH, AM_FUNC_MKTIME, AM_FUNC_OBSTACK, and AM_FUNC_STRTOD are now activated. Be sure to read `Upgrading from Version 2.13' to understand why running `autoupdate' is needed. - AC_F77_DUMMY_MAIN, AC_F77_MAIN: new macros to detect whether a main-like routine is required/possible when linking C/C++ with Fortran. Users of e.g. AC_F77_WRAPPERS should be aware of these. - AC_FUNC_GETPGRG behaves better when cross-compiling. * Major changes in Autoconf 2.51 There was no release of Autoconf 2.51 since some packagers had used this version number without permission to ship intermediary versions of 2.50. The version was skipped to avoid confusion. * Major changes in Autoconf 2.50 Released 2001-05-21 by Akim Demaille. ** Lots of bug fixes There have been far too many to enumerate them here. Check out ChangeLog if you really want to know more. ** Improved documentation In particular, portability issues are better covered. ** Use of Automake All the standard GNU Makefile targets are supported. The layout has changed: m4/ holds the m4 extensions Autoconf needs for its configuration, doc/ contains the documentation, and tests/ contains the test suite. ** Man pages are provided For autoconf, autoreconf, autoupdate, autoheader, autoscan, ifnames, config.guess, config.sub. ** autoconf - --trace Provides a safe and powerful means to trace the macro uses. This provide the parsing layer for tools which need to `study' configure.in. - --warnings Specify what category of warnings should be enabled. - When recursing into subdirectories, try for configure.gnu before configure to adapt for packages not using autoconf on case-insensitive filesystems. - Diagnostics More errors are now caught (circular AC_REQUIRE dependencies, AC_DEFINE in the action part of an AC_CACHE_CHECK, too many pops etc.). In addition, their location and call stack are given. ** autoupdate autoupdate is much more powerful, and is able to provide the glue code which might be needed to move from an old macro to its newer equivalent. You are strongly encouraged to use it to modernize both your `configure.in' and your .m4 extension files. ** autoheader The internal machinery of autoheader has completely changed. As a result, using `acconfig.h' should be considered to be obsoleted, and you are encouraged to get rid of it using the AH macros. ** autoreconf Extensive overhaul. ** Fortran 77 compilers Globally, the support for Fortran 77 is considerably improved. Support for automatically determining a Fortran 77 compiler's name-mangling scheme. New CPP macros F77_FUNC and F77_FUNC_ are provided to wrap C/C++ identifiers, thus making it easier and more transparent for C/C++ to call Fortran 77 routines, and Fortran 77 to call C/C++ routines. See the Texinfo documentation for details. ** Test suite The test suite no longer uses DejaGNU. It should be easy to submit test cases in this new framework. ** configure - --help, --help=long, -hl no longer dumps useless items. - --help=short, -hs lists only specific options. - --help=recursive, -hr displays the help of all the embedded packages. - Remembers environment variables when reconfiguring. The previous scheme to set envvar before running configure was ENV=VAL ./configure what prevented configure from remembering the environment in which it was run, therefore --recheck was run in an inconsistent environment. Now, one should run ./configure ENV=VAR and then --recheck will work properly. Variables declared with AC_ARG_VAR are also preserved. - cross-compilation $build defaults to `config.guess`, $host to $build, and then $target to $host. Cross-compilation is a global status of the package, it no longer depends upon the current language. Cross compilation is enabled iff the user specified `--host'. `configure' now fails if it can't run the executables it compiles, unless cross-compilation is enabled. - Cache file The cache file is disabled by default. The new options `--config-cache', `-C' set the cache to `config.cache'. ** config.status - faster Much faster on most architectures. - concurrent executions It is safe to use `make -j' with config.status. - human interface improved It is possible to invoke ./config.status foobar instead of the former form (still valid) CONFIG_COMMANDS= CONFIG_HEADERS= CONFIG_LINKS= \ CONFIG_FILES=foobar:foo.in:bar.in \ ./config.status The same holds for configuration headers and links. You can instantiate unknown files and headers: ./config.status --header foo.h:foo.h.in --file bar:baz - has a useful --help - accepts special file name "-" for stdin/stdout ** Identity Macros - AC_COPYRIGHT Specify additional copyright information. - AC_INIT Now expects the identity of the package as argument. ** General changes. - Uniform quotation Most macros, if not all, now strictly follow the `one quotation level' rule. This results in a more predictable expansion. - AC_REQUIRE A sly bug in the AC_REQUIRE machinery, which could produce incorrect configure scripts, was fixed by Axel Thimm. ** Setup Macros - AC_ARG_VAR Document and ask for the registration of an envvar. - AC_CONFIG_SRCDIR Specifies the file which `configure' should look for when trying to find the source tree (used to be handled by AC_INIT). - AC_CONFIG_COMMANDS To add new actions to config.status. Should be used instead of AC_OUTPUT_COMMANDS. - AC_CONFIG_LINKS Replaces AC_LINK_FILES. - AC_CONFIG_HEADERS, AC_CONFIG_COMMANDS, AC_CONFIG_SUBDIRS, AC_CONFIG_LINKS, and AC_CONFIG_FILES They now obey sh: you should no longer use shell variables as argument. Instead of test "$package_foo_enabled" = yes && $my_subdirs="$my_subdirs foo" AC_CONFIG_SUBDIRS($my_subdirs) write if test "$package_foo_enabled" = yes; then AC_CONFIG_SUBDIRS(foo) fi - AC_HELP_STRING To format an Autoconf macro's help string so that it looks pretty when the user executes `configure --help'. ** Generic Test Macros - AC_CHECK families The interface of the AC_CHECK families of macros (decl, header, type, member, func) is now uniform. They support the same set of default includes. - AC_CHECK_DECL, AC_CHECK_DECLS To check whether a symbol is declared. - AC_CHECK_SIZEOF, AC_C_CHAR_UNSIGNED. No longer need a cross-compilation default. - AC_CHECK_TYPE The test it performs is much more robust than previously, and makes it possible to test builtin types in addition to typedefs. It is now schizophrenic: - AC_CHECK_TYPE(TYPE, REPLACEMENT) remains for backward compatibility, but its use is discouraged. - AC_CHECK_TYPE(TYPE, IF-FOUND, IF-NOT-FOUND, INCLUDES) behaves exactly like the other AC_CHECK macros. - AC_CHECK_TYPES Checks whether given types are supported by the system. - AC_CHECK_MEMBER, AC_CHECK_MEMBERS Check for given members in aggregates (e.g., pw_gecos in struct passwd). - AC_PROG_CC_STDC Checks if the compiler supports ISO C, included when needs special options. - AC_PROG_CPP Checking whether the preprocessor indicates missing includes by the error code. stderr is checked by AC_TRY_CPP only as a fallback. - AC_LANG Takes a language as argument and replaces AC_LANG_C, AC_LANG_CPLUSPLUS and AC_LANG_FORTRAN77. - AC_LANG_PUSH, AC_LANG_POP Are preferred to AC_LANG_SAVE, AC_LANG_RESTORE. ** Specific Macros - AC_FUNC_CHOWN, AC_FUNC_MALLOC, AC_FUNC_STRERROR_R, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD, AC_FUNC_FSEEKO. New. - AC_FUNC_GETGROUPS Sets GETGROUPS_LIBS. - AC_FUNC_GETLOADAVG Defines `HAVE_STRUCT_NLIST_N_UN_N_NAME' instead of `NLIST_NAME_UNION'. - AC_PROG_LEX Now integrates `AC_DECL_YYTEXT' which is obsoleted. - AC_SYS_LARGEFILE Arrange for large-file support. - AC_EXEEXT, AC_OBJEXT You are no longer expected to use them: their computation is performed by default. ** C++ compatibility Every macro has been revisited in order to support at best CC=c++. Major changes in Autoconf 2.14: There was no release of GNU Autoconf 2.14. Major changes in Autoconf 2.13: Released 1999-05-01 by Ben Elliston. * Support for building on Win32 systems where the only available C or C++ compiler is the Microsoft Visual C++ command line compiler (`cl'). Additional support for building on Win32 systems which are using the Cygwin or Mingw32 environments. * Support for alternative object file and executable file extensions. On Win32, for example, these are .obj and .exe. These are discovered using AC_OBJEXT and AC_EXEEXT, which substitute @OBJEXT@ and @EXEEXT@ in the output, respectively. * New macros: AC_CACHE_LOAD, AC_CACHE_SAVE, AC_FUNC_SELECT_ARGTYPES, AC_VALIDATE_CACHED_SYSTEM_TUPLE, AC_SEARCH_LIBS, AC_TRY_LINK_FUNC, AC_C_STRINGIZE, AC_CHECK_FILE(S), AC_PROG_F77 (and friends). * AC_DEFINE now has an optional third argument for a description to be placed in the config header input file (e.g. config.h.in). * The C++ code fragment compiled for the C++ compiler test had to be improved to include an explicit return type for main(). This was causing failures on systems using recent versions of the EGCS C++ compiler. * Fixed an important bug in AC_CHECK_TYPE that would cause a configure script to report that `sometype_t' was present when only `type_t' was defined. * Merge of the FSF version of config.guess and config.sub to modernize these scripts. Add support for a few new hosts in config.guess. Incorporate latest versions of install-sh, mkinstalldirs and texinfo.tex from the FSF. * autoreconf is capable of running automake if necessary (and applicable). * Support for Fortran 77. See the Texinfo documentation for details. * Bug fixes and workarounds for quirky bugs in vendor utilities. Major changes in Autoconf 2.12: Released 1996-11-26 by David J. MacKenzie * AC_OUTPUT and AC_CONFIG_HEADER can create output files by concatenating multiple input files separated by colons, like so: AC_CONFIG_HEADER(config.h:conf.pre:config.h.in:conf.post) AC_OUTPUT(Makefile:Makefile.in:Makefile.rules) The arguments may be shell variables, to compute the lists on the fly. * AC_LINK_FILES and AC_CONFIG_SUBDIRS may be called multiple times. * New macro AC_OUTPUT_COMMANDS adds more commands to run in config.status. * Bug fixes. Major changes in Autoconf 2.11: Released November 18th, 1996, by David J. MacKenzie * AC_PROG_CC and AC_PROG_CXX check whether the compiler works. They also default CFLAGS/CXXFLAGS to "-g -O2" for gcc, instead of "-g -O". * AC_REPLACE_FUNCS defines HAVE_foo if the system has the function `foo'. * AC_CONFIG_HEADER expands shell variables in its argument. * New macros: AC_FUNC_FNMATCH, AC_FUNC_SETPGRP. * The "checking..." messages and the source code for test programs that fail are saved in config.log. * Another workaround has been added for seds with small command length limits. * config.sub and config.guess recognize more system types. * Bug fixes. Major changes in Autoconf 2.10: Released May 7th, 1996, by Roland McGrath * Bug fixes. * The cache variable names used by `AC_CHECK_LIB(LIB, FUNC, ...)' has changed: now $ac_cv_lib_LIB_FUNC, previously $ac_cv_lib_LIB. Major changes in Autoconf 2.9: Released March 16th, 1996, by Roland McGrath * Bug fixes. Major changes in Autoconf 2.8: Released March 8th, 1996, by Roland McGrath * Bug fixes. Major changes in Autoconf 2.7: Released November 22nd, 1995, by David J. MacKenzie * Bug fixes. Major changes in Autoconf 2.6: Released November 20th, 1995, by David J. MacKenzie * Bug fixes. Major changes in Autoconf 2.5: Released November 17th, 1995, by Roland McGrath * New configure options --bindir, --libdir, --datadir, etc., with corresponding output variables. * New macro: AC_CACHE_CHECK, to make using the cache easier. * config.log contains the command being run as well as any output from it. * AC_CHECK_LIB can check for libraries with "." or "/" or "+" in their name. * AC_PROG_INSTALL doesn't cache a path to install-sh, for sharing caches. * AC_CHECK_PROG, AC_PATH_PROG, AC_CHECK_PROGS, AC_PATH_PROGS, and AC_CHECK_TOOL can search a path other than $PATH. * AC_CHECK_SIZEOF takes an optional size to use when cross-compiling. Major changes in Autoconf 2.4: Released June 14th, 1995, by David J. MacKenzie * Fix a few bugs found by Emacs testers. Major changes in Autoconf 2.3: Released March 27th, 1995, by David J. MacKenzie * Fix the cleanup trap in several ways. * Handle C compilers that are picky about option placement. * ifnames gets the version number from the right directory. Major changes in Autoconf 2.2: Released March 8th, 1995, by David J. MacKenzie * The ifnames utility is much faster but requires a "new awk" interpreter. * AC_CHECK_LIB and AC_HAVE_LIBRARY check and add the new library before existing libs, not after, in case it uses them. * New macros: AC_FUNC_GETPGRP, AC_CHECK_TOOL. * Lots of bug fixes. * Many additions to the TODO file :-) Major changes in Autoconf 2.1: Released November 4th, 1994, by David J. MacKenzie * Fix C++ problems. * More explanations in the manual. * Fix a spurious failure in the testsuite. * Clarify some warning messages. * autoreconf by default only rebuilds configure and config.h.in files that are older than any of their particular input files; there is a --force option to use after installing a new version of Autoconf. Thanks to everybody who's submitted changes and additions to Autoconf! I've incorporated many of them, and am still considering others for future releases -- but I didn't want to postpone this release indefinitely. Caution: don't 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 Library, need major changes because they relied on undocumented internals of version 1. Future releases of those packages will have updated configure.in files. It's best to use GNU m4 1.3 (or later) with Autoconf version 2. Autoconf now makes heavy use of m4 diversions, which were implemented inefficiently in GNU m4 releases before 1.3. Major changes in Autoconf 2.0: Released October 26th, 1994, by David J. MacKenzie ** New copyright terms: * There are no restrictions on distribution or use of configure scripts. ** Documentation: * Autoconf manual is reorganized to make information easier to find and has several new indexes. * INSTALL is reorganized and clearer and is now made from Texinfo source. ** New utilities: * autoscan to generate a preliminary configure.in for a package by scanning its source code for commonly used nonportable functions, programs, and header files. * ifnames to list the symbols used in #if and #ifdef directives in a source tree. * autoupdate to update a configure.in to use the version 2 macro names. * autoreconf to recursively remake configure and configuration header files in a source tree. ** Changed utilities: * autoheader can take pieces of acconfig.h to replace config.h.{top,bot}. * autoconf and autoheader can look for package-local definition files in an alternate directory. ** New macros: * AC_CACHE_VAL to share results of tests between configure runs. * AC_DEFUN to define macros, automatically AC_PROVIDE them, and ensure that macros invoked with AC_REQUIRE don't interrupt other macros. * AC_CONFIG_AUX_DIR, AC_CANONICAL_SYSTEM, AC_CANONICAL_HOST, AC_LINK_FILES to support deciding unguessable features based on the host and target types. * AC_CONFIG_SUBDIRS to recursively configure a source tree. * AC_ARG_PROGRAM to use the options --program-prefix, --program-suffix, and --program-transform-name to change the names of programs being installed. * AC_PREFIX_DEFAULT to change the default installation prefix. * AC_TRY_COMPILE to compile a test program without linking it. * AC_CHECK_TYPE to check whether sys/types.h or stdlib.h defines a given type. * AC_CHECK_LIB to check for a particular function and library. * AC_MSG_CHECKING and AC_MSG_RESULT to print test results, on a single line, whether or not the test succeeds. They obsolete AC_CHECKING and AC_VERBOSE. * AC_SUBST_FILE to insert one file into another. * AC_FUNC_MEMCMP to check whether memcmp is 8-bit clean. * AC_FUNC_STRFTIME to find strftime even if it's in -lintl. * AC_FUNC_GETMNTENT to find getmntent even if it's in -lsun or -lseq. * AC_HEADER_SYS_WAIT to check whether sys/wait.h is POSIX.1 compatible. ** Changed macros: * Many macros renamed systematically, but old names are accepted for backward compatibility. * AC_OUTPUT adds the "automatically generated" comment to non-Makefiles where it finds @configure_input@ in an input file, to support files with various comment syntaxes. * AC_OUTPUT does not replace "prefix" and "exec_prefix" in generated files when they are not enclosed in @ signs. * AC_OUTPUT allows the optional environment variable CONFIG_STATUS to override the file name "config.status". * AC_OUTPUT takes an optional argument for passing variables from configure to config.status. * AC_OUTPUT and AC_CONFIG_HEADER allow you to override the input-file names. * AC_OUTPUT automatically substitutes the values of CFLAGS, CXXFLAGS, CPPFLAGS, and LDFLAGS from the environment. * AC_PROG_CC and AC_PROG_CXX now set CFLAGS and CXXFLAGS, respectively. * AC_PROG_INSTALL looks for install-sh or install.sh in the directory specified by AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or srcdir/../.. by default. * AC_DEFINE, AC_DEFINE_UNQUOTED, and AC_SUBST are more robust and smaller. * AC_DEFINE no longer prints anything, because of the new result reporting mechanism (AC_MSG_CHECKING and AC_MSG_RESULT). * AC_VERBOSE pays attention to --quiet/--silent, not --verbose. * AC_ARG_ENABLE and AC_ARG_WITH support whitespace in the arguments to --enable- and --with- options. * AC_CHECK_FUNCS and AC_CHECK_HEADERS take optional shell commands to execute on success or failure. * Checking for C functions in C++ works. ** Removed macros: * AC_REMOTE_TAPE and AC_RSH removed; too specific to tar and cpio, and better maintained with them. * AC_ARG_ARRAY removed because no one was likely using it. * AC_HAVE_POUNDBANG replaced with AC_SYS_INTERPRETER, which doesn't take arguments, for consistency with all of the other specific checks. ** New files: * Comes with config.sub and config.guess, and uses them optionally. * Uses config.cache to cache test results. An alternate cache file can be selected with the --cache-file=FILE option. * Uses optional shell scripts $prefix/share/config.site and $prefix/etc/config.site to perform site or system specific initializations. * configure saves compiler output to ./config.log for debugging. * New files autoconf.m4 and autoheader.m4 load the other Autoconf macros. * acsite.m4 is the new name for the system-wide aclocal.m4. * Has a DejaGnu test suite. Major changes in Autoconf 1.11: * AC_PROG_INSTALL calls install.sh with the -c option. * AC_SET_MAKE cleans up after itself. * AC_OUTPUT sets prefix and exec_prefix if they weren't set already. * AC_OUTPUT prevents shells from looking in PATH for config.status. Plus a few other bug fixes. Major changes in Autoconf 1.10: * autoheader uses config.h.bot if present, analogous to config.h.top. * AC_PROG_INSTALL looks for install.sh in srcdir or srcdir/.. and never uses cp. * AC_PROG_CXX looks for cxx as a C++ compiler. Plus several bugs fixed. Major changes in Autoconf 1.9: * AC_YYTEXT_POINTER replaces AC_DECLARE_YYTEXT. * AC_SIZEOF_TYPE generates the cpp symbol name automatically, and autoheader generates entries for those names automatically. * AC_FIND_X gets the result from xmkmf correctly. * AC_FIND_X assumes no X if --without-x was given. * AC_FIND_XTRA adds libraries to the variable X_EXTRA_LIBS. * AC_PROG_INSTALL finds OSF/1 installbsd. Major changes in Autoconf 1.8: ** New macros: * New macros AC_LANG_C, AC_LANG_CPLUSPLUS, AC_LANG_SAVE, AC_LANG_RESTORE, AC_PROG_CXX, AC_PROG_CXXCPP, AC_REQUIRE_CPP for checking both C++ and C features in one configure script. * New macros AC_CHECKING, AC_VERBOSE, AC_WARN, AC_ERROR for printing messages. * New macros AC_FIND_XTRA, AC_MMAP, AC_SIZEOF_TYPE, AC_PREREQ, AC_SET_MAKE, AC_ENABLE. ** Changed macros: * AC_FIND_X looks for X in more places. * AC_PROG_INSTALL defaults to install.sh instead of cp, if it's in srcdir. install.sh is distributed with Autoconf. * AC_DECLARE_YYTEXT has been removed because it can't work, pending a rewrite of quoting in AC_DEFINE. * AC_OUTPUT adds its comments in C format when substituting in C files. * AC_COMPILE_CHECK protects its ECHO-TEXT argument with double quotes. ** New or changed command line options: * configure accepts --enable-FEATURE[=ARG] and --disable-FEATURE options. * configure accepts --without-PACKAGE, which sets withval=no. * configure accepts --x-includes=DIR and --x-libraries=DIR. * Giving --with-PACKAGE no argument sets withval=yes instead of withval=1. * configure accepts --help, --version, --silent/--quiet, --no-create options. * configure accepts and ignores most other Cygnus configure options, and warns about unknown options. * config.status accepts --help, --version options. ** Paths and other changes: * Relative srcdir values are not made absolute. * The values of @prefix@ and @exec_prefix@ and @top_srcdir@ get substituted. * Autoconf library files are installed in ${datadir}/autoconf, not ${datadir}. * autoheader optionally copies config.h.top to the beginning of config.h.in. * The example Makefile dependencies for configure et al. work better. * Namespace cleanup: all shell variables used internally by Autoconf have names beginning with `ac_'. More big improvements are in process for future releases, but have not yet been (variously) finished, integrated, tested, or documented enough to release yet. Major changes in Autoconf 1.7: * New macro AC_OBSOLETE. * Bugs in Makefile.in fixed. * AC_LONG_FILE_NAMES improved. Major changes in Autoconf 1.6: * New macro AC_LONG_64_BITS. * Multiple .h files can be created. * AC_FIND_X looks for X files directly if it doesn't find xmkmf. * AC_ALLOCA defines C_ALLOCA if using alloca.c. * --with-NAME can take a value, e.g., --with-targets=sun4,hp300bsd. * Unused --no-create option to configure removed. * autoheader doesn't change the timestamp of its output file if the file didn't change. * All macros that look for libraries now use AC_HAVE_LIBRARY. * config.status checks three optional environment variables to modify its behavior. * The usual bug fixes. Major changes in Autoconf 1.5: * New macros AC_FIND_X, AC_OFF_T, AC_STAT_MACROS_BROKEN, AC_REVISION. * autoconf and autoheader scripts have GNU standards conforming --version and --help options (they print their message and exit). * Many bug fixes. Major changes in Autoconf 1.4: * New macros AC_HAVE_POUNDBANG, AC_TIME_WITH_SYS_TIME, AC_LONG_DOUBLE, AC_GETGROUPS_T, AC_DEFINE_UNQUOTED. * autoconf and autoheader use the M4 environment variable to determine the path of the m4 program to use. * The --macrodir option to autoconf and autoheader specifies the directory in which acspecific.m4, acgeneral.m4, etc. reside if not the default. * autoconf and autoheader can take `-' as their file names, which means to read stdin as input. * Resulting configure scripts can take a --verbose option which causes them to print the results of their tests. * AC_DEFINE quotes its second argument in such a way that spaces, magic shell characters, etc. will be preserved during various stages of expansion done by the shell. If you don't want this, use AC_DEFINE_UNQUOTED instead. * Much textual processing done with external calls to tr and sed have been internalized with builtin m4 `patsubst' and `translit' calls. * AC_OUTPUT doesn't hardwire the filenames it outputs. Instead, you can set the shell variables `gen_files' and `gen_config' to the list of filenames to output. * AC_DECLARE_YYTEXT does an AC_SUBST of `LEX_OUTPUT_ROOT', which may be "lex.yy" or "lexyy", depending on the system. * AC_PROGRAMS_CHECK takes an optional third arg. If given, it is used as the default value. * If AC_ALLOCA chooses alloca.c, it also defines STACK_DIRECTION. * AC_CONST works much more reliably on more systems. * Many bug fixes. Major changes in Autoconf 1.3: configure no longer requires awk for packages that use a config.h. Support handling --with-PACKAGE options. New `autoheader' script to create `config.h.in' from `configure.in'. Ignore troublesome -lucb and -lPW when searching for alloca. Rename --exec_prefix to --exec-prefix for GNU standards conformance. Improve detection of STDC library. Add AC_HAVE_LIBRARY to check for non-default libraries. Function checking should work with future GNU libc releases. Major changes in Autoconf 1.2: The --srcdir option is now usually unnecessary. Add a file containing sample comments describing CPP macros. A comment in config.status tells which host it was configured on. Substituted variable values can now contain commas. Fix bugs in various feature checks. Major changes in Autoconf 1.1: Added AC_STRCOLL macro. Made AC_GETLOADAVG check for more things. AC_OUTPUT argument is now optional. Various bug fixes. ----- Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/doc/0000755000175000017500000000000012067673370014620 5ustar taffittaffitautoconf2.59-2.59+dfsg/doc/stamp-vti0000644000175000017500000000014207752412563016464 0ustar taffittaffit@set UPDATED 5 November 2003 @set UPDATED-MONTH November 2003 @set EDITION 2.59 @set VERSION 2.59 autoconf2.59-2.59+dfsg/doc/Makefile.am0000644000175000017500000000331607663415542016660 0ustar taffittaffit## Process this file with automake to create Makefile.in. ## Makefile for Autoconf. ## Copyright (C) 2000, 2001, 2002, 2003 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. AM_MAKEINFOFLAGS = --no-split TEXI2DVI = texi2dvi --batch TEXI2HTML = texi2html TEXI2HTML_FLAGS = -split_chapter info_TEXINFOS = autoconf.texi standards.texi autoconf_TEXINFOS = fdl.texi install.texi standards_TEXINFOS = make-stds.texi # Files from texi2dvi that should be removed, but which Automake does # not know. CLEANFILES = autoconf.ACs autoconf.cvs autoconf.MSs autoconf.prs \ autoconf.ATs autoconf.evs autoconf.fns autoconf.ovs \ autoconf.tmp \ autoconf*.html standards*.html ## ----------------------------- ## ## Other documentation formats. ## ## ----------------------------- ## html: autoconf_1.html standards_1.html autoconf_1.html: autoconf.texi install.texi $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/autoconf.texi standards_1.html: standards.texi make-stds.texi $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/standards.texi .PHONY: html autoconf2.59-2.59+dfsg/doc/fdl.texi0000644000175000017500000005100207607266377016267 0ustar taffittaffit @node GNU Free Documentation License @appendixsec GNU Free Documentation License @cindex FDL, GNU Free Documentation License @center Version 1.2, November 2002 @display Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain @sc{ascii} without markup, Texinfo input format, La@TeX{} input format, @acronym{SGML} or @acronym{XML} using a publicly available @acronym{DTD}, and standard-conforming simple @acronym{HTML}, PostScript or @acronym{PDF} designed for human modification. Examples of transparent image formats include @acronym{PNG}, @acronym{XCF} and @acronym{JPG}. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, @acronym{SGML} or @acronym{XML} for which the @acronym{DTD} and/or processing tools are not generally available, and the machine-generated @acronym{HTML}, PostScript or @acronym{PDF} produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warrany Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. @end enumerate @page @appendixsubsec ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with...Texts.'' line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: autoconf2.59-2.59+dfsg/doc/standards.info0000644000175000017500000056761107751663647017512 0ustar taffittaffitThis is standards.info, produced by makeinfo version 4.6 from standards.texi. INFO-DIR-SECTION GNU organization START-INFO-DIR-ENTRY * Standards: (standards). GNU coding standards. END-INFO-DIR-ENTRY The GNU coding standards, last updated April 29, 2003. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".  File: standards.info, Node: Top, Next: Preface, Prev: (dir), Up: (dir) Version ******* The GNU coding standards, last updated April 29, 2003. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". * Menu: * Preface:: About the GNU Coding Standards * Legal Issues:: Keeping Free Software Free * Design Advice:: General Program Design * Program Behavior:: Program Behavior for All Programs * Writing C:: Making The Best Use of C * Documentation:: Documenting Programs * Managing Releases:: The Release Process * References:: References to Non-Free Software or Documentation * Copying This Manual:: How to Make Copies of This Manual * Index::  File: standards.info, Node: Preface, Next: Legal Issues, Prev: Top, Up: Top About the GNU Coding Standards ****************************** The GNU Coding Standards were written by Richard Stallman and other GNU Project volunteers. Their purpose is to make the GNU system clean, consistent, and easy to install. This document can also be read as a guide to writing portable, robust and reliable programs. It focuses on programs written in C, but many of the rules and principles are useful even if you write in another programming language. The rules often state reasons for writing in a certain way. This release of the GNU Coding Standards was last updated April 29, 2003. If you did not obtain this file directly from the GNU project and recently, please check for a newer version. You can get the GNU Coding Standards from the GNU World Wide Web server host in several different formats: `http://www.gnu.org/prep/standards.text', `http://www.gnu.org/prep/standards.info', and `http://www.gnu.org/prep/standards.dvi', as well as the Texinfo "source" which is divided in two files: `http://www.gnu.org/prep/standards.texi' and `http://www.gnu.org/prep/make-stds.texi'. The GNU Coding Standards are also available in HTML format starting at `http://www.gnu.org/prep/standards_toc.html'. Corrections or suggestions for this document should be sent to . If you make a suggestion, please include a suggested new wording for it; our time is limited. We prefer a context diff to the `standards.texi' or `make-stds.texi' files, but if you don't have those files, please mail your suggestion anyway. These standards cover the minimum of what is important when writing a GNU package. Likely, the needs for additional standards will come up. Sometimes, you might suggest that such standards be added to this document. If you think your standards would be generally useful, please do suggest them. You should also set standards for your package on many questions not addressed or not firmly specified here. The most important point is to be self-consistent--try to stick to the conventions you pick, and try to document them as much as possible. That way, your program will be more maintainable by others. The GNU Hello program serves as an example of how to follow the GNU coding standards for a trivial program which prints `Hello, world!'. `http://www.gnu.org/software/hello/hello.html'.  File: standards.info, Node: Legal Issues, Next: Design Advice, Prev: Preface, Up: Top Keeping Free Software Free ************************** This node discusses how you can make sure that GNU software avoids legal difficulties, and other related issues. * Menu: * Reading Non-Free Code:: Referring to Proprietary Programs * Contributions:: Accepting Contributions * Trademarks:: How We Deal with Trademark Issues  File: standards.info, Node: Reading Non-Free Code, Next: Contributions, Up: Legal Issues Referring to Proprietary Programs ================================= Don't in any circumstances refer to Unix source code for or during your work on GNU! (Or to any other proprietary programs.) If you have a vague recollection of the internals of a Unix program, this does not absolutely mean you can't write an imitation of it, but do try to organize the imitation internally along different lines, because this is likely to make the details of the Unix version irrelevant and dissimilar to your results. For example, Unix utilities were generally optimized to minimize memory use; if you go for speed instead, your program will be very different. You could keep the entire input file in core and scan it there instead of using stdio. Use a smarter algorithm discovered more recently than the Unix program. Eliminate use of temporary files. Do it in one pass instead of two (we did this in the assembler). Or, on the contrary, emphasize simplicity instead of speed. For some applications, the speed of today's computers makes simpler algorithms adequate. Or go for generality. For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead. Make sure your program handles NULs and other funny characters in the input files. Add a programming language for extensibility and write part of the program in that language. Or turn some parts of the program into independently usable libraries. Or use a simple garbage collector instead of tracking precisely when to free memory, or use a new GNU facility such as obstacks.  File: standards.info, Node: Contributions, Next: Trademarks, Prev: Reading Non-Free Code, Up: Legal Issues Accepting Contributions ======================= If the program you are working on is copyrighted by the Free Software Foundation, then when someone else sends you a piece of code to add to the program, we need legal papers to use it--just as we asked you to sign papers initially. _Each_ person who makes a nontrivial contribution to a program must sign some sort of legal papers in order for us to have clear title to the program; the main author alone is not enough. So, before adding in any contributions from other people, please tell us, so we can arrange to get the papers. Then wait until we tell you that we have received the signed papers, before you actually use the contribution. This applies both before you release the program and afterward. If you receive diffs to fix a bug, and they make significant changes, we need legal papers for that change. This also applies to comments and documentation files. For copyright law, comments and code are just text. Copyright applies to all kinds of text, so we need legal papers for all kinds. We know it is frustrating to ask for legal papers; it's frustrating for us as well. But if you don't wait, you are going out on a limb--for example, what if the contributor's employer won't sign a disclaimer? You might have to take that code out again! You don't need papers for changes of a few lines here or there, since they are not significant for copyright purposes. Also, you don't need papers if all you get from the suggestion is some ideas, not actual code which you use. For example, if someone send you one implementation, but you write a different implementation of the same idea, you don't need to get papers. The very worst thing is if you forget to tell us about the other contributor. We could be very embarrassed in court some day as a result. We have more detailed advice for maintainers of programs; if you have reached the stage of actually maintaining a program for GNU (whether released or not), please ask us for a copy.  File: standards.info, Node: Trademarks, Prev: Contributions, Up: Legal Issues Trademarks ========== Please do not include any trademark acknowledgements in GNU software packages or documentation. Trademark acknowledgements are the statements that such-and-such is a trademark of so-and-so. The GNU Project has no objection to the basic idea of trademarks, but these acknowledgements feel like kowtowing, and there is no legal requirement for them, so we don't use them. What is legally required, as regards other people's trademarks, is to avoid using them in ways which a reader might reasonably understand as naming or labeling our own programs or activities. For example, since "Objective C" is (or at least was) a trademark, we made sure to say that we provide a "compiler for the Objective C language" rather than an "Objective C compiler". The latter would have been meant as a shorter way of saying the former, but it does not explicitly state the relationship, so it could be misinterpreted as using "Objective C" as a label for the compiler rather than for the language. Please don't use "win" as an abbreviation for Microsoft Windows in GNU software or documentation. In hacker terminology, calling something a "win" is a form of praise. If you wish to praise Microsoft Windows when speaking on your own, by all means do so, but not in GNU software. Usually we write the word "windows" in full, but when brevity is very important (as in file names and sometimes symbol names), we abbreviate it to "w". For instance, the files and functions in Emacs that deal with Windows start with `w32'.  File: standards.info, Node: Design Advice, Next: Program Behavior, Prev: Legal Issues, Up: Top General Program Design ********************** This node discusses some of the issues you should take into account when designing your program. * Menu: * Source Language:: Which languges to use. * Compatibility:: Compatibility with other implementations * Using Extensions:: Using non-standard features * Standard C:: Using Standard C features * Conditional Compilation:: Compiling Code Only If A Conditional is True  File: standards.info, Node: Source Language, Next: Compatibility, Up: Design Advice Which Languages to Use ====================== When you want to use a language that gets compiled and runs at high speed, the best language to use is C. Using another language is like using a non-standard feature: it will cause trouble for users. Even if GCC supports the other language, users may find it inconvenient to have to install the compiler for that other language in order to build your program. For example, if you write your program in C++, people will have to install the GNU C++ compiler in order to compile your program. C has one other advantage over C++ and other compiled languages: more people know C, so more people will find it easy to read and modify the program if it is written in C. So in general it is much better to use C, rather than the comparable alternatives. But there are two exceptions to that conclusion: * It is no problem to use another language to write a tool specifically intended for use with that language. That is because the only people who want to build the tool will be those who have installed the other language anyway. * If an application is of interest only to a narrow part of the community, then the question of which language it is written in has less effect on other people, so you may as well please yourself. Many programs are designed to be extensible: they include an interpreter for a language that is higher level than C. Often much of the program is written in that language, too. The Emacs editor pioneered this technique. The standard extensibility interpreter for GNU software is GUILE, which implements the language Scheme (an especially clean and simple dialect of Lisp). `http://www.gnu.org/software/guile/'. We don't reject programs written in other "scripting languages" such as Perl and Python, but using GUILE is very important for the overall consistency of the GNU system.  File: standards.info, Node: Compatibility, Next: Using Extensions, Prev: Source Language, Up: Design Advice Compatibility with Other Implementations ======================================== With occasional exceptions, utility programs and libraries for GNU should be upward compatible with those in Berkeley Unix, and upward compatible with Standard C if Standard C specifies their behavior, and upward compatible with POSIX if POSIX specifies their behavior. When these standards conflict, it is useful to offer compatibility modes for each of them. Standard C and POSIX prohibit many kinds of extensions. Feel free to make the extensions anyway, and include a `--ansi', `--posix', or `--compatible' option to turn them off. However, if the extension has a significant chance of breaking any real programs or scripts, then it is not really upward compatible. So you should try to redesign its interface to make it upward compatible. Many GNU programs suppress extensions that conflict with POSIX if the environment variable `POSIXLY_CORRECT' is defined (even if it is defined with a null value). Please make your program recognize this variable if appropriate. When a feature is used only by users (not by programs or command files), and it is done poorly in Unix, feel free to replace it completely with something totally different and better. (For example, `vi' is replaced with Emacs.) But it is nice to offer a compatible feature as well. (There is a free `vi' clone, so we offer it.) Additional useful features are welcome regardless of whether there is any precedent for them.  File: standards.info, Node: Using Extensions, Next: Standard C, Prev: Compatibility, Up: Design Advice Using Non-standard Features =========================== Many GNU facilities that already exist support a number of convenient extensions over the comparable Unix facilities. Whether to use these extensions in implementing your program is a difficult question. On the one hand, using the extensions can make a cleaner program. On the other hand, people will not be able to build the program unless the other GNU tools are available. This might cause the program to work on fewer kinds of machines. With some extensions, it might be easy to provide both alternatives. For example, you can define functions with a "keyword" `INLINE' and define that as a macro to expand into either `inline' or nothing, depending on the compiler. In general, perhaps it is best not to use the extensions if you can straightforwardly do without them, but to use the extensions if they are a big improvement. An exception to this rule are the large, established programs (such as Emacs) which run on a great variety of systems. Using GNU extensions in such programs would make many users unhappy, so we don't do that. Another exception is for programs that are used as part of compilation: anything that must be compiled with other compilers in order to bootstrap the GNU compilation facilities. If these require the GNU compiler, then no one can compile them without having them installed already. That would be extremely troublesome in certain cases.  File: standards.info, Node: Standard C, Next: Conditional Compilation, Prev: Using Extensions, Up: Design Advice Standard C and Pre-Standard C ============================= 1989 Standard C is widespread enough now that it is ok to use its features in new programs. There is one exception: do not ever use the "trigraph" feature of Standard C. 1999 Standard C is not widespread yet, so please do not require its features in programs. It is ok to use its features if they are present. However, it is easy to support pre-standard compilers in most programs, so if you know how to do that, feel free. If a program you are maintaining has such support, you should try to keep it working. To support pre-standard C, instead of writing function definitions in standard prototype form, int foo (int x, int y) ... write the definition in pre-standard style like this, int foo (x, y) int x, y; ... and use a separate declaration to specify the argument prototype: int foo (int, int); You need such a declaration anyway, in a header file, to get the benefit of prototypes in all the files where the function is called. And once you have the declaration, you normally lose nothing by writing the function definition in the pre-standard style. This technique does not work for integer types narrower than `int'. If you think of an argument as being of a type narrower than `int', declare it as `int' instead. There are a few special cases where this technique is hard to use. For example, if a function argument needs to hold the system type `dev_t', you run into trouble, because `dev_t' is shorter than `int' on some machines; but you cannot use `int' instead, because `dev_t' is wider than `int' on some machines. There is no type you can safely use on all machines in a non-standard definition. The only way to support non-standard C and pass such an argument is to check the width of `dev_t' using Autoconf and choose the argument type accordingly. This may not be worth the trouble. In order to support pre-standard compilers that do not recognize prototypes, you may want to use a preprocessor macro like this: /* Declare the prototype for a general external function. */ #if defined (__STDC__) || defined (WINDOWSNT) #define P_(proto) proto #else #define P_(proto) () #endif  File: standards.info, Node: Conditional Compilation, Prev: Standard C, Up: Design Advice Conditional Compilation ======================= When supporting configuration options already known when building your program we prefer using `if (... )' over conditional compilation, as in the former case the compiler is able to perform more extensive checking of all possible code paths. For example, please write if (HAS_FOO) ... else ... instead of: #ifdef HAS_FOO ... #else ... #endif A modern compiler such as GCC will generate exactly the same code in both cases, and we have been using similar techniques with good success in several projects. Of course, the former method assumes that `HAS_FOO' is defined as either 0 or 1. While this is not a silver bullet solving all portability problems, and is not always appropriate, following this policy would have saved GCC developers many hours, or even days, per year. In the case of function-like macros like `REVERSIBLE_CC_MODE' in GCC which cannot be simply used in `if( ...)' statements, there is an easy workaround. Simply introduce another macro `HAS_REVERSIBLE_CC_MODE' as in the following example: #ifdef REVERSIBLE_CC_MODE #define HAS_REVERSIBLE_CC_MODE 1 #else #define HAS_REVERSIBLE_CC_MODE 0 #endif  File: standards.info, Node: Program Behavior, Next: Writing C, Prev: Design Advice, Up: Top Program Behavior for All Programs ********************************* This node describes conventions for writing robust software. It also describes general standards for error messages, the command line interface, and how libraries should behave. * Menu: * Semantics:: Writing robust programs * Libraries:: Library behavior * Errors:: Formatting error messages * User Interfaces:: Standards about interfaces generally * Graphical Interfaces:: Standards for graphical interfaces * Command-Line Interfaces:: Standards for command line interfaces * Option Table:: Table of long options * Memory Usage:: When and how to care about memory needs * File Usage:: Which files to use, and where  File: standards.info, Node: Semantics, Next: Libraries, Up: Program Behavior Writing Robust Programs ======================= Avoid arbitrary limits on the length or number of _any_ data 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 only sensible exceptions would be utilities specifically intended for interface to certain types of terminals or printers that can't handle those characters. Whenever possible, try to make programs work properly with sequences of bytes that represent multibyte characters, using encodings such as UTF-8 and others. Check every system call for an error return, unless you know you wish to ignore errors. Include the system error text (from `perror' or equivalent) in _every_ error message resulting from a failing system call, as well as the name of the file if any and the name of the utility. Just "cannot open foo.c" or "stat failed" is not sufficient. Check every call to `malloc' or `realloc' to see if it returned zero. Check `realloc' even if you are making the block smaller; in a system that rounds block sizes to a power of 2, `realloc' may get a different block if you ask for less space. In Unix, `realloc' can destroy the storage block if it returns zero. GNU `realloc' does not have this bug: if it fails, the original block is unchanged. Feel free to assume the bug is fixed. If you wish to run your program on Unix, and wish to avoid lossage in this case, you can use the GNU `malloc'. You must expect `free' to alter the contents of the block that was freed. Anything you want to fetch from the block, you must fetch before calling `free'. If `malloc' fails in a noninteractive program, make that a fatal error. In an interactive program (one that reads commands from the user), it is better to abort the command and return to the command reader loop. This allows the user to kill other processes to free up virtual memory, and then try the command again. Use `getopt_long' to decode arguments, unless the argument syntax makes this unreasonable. When static storage is to be written in during program execution, use explicit C code to initialize it. Reserve C initialized declarations for data that will not be changed. Try to avoid low-level interfaces to obscure Unix data structures (such as file directories, utmp, or the layout of kernel memory), since these are less likely to work compatibly. If you need to find all the files in a directory, use `readdir' or some other high-level interface. These are supported compatibly by GNU. The preferred signal handling facilities are the BSD variant of `signal', and the POSIX `sigaction' function; the alternative USG `signal' interface is an inferior design. Nowadays, using the POSIX signal functions may be the easiest way to make a program portable. If you use `signal', then on GNU/Linux systems running GNU libc version 1, you should include `bsd/signal.h' instead of `signal.h', so as to get BSD behavior. It is up to you whether to support systems where `signal' has only the USG behavior, or give up on them. In error checks that detect "impossible" conditions, just abort. There is usually no point in printing any message. These checks indicate the existence of bugs. Whoever wants to fix the bugs will have to read the source code and run a debugger. So explain the problem with comments in the source. The relevant data will be in variables, which are easy to examine with the debugger, so there is no point moving them elsewhere. Do not use a count of errors as the exit status for a program. _That does not work_, because exit status values are limited to 8 bits (0 through 255). A single run of the program might have 256 errors; if you try to return 256 as the exit status, the parent process will see 0 as the status, and it will appear that the program succeeded. If you make temporary files, check the `TMPDIR' environment variable; if that variable is defined, use the specified directory instead of `/tmp'. In addition, be aware that there is a possible security problem when creating temporary files in world-writable directories. In C, you can avoid this problem by creating temporary files in this manner: fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600); or by using the `mkstemps' function from libiberty. In bash, use `set -C' to avoid this problem.  File: standards.info, Node: Libraries, Next: Errors, Prev: Semantics, Up: Program Behavior Library Behavior ================ Try to make library functions reentrant. If they need to do dynamic storage allocation, at least try to avoid any nonreentrancy aside from that of `malloc' itself. Here are certain name conventions for libraries, to avoid name conflicts. Choose a name prefix for the library, more than two characters long. All external function and variable names should start with this prefix. In addition, there should only be one of these in any given library member. This usually means putting each one in a separate source file. An exception can be made when two external symbols are always used together, so that no reasonable program could use one without the other; then they can both go in the same file. External symbols that are not documented entry points for the user should have names beginning with `_'. The `_' should be followed by the chosen name prefix for the library, to prevent collisions with other libraries. These can go in the same files with user entry points if you like. Static functions and variables can be used as you like and need not fit any naming convention.  File: standards.info, Node: Errors, Next: User Interfaces, Prev: Libraries, Up: Program Behavior Formatting Error Messages ========================= Error messages from compilers should look like this: SOURCE-FILE-NAME:LINENO: MESSAGE If you want to mention the column number, use one of these formats: SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE SOURCE-FILE-NAME:LINENO.COLUMN: MESSAGE Line numbers should start from 1 at the beginning of the file, and column numbers should start from 1 at the beginning of the line. (Both of these conventions are chosen for compatibility.) Calculate column numbers assuming that space and all ASCII printing characters have equal width, and assuming tab stops every 8 columns. The error message can also give both the starting and ending positions of the erroneous text. There are several formats so that you can avoid redundant information such as a duplicate line number. Here are the possible formats: SOURCE-FILE-NAME:LINENO-1.COLUMN-1-LINENO-2.COLUMN-2: MESSAGE SOURCE-FILE-NAME:LINENO-1.COLUMN-1-COLUMN-2: MESSAGE SOURCE-FILE-NAME:LINENO-1-LINENO-2: MESSAGE When an error is spread over several files, you can use this format: FILE-1:LINENO-1.COLUMN-1-FILE-2:LINENO-2.COLUMN-2: MESSAGE Error messages from other noninteractive programs should look like this: PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE when there is an appropriate source file, or like this: PROGRAM: MESSAGE when there is no relevant source file. If you want to mention the column number, use this format: PROGRAM:SOURCE-FILE-NAME:LINENO:COLUMN: MESSAGE In an interactive program (one that is reading commands from a terminal), it is better not to include the program name in an error message. The place to indicate which program is running is in the prompt or with the screen layout. (When the same program runs with input from a source other than a terminal, it is not interactive and would do best to print error messages using the noninteractive style.) The string MESSAGE should not begin with a capital letter when it follows a program name and/or file name, because that isn't the beginning of a sentence. (The sentence conceptually starts at the beginning of the line.) 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 end with a period.  File: standards.info, Node: User Interfaces, Next: Graphical Interfaces, Prev: Errors, Up: Program Behavior Standards for Interfaces Generally ================================== Please don't make the behavior of a utility depend on the name used to invoke it. It is useful sometimes to make a link to a utility with a different name, and that should not change what it does. Instead, use a run time option or a compilation switch or both to select among the alternate behaviors. Likewise, please don't make the behavior of the program depend on the type of output device it is used with. Device independence is an important principle of the system's design; do not compromise it merely to save someone from typing an option now and then. (Variation in error message syntax when using a terminal is ok, because that is a side issue that people do not depend on.) If you think one behavior is most useful when the output is to a terminal, and another is most useful when the output is a file or a pipe, then it is usually best to make the default behavior the one that is useful with output to a terminal, and have an option for the other behavior. Compatibility requires certain programs to depend on the type of output device. It would be disastrous if `ls' or `sh' did not do so in the way all users expect. In some of these cases, we supplement the program with a preferred alternate version that does not depend on the output device type. For example, we provide a `dir' program much like `ls' except that its default output format is always multi-column format.  File: standards.info, Node: Graphical Interfaces, Next: Command-Line Interfaces, Prev: User Interfaces, Up: Program Behavior Standards for Graphical Interfaces ================================== When you write a program that provides a graphical user interface, please make it work with X Windows and the GTK toolkit unless the functionality specifically requires some alternative (for example, "displaying jpeg images while in console mode"). In addition, please provide a command-line interface to control the functionality. (In many cases, the graphical user interface can be a separate program which invokes the command-line program.) This is so that the same jobs can be done from scripts. Please also consider providing a CORBA interface (for use from GNOME), a library interface (for use from C), and perhaps a keyboard-driven console interface (for use by users from console mode). Once you are doing the work to provide the functionality and the graphical interface, these won't be much extra work.  File: standards.info, Node: Command-Line Interfaces, Next: Option Table, Prev: Graphical Interfaces, Up: Program Behavior Standards for Command Line Interfaces ===================================== It is a good idea to follow the POSIX guidelines for the command-line options of a program. The easiest way to do this is to use `getopt' to parse them. Note that the GNU version of `getopt' will normally permit options anywhere among the arguments unless the special argument `--' is used. This is not what POSIX specifies; it is a GNU extension. Please define long-named options that are equivalent to the single-letter Unix-style options. We hope to make GNU more user friendly this way. This is easy to do with the GNU function `getopt_long'. One of the advantages of long-named options is that they can be consistent from program to program. For example, users should be able to expect the "verbose" option of any GNU program which has one, to be spelled precisely `--verbose'. To achieve this uniformity, look at the table of common long-option names when you choose the option names for your program (*note Option Table::). It is usually a good idea for file names given as ordinary arguments to be input files only; any output files would be specified using options (preferably `-o' or `--output'). Even if you allow an output file name as an ordinary argument for compatibility, try to provide an option as another way to specify it. This will lead to more consistency among GNU utilities, and fewer idiosyncracies for users to remember. All programs should support two standard options: `--version' and `--help'. CGI programs should accept these as command-line options, and also if given as the `PATH_INFO'; for instance, visiting in a browser should output the same information as inokving `p.cgi --help' from the command line. `--version' This option should direct the program to print information about its name, version, origin and legal status, all on standard output, and then exit successfully. Other options and arguments should be ignored once this is seen, and the program should not perform its normal function. The first line is meant to be easy for a program to parse; the version number proper starts after the last space. In addition, it contains the canonical name for this program, in this format: GNU Emacs 19.30 The program's name should be a constant string; _don't_ compute it from `argv[0]'. The idea is to state the standard or canonical name for the program, not its file name. There are other ways to find out the precise file name where a command is found in `PATH'. If the program is a subsidiary part of a larger package, mention the package name in parentheses, like this: emacsserver (GNU Emacs) 19.30 If the package has a version number which is different from this program's version number, you can mention the package version number just before the close-parenthesis. If you *need* to mention the version numbers of libraries which are distributed separately from the package which contains this program, you can do so by printing an additional line of version info for each library you want to mention. Use the same format for these lines as for the first line. Please do not mention all of the libraries that the program uses "just for completeness"--that would produce a lot of unhelpful clutter. Please mention library version numbers only if you find in practice that they are very important to you in debugging. The following line, after the version number line or lines, should be a copyright notice. If more than one copyright notice is called for, put each on a separate line. Next should follow a brief statement that the program is free software, and that users are free to copy and change it on certain conditions. If the program is covered by the GNU GPL, say so here. Also mention that there is no warranty, to the extent permitted by law. It is ok to finish the output with a list of the major authors of the program, as a way of giving credit. Here's an example of output that follows these rules: GNU Emacs 19.34.5 Copyright (C) 1996 Free Software Foundation, Inc. GNU Emacs comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. You should adapt this to your program, of course, filling in the proper year, copyright holder, name of program, and the references to distribution terms, and changing the rest of the wording as necessary. This copyright notice only needs to mention the most recent year in which changes were made--there's no need to list the years for previous versions' changes. You don't have to mention the name of the program in these notices, if that is inconvenient, since it appeared in the first line. Translations of the above lines must preserve the validity of the copyright notices (*note Internationalization::). If the translation's character set supports it, the `(C)' should be replaced with the copyright symbol, as follows: (the official copyright symbol, which is the letter C in a circle); Write the word "Copyright" exactly like that, in English. Do not translate it into another language. International treaties recognize the English word "Copyright"; translations into other languages do not have legal significance. `--help' This option should output brief documentation for how to invoke the program, on standard output, then exit successfully. Other options and arguments should be ignored once this is seen, and the program should not perform its normal function. Near the end of the `--help' option's output there should be a line that says where to mail bug reports. It should have this format: Report bugs to MAILING-ADDRESS.  File: standards.info, Node: Option Table, Next: Memory Usage, Prev: Command-Line Interfaces, Up: Program Behavior Table of Long Options ===================== Here is a table of long options used by GNU programs. It is surely incomplete, but we aim to list all the options that a new program might want to be compatible with. If you use names not already in the table, please send a list of them, with their meanings, so we can update the table. `after-date' `-N' in `tar'. `all' `-a' in `du', `ls', `nm', `stty', `uname', and `unexpand'. `all-text' `-a' in `diff'. `almost-all' `-A' in `ls'. `append' `-a' in `etags', `tee', `time'; `-r' in `tar'. `archive' `-a' in `cp'. `archive-name' `-n' in `shar'. `arglength' `-l' in `m4'. `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'. `background' For server programs, run in the background. `backward-search' `-B' in `ctags'. `basename' `-f' in `shar'. `batch' Used in GDB. `baud' Used in GDB. `before' `-b' in `tac'. `binary' `-b' in `cpio' and `diff'. `bits-per-code' `-b' in `shar'. `block-size' Used in `cpio' and `tar'. `blocks' `-b' in `head' and `tail'. `break-file' `-b' in `ptx'. `brief' Used in various programs to make output shorter. `bytes' `-c' in `head', `split', and `tail'. `c++' `-C' in `etags'. `catenate' `-A' in `tar'. `cd' Used in various programs to specify the directory to use. `changes' `-c' in `chgrp' and `chown'. `classify' `-F' in `ls'. `colons' `-c' in `recode'. `command' `-c' in `su'; `-x' in GDB. `compare' `-d' in `tar'. `compat' Used in `gawk'. `compress' `-Z' in `tar' and `shar'. `concatenate' `-A' in `tar'. `confirmation' `-w' in `tar'. `context' Used in `diff'. `copyleft' `-W copyleft' in `gawk'. `copyright' `-C' in `ptx', `recode', and `wdiff'; `-W copyright' in `gawk'. `core' Used in GDB. `count' `-q' in `who'. `count-links' `-l' in `du'. `create' Used in `tar' and `cpio'. `cut-mark' `-c' in `shar'. `cxref' `-x' in `ctags'. `date' `-d' in `touch'. `debug' `-d' in Make and `m4'; `-t' in Bison. `define' `-D' in `m4'. `defines' `-d' in Bison and `ctags'. `delete' `-D' in `tar'. `dereference' `-L' in `chgrp', `chown', `cpio', `du', `ls', and `tar'. `dereference-args' `-D' in `du'. `device' Specify an I/O device (special file name). `diacritics' `-d' in `recode'. `dictionary-order' `-d' in `look'. `diff' `-d' in `tar'. `digits' `-n' in `csplit'. `directory' Specify the directory to use, in various programs. In `ls', it means to show directories themselves rather than their contents. In `rm' and `ln', it means to not treat links to directories specially. `discard-all' `-x' in `strip'. `discard-locals' `-X' in `strip'. `dry-run' `-n' in Make. `ed' `-e' in `diff'. `elide-empty-files' `-z' in `csplit'. `end-delete' `-x' in `wdiff'. `end-insert' `-z' in `wdiff'. `entire-new-file' `-N' in `diff'. `environment-overrides' `-e' in Make. `eof' `-e' in `xargs'. `epoch' Used in GDB. `error-limit' Used in `makeinfo'. `error-output' `-o' in `m4'. `escape' `-b' in `ls'. `exclude-from' `-X' in `tar'. `exec' Used in GDB. `exit' `-x' in `xargs'. `exit-0' `-e' in `unshar'. `expand-tabs' `-t' in `diff'. `expression' `-e' in `sed'. `extern-only' `-g' in `nm'. `extract' `-i' in `cpio'; `-x' in `tar'. `faces' `-f' in `finger'. `fast' `-f' in `su'. `fatal-warnings' `-E' in `m4'. `file' `-f' in `info', `gawk', Make, `mt', and `tar'; `-n' in `sed'; `-r' in `touch'. `field-separator' `-F' in `gawk'. `file-prefix' `-b' in Bison. `file-type' `-F' in `ls'. `files-from' `-T' in `tar'. `fill-column' Used in `makeinfo'. `flag-truncation' `-F' in `ptx'. `fixed-output-files' `-y' in Bison. `follow' `-f' in `tail'. `footnote-style' Used in `makeinfo'. `force' `-f' in `cp', `ln', `mv', and `rm'. `force-prefix' `-F' in `shar'. `foreground' For server programs, run in the foreground; in other words, don't do anything special to run the server in the background. `format' Used in `ls', `time', and `ptx'. `freeze-state' `-F' in `m4'. `fullname' Used in GDB. `gap-size' `-g' in `ptx'. `get' `-x' in `tar'. `graphic' `-i' in `ul'. `graphics' `-g' in `recode'. `group' `-g' in `install'. `gzip' `-z' in `tar' and `shar'. `hashsize' `-H' in `m4'. `header' `-h' in `objdump' and `recode' `heading' `-H' in `who'. `help' Used to ask for brief usage information. `here-delimiter' `-d' in `shar'. `hide-control-chars' `-q' in `ls'. `html' In `makeinfo', output HTML. `idle' `-u' in `who'. `ifdef' `-D' in `diff'. `ignore' `-I' in `ls'; `-x' in `recode'. `ignore-all-space' `-w' in `diff'. `ignore-backups' `-B' in `ls'. `ignore-blank-lines' `-B' in `diff'. `ignore-case' `-f' in `look' and `ptx'; `-i' in `diff' and `wdiff'. `ignore-errors' `-i' in Make. `ignore-file' `-i' in `ptx'. `ignore-indentation' `-I' in `etags'. `ignore-init-file' `-f' in Oleo. `ignore-interrupts' `-i' in `tee'. `ignore-matching-lines' `-I' in `diff'. `ignore-space-change' `-b' in `diff'. `ignore-zeros' `-i' in `tar'. `include' `-i' in `etags'; `-I' in `m4'. `include-dir' `-I' in Make. `incremental' `-G' in `tar'. `info' `-i', `-l', and `-m' in Finger. `init-file' In some programs, specify the name of the file to read as the user's init file. `initial' `-i' in `expand'. `initial-tab' `-T' in `diff'. `inode' `-i' in `ls'. `interactive' `-i' in `cp', `ln', `mv', `rm'; `-e' in `m4'; `-p' in `xargs'; `-w' in `tar'. `intermix-type' `-p' in `shar'. `iso-8601' Used in `date' `jobs' `-j' in Make. `just-print' `-n' in Make. `keep-going' `-k' in Make. `keep-files' `-k' in `csplit'. `kilobytes' `-k' in `du' and `ls'. `language' `-l' in `etags'. `less-mode' `-l' in `wdiff'. `level-for-gzip' `-g' in `shar'. `line-bytes' `-C' in `split'. `lines' Used in `split', `head', and `tail'. `link' `-l' in `cpio'. `lint' `lint-old' Used in `gawk'. `list' `-t' in `cpio'; `-l' in `recode'. `list' `-t' in `tar'. `literal' `-N' in `ls'. `load-average' `-l' in Make. `login' Used in `su'. `machine' No listing of which programs already use this; someone should check to see if any actually do, and tell . `macro-name' `-M' in `ptx'. `mail' `-m' in `hello' and `uname'. `make-directories' `-d' in `cpio'. `makefile' `-f' in Make. `mapped' Used in GDB. `max-args' `-n' in `xargs'. `max-chars' `-n' in `xargs'. `max-lines' `-l' in `xargs'. `max-load' `-l' in Make. `max-procs' `-P' in `xargs'. `mesg' `-T' in `who'. `message' `-T' in `who'. `minimal' `-d' in `diff'. `mixed-uuencode' `-M' in `shar'. `mode' `-m' in `install', `mkdir', and `mkfifo'. `modification-time' `-m' in `tar'. `multi-volume' `-M' in `tar'. `name-prefix' `-a' in Bison. `nesting-limit' `-L' in `m4'. `net-headers' `-a' in `shar'. `new-file' `-W' in Make. `no-builtin-rules' `-r' in Make. `no-character-count' `-w' in `shar'. `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-lines' `-l' in Bison. `no-piping' `-P' in `shar'. `no-prof' `-e' in `gprof'. `no-regex' `-R' in `etags'. `no-sort' `-p' in `nm'. `no-splash' Don't print a startup splash screen. `no-split' Used in `makeinfo'. `no-static' `-a' in `gprof'. `no-time' `-E' in `gprof'. `no-timestamp' `-m' in `shar'. `no-validate' Used in `makeinfo'. `no-wait' Used in `emacsclient'. `no-warn' Used in various programs to inhibit warnings. `node' `-n' in `info'. `nodename' `-n' in `uname'. `nonmatching' `-f' in `cpio'. `nstuff' `-n' in `objdump'. `null' `-0' in `xargs'. `number' `-n' in `cat'. `number-nonblank' `-b' in `cat'. `numeric-sort' `-n' in `nm'. `numeric-uid-gid' `-n' in `cpio' and `ls'. `nx' Used in GDB. `old-archive' `-o' in `tar'. `old-file' `-o' in Make. `one-file-system' `-l' in `tar', `cp', and `du'. `only-file' `-o' in `ptx'. `only-prof' `-f' in `gprof'. `only-time' `-F' in `gprof'. `options' `-o' in `getopt', `fdlist', `fdmount', `fdmountd', and `fdumount'. `output' In various programs, specify the output file name. `output-prefix' `-o' in `shar'. `override' `-o' in `rm'. `overwrite' `-c' in `unshar'. `owner' `-o' in `install'. `paginate' `-l' in `diff'. `paragraph-indent' Used in `makeinfo'. `parents' `-p' in `mkdir' and `rmdir'. `pass-all' `-p' in `ul'. `pass-through' `-p' in `cpio'. `port' `-P' in `finger'. `portability' `-c' in `cpio' and `tar'. `posix' Used in `gawk'. `prefix-builtins' `-P' in `m4'. `prefix' `-f' in `csplit'. `preserve' Used in `tar' and `cp'. `preserve-environment' `-p' in `su'. `preserve-modification-time' `-m' in `cpio'. `preserve-order' `-s' in `tar'. `preserve-permissions' `-p' in `tar'. `print' `-l' in `diff'. `print-chars' `-L' in `cmp'. `print-data-base' `-p' in Make. `print-directory' `-w' in Make. `print-file-name' `-o' in `nm'. `print-symdefs' `-s' in `nm'. `printer' `-p' in `wdiff'. `prompt' `-p' in `ed'. `proxy' Specify an HTTP proxy. `query-user' `-X' in `shar'. `question' `-q' in Make. `quiet' 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'. `rcs' `-n' in `diff'. `re-interval' Used in `gawk'. `read-full-blocks' `-B' in `tar'. `readnow' Used in GDB. `recon' `-n' in Make. `record-number' `-R' in `tar'. `recursive' Used in `chgrp', `chown', `cp', `ls', `diff', and `rm'. `reference-limit' Used in `makeinfo'. `references' `-r' in `ptx'. `regex' `-r' in `tac' and `etags'. `release' `-r' in `uname'. `reload-state' `-R' in `m4'. `relocation' `-r' in `objdump'. `rename' `-r' in `cpio'. `replace' `-i' in `xargs'. `report-identical-files' `-s' in `diff'. `reset-access-time' `-a' in `cpio'. `reverse' `-r' in `ls' and `nm'. `reversed-ed' `-f' in `diff'. `right-side-defs' `-R' in `ptx'. `same-order' `-s' in `tar'. `same-permissions' `-p' in `tar'. `save' `-g' in `stty'. `se' Used in GDB. `sentence-regexp' `-S' in `ptx'. `separate-dirs' `-S' in `du'. `separator' `-s' in `tac'. `sequence' Used by `recode' to chose files or pipes for sequencing passes. `shell' `-s' in `su'. `show-all' `-A' in `cat'. `show-c-function' `-p' in `diff'. `show-ends' `-E' in `cat'. `show-function-line' `-F' in `diff'. `show-tabs' `-T' in `cat'. `silent' Used in many programs to inhibit the usual output. *Note:* every program accepting `--silent' should accept `--quiet' as a synonym. `size' `-s' in `ls'. `socket' Specify a file descriptor for a network server to use for its socket, instead of opening and binding a new socket. This provides a way to run, in a nonpriveledged process, a server that normally needs a reserved port number. `sort' Used in `ls'. `source' `-W source' in `gawk'. `sparse' `-S' in `tar'. `speed-large-files' `-H' in `diff'. `split-at' `-E' in `unshar'. `split-size-limit' `-L' in `shar'. `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'. `stop' `-S' in Make. `strict' `-s' in `recode'. `strip' `-s' in `install'. `strip-all' `-s' in `strip'. `strip-debug' `-S' in `strip'. `submitter' `-s' in `shar'. `suffix' `-S' in `cp', `ln', `mv'. `suffix-format' `-b' in `csplit'. `sum' `-s' in `gprof'. `summarize' `-s' in `du'. `symbolic' `-s' in `ln'. `symbols' Used in GDB and `objdump'. `synclines' `-s' in `m4'. `sysname' `-s' in `uname'. `tabs' `-t' in `expand' and `unexpand'. `tabsize' `-T' in `ls'. `terminal' `-T' in `tput' and `ul'. `-t' in `wdiff'. `text' `-a' in `diff'. `text-files' `-T' in `shar'. `time' Used in `ls' and `touch'. `timeout' Specify how long to wait before giving up on some operation. `to-stdout' `-O' in `tar'. `total' `-c' in `du'. `touch' `-t' in Make, `ranlib', and `recode'. `trace' `-t' in `m4'. `traditional' `-t' in `hello'; `-W traditional' in `gawk'; `-G' in `ed', `m4', and `ptx'. `tty' Used in GDB. `typedefs' `-t' in `ctags'. `typedefs-and-c++' `-T' in `ctags'. `typeset-mode' `-t' in `ptx'. `uncompress' `-z' in `tar'. `unconditional' `-u' in `cpio'. `undefine' `-U' in `m4'. `undefined-only' `-u' in `nm'. `update' `-u' in `cp', `ctags', `mv', `tar'. `usage' Used in `gawk'; same as `--help'. `uuencode' `-B' in `shar'. `vanilla-operation' `-V' in `shar'. `verbose' Print more information about progress. Many programs support this. `verify' `-W' in `tar'. `version' Print the version number. `version-control' `-V' in `cp', `ln', `mv'. `vgrind' `-v' in `ctags'. `volume' `-V' in `tar'. `what-if' `-W' in Make. `whole-size-limit' `-l' in `shar'. `width' `-w' in `ls' and `ptx'. `word-regexp' `-W' in `ptx'. `writable' `-T' in `who'. `zeros' `-z' in `gprof'.  File: standards.info, Node: Memory Usage, Next: File Usage, Prev: Option Table, Up: Program Behavior Memory Usage ============ If a program typically uses just a few meg of memory, don't bother making any effort to reduce memory usage. For example, if it is impractical for other reasons to operate on files more than a few meg long, it is reasonable to read entire input files into core to operate on them. However, for programs such as `cat' or `tail', that can usefully operate on very large files, it is important to avoid using a technique that would artificially limit the size of files it can handle. If a program works by lines and could be applied to arbitrary user-supplied input files, it should keep only a line in memory, because this is not very hard and users will want to be able to operate on input files that are bigger than will fit in core all at once. If your program creates complicated data structures, just make them in core and give a fatal error if `malloc' returns zero.  File: standards.info, Node: File Usage, Prev: Memory Usage, Up: Program Behavior File Usage ========== Programs should be prepared to operate when `/usr' and `/etc' are read-only file systems. Thus, if the program manages log files, lock files, backup files, score files, or any other files which are modified for internal purposes, these files should not be stored in `/usr' or `/etc'. There are two exceptions. `/etc' is used to store system configuration information; it is reasonable for a program to modify files in `/etc' when its job is to update the system configuration. Also, if the user explicitly asks to modify one file in a directory, it is reasonable for the program to store other files in the same directory.  File: standards.info, Node: Writing C, Next: Documentation, Prev: Program Behavior, Up: Top Making The Best Use of C ************************ This node provides advice on how best to use the C language when writing GNU software. * Menu: * Formatting:: Formatting Your Source Code * Comments:: Commenting Your Work * Syntactic Conventions:: Clean Use of C Constructs * Names:: Naming Variables, Functions, and Files * System Portability:: Portability between different operating systems * CPU Portability:: Supporting the range of CPU types * System Functions:: Portability and ``standard'' library functions * Internationalization:: Techniques for internationalization * Mmap:: How you can safely use `mmap'.  File: standards.info, Node: Formatting, Next: Comments, Up: Writing C Formatting Your Source Code =========================== It is important to put the open-brace that starts the body of a C function in column zero, and avoid putting any other open-brace or open-parenthesis or open-bracket in column zero. Several tools look for open-braces in column zero to find the beginnings of C functions. These tools will not work on code not formatted that way. It is also important for function definitions to start the name of the function in column zero. This helps people to search for function definitions, and may also help certain tools recognize them. Thus, the proper format is this: static char * concat (s1, s2) /* Name starts in column zero here */ char *s1, *s2; { /* Open brace in column zero here */ ... } or, if you want to use Standard C syntax, format the definition like this: static char * concat (char *s1, char *s2) { ... } In Standard C, if the arguments don't fit nicely on one line, split it like this: int lots_of_args (int an_integer, long a_long, short a_short, double a_double, float a_float) ... The rest of this section gives our recommendations for other aspects of C formatting style, which is also the default style of the `indent' program in version 1.2 and newer. It corresponds to the options -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob We don't think of these recommendations as requirements, because it causes no problems for users if two different programs have different formatting styles. But whatever style you use, please use it consistently, since a mixture of styles within one program tends to look ugly. If you are contributing changes to an existing program, please follow the style of that program. For the body of the function, our recommended style looks like this: if (x < foo (y, z)) haha = bar[4] + 5; else { while (z) { haha += foo (z, z); z--; } return ++x + bar (); } We find it easier to read a program when it has spaces before the open-parentheses and after the commas. Especially after the commas. When you split an expression into multiple lines, split it before an operator, not after one. Here is the right way: if (foo_this_is_long && bar > win (x, y, z) && remaining_condition) Try to avoid having two operators of different precedence at the same level of indentation. For example, don't write this: mode = (inmode[j] == VOIDmode || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j]) ? outmode[j] : inmode[j]); Instead, use extra parentheses so that the indentation shows the nesting: mode = ((inmode[j] == VOIDmode || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j]))) ? outmode[j] : inmode[j]); Insert extra parentheses so that Emacs will indent the code properly. For example, the following indentation looks nice if you do it by hand, v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000; but Emacs would alter it. Adding a set of parentheses produces something that looks equally nice, and which Emacs will preserve: v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000); Format do-while statements like this: do { a = foo (a); } while (a > 0); Please use formfeed characters (control-L) to divide the program into pages at logical places (but not within a function). It does not matter just how long the pages are, since they do not have to fit on a printed page. The formfeeds should appear alone on lines by themselves.  File: standards.info, Node: Comments, Next: Syntactic Conventions, Prev: Formatting, Up: Writing C 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 write the comments in a GNU program in English, because English is the one language that nearly all programmers in all countries can read. If you do not write English well, please write comments in English as well as you can, then ask other people to help rewrite them. If you can't write comments in English, please find someone to work with you and translate your comments into English. 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 */ #ifdef foo ... #endif /* foo */ but, by contrast, write the comments this way for a `#ifndef': #ifndef foo ... #else /* foo */ ... #endif /* foo */ #ifndef foo ... #endif /* not foo */  File: standards.info, Node: Syntactic Conventions, Next: Names, Prev: Comments, Up: Writing C Clean Use of C Constructs ========================= Please explicitly declare the types of all objects. For example, you should explicitly declare all arguments to functions, and you should declare functions to return `int' rather than omitting the `int'. Some programmers like to use the GCC `-Wall' option, and change the code whenever it issues a warning. If you want to do this, then do. Other programmers prefer not to use `-Wall', because it gives warnings for valid and legitimate code which they do not want to change. If you want to do this, then do. The compiler should be your servant, not your master. Declarations of external functions and functions to appear later in the source file should all go in one place near the beginning of the file (somewhere before the first function definition in the file), or else should go in a header file. Don't put `extern' declarations inside functions. It used to be common practice to use the same local variables (with names like `tem') over and over for different values within one function. Instead of doing this, it is better declare a separate local variable for each distinct purpose, and give it a name which is meaningful. This not only makes programs easier to understand, it also facilitates optimization by good compilers. You can also move the declaration of each local variable into the smallest scope that includes all its uses. This makes the program even cleaner. Don't use local variables or parameters that shadow global identifiers. Don't declare multiple variables in one declaration that spans lines. Start a new declaration on each line, instead. For example, instead of this: int foo, bar; write either this: int foo, bar; or this: int foo; int bar; (If they are global variables, each should have a comment preceding it anyway.) When you have an `if'-`else' statement nested in another `if' statement, always put braces around the `if'-`else'. Thus, never write like this: if (foo) if (bar) win (); else lose (); always like this: if (foo) { if (bar) win (); else lose (); } If you have an `if' statement nested inside of an `else' statement, either write `else if' on one line, like this, if (foo) ... else if (bar) ... with its `then'-part indented like the preceding `then'-part, or write the nested `if' within braces like this: if (foo) ... else { if (bar) ... } Don't declare both a structure tag and variables or typedefs in the same declaration. Instead, declare the structure tag separately and then use it to declare the variables or typedefs. Try to avoid assignments inside `if'-conditions. For example, don't write this: if ((foo = (char *) malloc (sizeof *foo)) == 0) fatal ("virtual memory exhausted"); instead, write this: foo = (char *) malloc (sizeof *foo); if (foo == 0) fatal ("virtual memory exhausted"); Don't make the program ugly to placate `lint'. Please don't insert any casts to `void'. Zero without a cast is perfectly fine as a null pointer constant, except when calling a varargs function.  File: standards.info, Node: Names, Next: System Portability, Prev: Syntactic Conventions, Up: Writing C Naming Variables, Functions, and Files ====================================== The names of global variables and functions in a program serve as comments of a sort. So don't choose terse names--instead, look for names that give useful information about the meaning of the variable or function. In a GNU program, names should be English, like other comments. Local variable names can be shorter, because they are used only within one context, where (presumably) comments explain their purpose. Try to limit your use of abbreviations in symbol names. It is ok to make a few abbreviations, explain what they mean, and then use them frequently, but don't use lots of obscure abbreviations. 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 upper case for macros and `enum' constants, and for name-prefixes that follow a uniform convention. For example, you should use names like `ignore_space_change_flag'; don't use names like `iCantReadThis'. Variables that indicate whether command-line options have been specified should be named after the meaning of the option, not after the option-letter. A comment should state both the exact meaning of the option and its letter. For example, /* Ignore changes in horizontal whitespace (-b). */ int ignore_space_change_flag; When you want to define names with constant integer values, use `enum' rather than `#define'. GDB knows about enumeration constants. You might want to make sure that none of the file names would conflict the files were loaded onto an MS-DOS file system which shortens the names. You can use the program `doschk' to test for this. Some GNU programs were designed to limit themselves to file names of 14 characters or less, to avoid file name conflicts if they are read into older System V systems. Please preserve this feature in the existing GNU programs that have it, but there is no need to do this in new GNU programs. `doschk' also reports file names longer than 14 characters.  File: standards.info, Node: System Portability, Next: CPU Portability, Prev: Names, Up: Writing C Portability between System Types ================================ In the Unix world, "portability" refers to porting to different Unix versions. For a GNU program, this kind of portability is desirable, but not paramount. The primary purpose of GNU software is to run on top of the GNU kernel, compiled with the GNU C compiler, on various types of CPU. So the kinds of portability that are absolutely necessary are quite limited. But it is important to support Linux-based GNU systems, since they are the form of GNU that is popular. Beyond that, it is good to support the other free operating systems (*BSD), and it is nice to support other Unix-like systems if you want to. Supporting a variety of Unix-like systems is desirable, although not paramount. It is usually not too hard, so you may as well do it. But you don't have to consider it an obligation, if it does turn out to be hard. The easiest way to achieve portability to most Unix-like systems is to use Autoconf. It's unlikely that your program needs to know more information about the host platform than Autoconf can provide, simply because most of the programs that need such knowledge have already been written. Avoid using the format of semi-internal data bases (e.g., directories) when there is a higher-level alternative (`readdir'). As for systems that are not like Unix, such as MSDOS, Windows, the Macintosh, VMS, and MVS, supporting them is often a lot of work. When that is the case, it is better to spend your time adding features that will be useful on GNU and GNU/Linux, rather than on supporting other incompatible systems. If you do support Windows, please do not abbreviate it as "win". In hacker terminology, calling something a "win" is a form of praise. You're free to praise Microsoft Windows on your own if you want, but please don't do this in GNU packages. Instead of abbreviating "Windows" to "un", you can write it in full or abbreviate it to "woe" or "w". In GNU Emacs, for instance, we use `w32' in file names of Windows-specific files, but the macro for Windows conditionals is called `WINDOWSNT'. It is a good idea to define the "feature test macro" `_GNU_SOURCE' when compiling your C files. When you compile on GNU or GNU/Linux, this will enable the declarations of GNU library extension functions, and that will usually give you a compiler error message if you define the same function names in some other way in your program. (You don't have to actually _use_ these functions, if you prefer to make the program more portable to other systems.) But whether or not you use these GNU extensions, you should avoid using their names for any other meanings. Doing so would make it hard to move your code into other GNU programs.  File: standards.info, Node: CPU Portability, Next: System Functions, Prev: System Portability, Up: Writing C Portability between CPUs ======================== Even GNU systems will differ because of differences among CPU types--for example, difference in byte ordering and alignment requirements. It is absolutely essential to handle these differences. However, don't make any effort to cater to the possibility that an `int' will be less than 32 bits. We don't support 16-bit machines in GNU. Similarly, don't make any effort to cater to the possibility that `long' will be smaller than predefined types like `size_t'. For example, the following code is ok: printf ("size = %lu\n", (unsigned long) sizeof array); printf ("diff = %ld\n", (long) (pointer2 - pointer1)); 1989 Standard C requires this to work, and we know of only one counterexample: 64-bit programs on Microsoft Windows IA-64. We will leave it to those who want to port GNU programs to that environment to figure out how to do it. Predefined file-size types like `off_t' are an exception: they are longer than `long' on many platforms, so code like the above won't work with them. One way to print an `off_t' value portably is to print its digits yourself, one by one. Don't assume that the address of an `int' object is also the address of its least-significant byte. This is false on big-endian machines. Thus, don't make the following mistake: int c; ... while ((c = getchar()) != EOF) write(file_descriptor, &c, 1); When calling functions, you need not worry about the difference between pointers of various types, or between pointers and integers. On most machines, there's no difference anyway. As for the few machines where there is a difference, all of them support Standard C prototypes, so you can use prototypes (perhaps conditionalized to be active only in Standard C) to make the code work on those systems. In certain cases, it is ok to pass integer and pointer arguments indiscriminately to the same function, and use no prototype on any system. For example, many GNU programs have error-reporting functions that pass their arguments along to `printf' and friends: error (s, a1, a2, a3) char *s; char *a1, *a2, *a3; { fprintf (stderr, "error: "); fprintf (stderr, s, a1, a2, a3); } In practice, this works on all machines, since a pointer is generally the widest possible kind of argument; it is much simpler than any "correct" alternative. Be sure _not_ to use a prototype for such functions. If you have decided to use Standard C, then you can instead define `error' using `stdarg.h', and pass the arguments along to `vfprintf'. Avoid casting pointers to integers if you can. Such casts greatly reduce portability, and in most programs they are easy to avoid. In the cases where casting pointers to integers is essential--such as, a Lisp interpreter which stores type information as well as an address in one word--you'll have to make explicit provisions to handle different word sizes. You will also need to make provision for systems in which the normal range of addresses you can get from `malloc' starts far away from zero.  File: standards.info, Node: System Functions, Next: Internationalization, Prev: CPU Portability, Up: Writing C Calling System Functions ======================== C implementations differ substantially. Standard C reduces but does not eliminate the incompatibilities; meanwhile, many GNU packages still support pre-standard compilers because this is not hard to do. This chapter gives recommendations for how to use the more-or-less standard C library functions to avoid unnecessary loss of portability. * Don't use the return value of `sprintf'. It returns the number of characters written on some systems, but not on all systems. * Be aware that `vfprintf' is not always available. * `main' should be declared to return type `int'. It should terminate either by calling `exit' or by returning the integer status code; make sure it cannot ever return an undefined value. * Don't declare system functions explicitly. Almost any declaration for a system function is wrong on some system. To minimize conflicts, leave it to the system header files to declare system functions. If the headers don't declare a function, let it remain undeclared. While it may seem unclean to use a function without declaring it, in practice this works fine for most system library functions on the systems where this really happens; thus, the disadvantage is only theoretical. By contrast, actual declarations have frequently caused actual conflicts. * If you must declare a system function, don't specify the argument types. Use an old-style declaration, not a Standard C prototype. The more you specify about the function, the more likely a conflict. * In particular, don't unconditionally declare `malloc' or `realloc'. Most GNU programs use those functions just once, in functions conventionally named `xmalloc' and `xrealloc'. These functions call `malloc' and `realloc', respectively, and check the results. Because `xmalloc' and `xrealloc' are defined in your program, you can declare them in other files without any risk of type conflict. On most systems, `int' is the same length as a pointer; thus, the calls to `malloc' and `realloc' work fine. For the few exceptional systems (mostly 64-bit machines), you can use *conditionalized* declarations of `malloc' and `realloc'--or put these declarations in configuration files specific to those systems. * The string functions require special treatment. Some Unix systems have a header file `string.h'; others have `strings.h'. Neither file name is portable. There are two things you can do: use Autoconf to figure out which file to include, or don't include either file. * If you don't include either strings file, you can't get declarations for the string functions from the header file in the usual way. That causes less of a problem than you might think. The newer standard string functions should be avoided anyway because many systems still don't support them. The string functions you can use are these: strcpy strncpy strcat strncat strlen strcmp strncmp strchr strrchr The copy and concatenate functions work fine without a declaration as long as you don't use their values. Using their values without a declaration fails on systems where the width of a pointer differs from the width of `int', and perhaps in other cases. It is trivial to avoid using their values, so do that. The compare functions and `strlen' work fine without a declaration on most systems, possibly all the ones that GNU software runs on. You may find it necessary to declare them *conditionally* on a few systems. The search functions must be declared to return `char *'. Luckily, there is no variation in the data type they return. But there is variation in their names. Some systems give these functions the names `index' and `rindex'; other systems use the names `strchr' and `strrchr'. Some systems support both pairs of names, but neither pair works on all systems. You should pick a single pair of names and use it throughout your program. (Nowadays, it is better to choose `strchr' and `strrchr' for new programs, since those are the standard names.) Declare both of those names as functions returning `char *'. On systems which don't support those names, define them as macros in terms of the other pair. For example, here is what to put at the beginning of your file (or in a header) if you want to use the names `strchr' and `strrchr' throughout: #ifndef HAVE_STRCHR #define strchr index #endif #ifndef HAVE_STRRCHR #define strrchr rindex #endif char *strchr (); char *strrchr (); Here we assume that `HAVE_STRCHR' and `HAVE_STRRCHR' are macros defined in systems where the corresponding functions exist. One way to get them properly defined is to use Autoconf.  File: standards.info, Node: Internationalization, Next: Mmap, Prev: System Functions, Up: Writing C Internationalization ==================== GNU has a library called GNU gettext that makes it easy to translate the messages in a program into various languages. You should use this library in every program. Use English for the messages as they appear in the program, and let gettext provide the way to translate them into other languages. Using GNU gettext involves putting a call to the `gettext' macro around each string that might need translation--like this: printf (gettext ("Processing file `%s'...")); This permits GNU gettext to replace the string `"Processing file `%s'..."' with a translated version. Once a program uses gettext, please make a point of writing calls to `gettext' when you add new strings that call for translation. Using GNU gettext in a package involves specifying a "text domain name" for the package. The text domain name is used to separate the translations for this package from the translations for other packages. Normally, the text domain name should be the same as the name of the package--for example, `fileutils' for the GNU file utilities. To enable gettext to work well, avoid writing code that makes assumptions about the structure of words or sentences. When you want the precise text of a sentence to vary depending on the data, use two or more alternative string constants each containing a complete sentences, rather than inserting conditionalized words or phrases into a single sentence framework. Here is an example of what not to do: printf ("%d file%s processed", nfiles, nfiles != 1 ? "s" : ""); The problem with that example is that it assumes that plurals are made by adding `s'. If you apply gettext to the format string, like this, printf (gettext ("%d file%s processed"), nfiles, nfiles != 1 ? "s" : ""); the message can use different words, but it will still be forced to use `s' for the plural. Here is a better way: printf ((nfiles != 1 ? "%d files processed" : "%d file processed"), nfiles); This way, you can apply gettext to each of the two strings independently: printf ((nfiles != 1 ? gettext ("%d files processed") : gettext ("%d file processed")), nfiles); This can be any method of forming the plural of the word for "file", and also handles languages that require agreement in the word for "processed". A similar problem appears at the level of sentence structure with this code: printf ("# Implicit rule search has%s been done.\n", f->tried_implicit ? "" : " not"); Adding `gettext' calls to this code cannot give correct results for all languages, because negation in some languages requires adding words at more than one place in the sentence. By contrast, adding `gettext' calls does the job straightfowardly if the code starts out like this: printf (f->tried_implicit ? "# Implicit rule search has been done.\n", : "# Implicit rule search has not been done.\n");  File: standards.info, Node: Mmap, Prev: Internationalization, Up: Writing C Mmap ==== Don't assume that `mmap' either works on all files or fails for all files. It may work on some files and fail on others. The proper way to use `mmap' is to try it on the specific file for which you want to use it--and if `mmap' doesn't work, fall back on doing the job in another way using `read' and `write'. The reason this precaution is needed is that the GNU kernel (the HURD) provides a user-extensible file system, in which there can be many different kinds of "ordinary files." Many of them support `mmap', but some do not. It is important to make programs handle all these kinds of files.  File: standards.info, Node: Documentation, Next: Managing Releases, Prev: Writing C, Up: Top Documenting Programs ******************** A GNU program should ideally come with full free documentation, adequate for both reference and tutorial purposes. If the package can be programmed or extended, the documentation should cover programming or extending it, as well as just using it. * Menu: * GNU Manuals:: Writing proper manuals. * Doc Strings and Manuals:: Compiling doc strings doesn't make a manual. * Manual Structure Details:: Specific structure conventions. * License for Manuals:: Writing the distribution terms for a manual. * Manual Credits:: Giving credit to documentation contributors. * Printed Manuals:: Mentioning the printed manual. * NEWS File:: NEWS files supplement manuals. * Change Logs:: Recording Changes * Man Pages:: Man pages are secondary. * Reading other Manuals:: How far you can go in learning from other manuals.  File: standards.info, Node: GNU Manuals, Next: Doc Strings and Manuals, Up: Documentation GNU Manuals =========== The preferred document format for the GNU system is the Texinfo formatting language. Every GNU package should (ideally) have documentation in Texinfo both for reference and for learners. Texinfo makes it possible to produce a good quality formatted book, using TeX, and to generate an Info file. It is also possible to generate HTML output from Texinfo source. See the Texinfo manual, either the hardcopy, or the on-line version available through `info' or the Emacs Info subsystem (`C-h i'). Nowadays some other formats such as Docbook and Sgmltexi can be converted automatically into Texinfo. It is ok to produce the Texinfo documentation by conversion this way, as long as it gives good results. Programmers often find it most natural to structure the documentation following the structure of the implementation, which they know. But this structure is not necessarily good for explaining how to use the program; it may be irrelevant and confusing for a user. At every level, from the sentences in a paragraph to the grouping of topics into separate manuals, the right way to structure documentation is according to the concepts and questions that a user will have in mind when reading it. Sometimes this structure of ideas matches the structure of the implementation of the software being documented--but often they are different. Often the most important part of learning to write good documentation is learning to notice when you are structuring the documentation like the implementation, and think about better alternatives. For example, each program in the GNU system probably ought to be documented in one manual; but this does not mean each program should have its own manual. That would be following the structure of the implementation, rather than the structure that helps the user understand. Instead, each manual should cover a coherent _topic_. For example, instead of a manual for `diff' and a manual for `diff3', we have one manual for "comparison of files" which covers both of those programs, as well as `cmp'. By documenting these programs together, we can make the whole subject clearer. The manual which discusses a program should certainly 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 questions that a user will ask when thinking about the job that the program does. Don't just tell the reader what each feature can do--say what jobs it is good for, and show how to use it for those jobs. Explain what is recommended usage, and what kinds of usage users should avoid. 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. The Bison manual is a good example of this--please take a look at it to see what we mean. That is not as hard as it first sounds. 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. To serve as a reference, a manual should have an Index that list all the functions, variables, options, and important concepts that are part of the program. One combined Index should do for a short manual, but sometimes for a complex package it is better to use multiple indices. The Texinfo manual includes advice on preparing good index entries, see *Note Making Index Entries: (texinfo)Index Entries, and see *Note Defining the Entries of an Index: (texinfo)Indexing Commands. Don't use Unix man pages as a model for how to write GNU documentation; most of them are terse, badly structured, and give inadequate explanation of the underlying concepts. (There are, of course, some exceptions.) Also, Unix man pages use a particular format which is different from what we use in GNU manuals. Please include an email address in the manual for where to report bugs _in the text of the manual_. 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 directory names. Please do not use the term "illegal" to refer to erroneous input to a computer program. Please use "invalid" for this, and reserve the term "illegal" for activities prohibited by law.  File: standards.info, Node: Doc Strings and Manuals, Next: Manual Structure Details, Prev: GNU Manuals, Up: Documentation Doc Strings and Manuals ======================= Some programming systems, such as Emacs, provide a documentation string for each function, command or variable. You may be tempted to write a reference manual by compiling the documentation strings and writing a little additional text to go around them--but you must not do it. That approach is a fundamental mistake. The text of well-written documentation strings will be entirely wrong for a manual. A documentation string needs to stand alone--when it appears on the screen, there will be no other text to introduce or explain it. Meanwhile, it can be rather informal in style. The text describing a function or variable in a manual must not stand alone; it appears in the context of a section or subsection. Other text at the beginning of the section should explain some of the concepts, and should often make some general points that apply to several functions or variables. The previous descriptions of functions and variables in the section will also have given information about the topic. A description written to stand alone would repeat some of that information; this redundance looks bad. Meanwhile, the informality that is acceptable in a documentation string is totally unacceptable in a manual. The only good way to use documentation strings in writing a good manual is to use them as a source of information for writing good text.  File: standards.info, Node: Manual Structure Details, Next: License for Manuals, Prev: Doc Strings and Manuals, Up: Documentation Manual Structure Details ======================== The title page of the manual should state the version of the programs or packages documented in the manual. The Top node of the manual should also contain this information. If the manual is changing more frequently than or independent of the program, also state a version number for the manual in both of these places. Each program documented in the manual should have a node named `PROGRAM Invocation' or `Invoking PROGRAM'. This node (together with its subnodes, if any) should describe the program's command line arguments and how to run it (the sort of information people would look in a man page for). Start with an `@example' containing a template for all the options and arguments that the program uses. Alternatively, put a menu item in some menu whose item name fits one of the above patterns. This identifies the node which that item points to as the node for this purpose, regardless of the node's actual name. The `--usage' feature of the Info reader looks for such a node or menu item in order to find the relevant text, so it is essential for every Texinfo file to have one. If one manual describes several programs, it should have such a node for each program described in the manual.  File: standards.info, Node: License for Manuals, Next: Manual Credits, Prev: Manual Structure Details, Up: Documentation License for Manuals =================== Please use the GNU Free Documentation License for all GNU manuals that are more than a few pages long. Likewise for a collection of short documents--you only need one copy of the GNU FDL for the whole collection. For a single short document, you can use a very permissive non-copyleft license, to avoid taking up space with a long license. See `http://www.gnu.org/copyleft/fdl-howto.html' for more explanation of how to employ the GFDL. Note that it is not obligatory to include a copy of the GNU GPL or GNU LGPL in a manual whose license is neither the GPL nor the LGPL. It can be a good idea to include the program's license in a large manual; in a short manual, whose size would be increased considerably by including the program's license, it is probably better not to include it.  File: standards.info, Node: Manual Credits, Next: Printed Manuals, Prev: License for Manuals, Up: Documentation Manual Credits ============== Please credit the principal human writers of the manual as the authors, on the title page of the manual. If a company sponsored the work, thank the company in a suitable place in the manual, but do not cite the company as an author.  File: standards.info, Node: Printed Manuals, Next: NEWS File, Prev: Manual Credits, Up: Documentation Printed Manuals =============== The FSF publishes some GNU manuals in printed form. To encourage sales of these manuals, the on-line versions of the manual should mention at the very start that the printed manual is available and should point at information for getting it--for instance, with a link to the page . This should not be included in the printed manual, though, because there it is redundant. It is also useful to explain in the on-line forms of the manual how the user can print out the manual from the sources.  File: standards.info, Node: NEWS File, Next: Change Logs, Prev: Printed Manuals, 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 the version they pertain to. Don't discard old items; leave them in the file after the newer items. This way, a user upgrading from any previous version can see what is new. If the `NEWS' file gets very long, move some of the older items into a file named `ONEWS' and put a note at the end referring the user to that file.  File: standards.info, Node: Change Logs, Next: Man Pages, Prev: NEWS File, Up: Documentation Change Logs =========== Keep a change log to describe all the changes made to program source files. The purpose of this is so that people investigating bugs in the future will know about the changes that might have introduced the bug. Often a new bug can be found by looking at what was recently changed. More importantly, change logs can help you eliminate conceptual inconsistencies between different parts of a program, by giving you a history of how the conflicting concepts arose and who they came from. * Menu: * Change Log Concepts:: * Style of Change Logs:: * Simple Changes:: * Conditional Changes:: * Indicating the Part Changed::  File: standards.info, Node: Change Log Concepts, Next: Style of Change Logs, Up: Change Logs Change Log Concepts ------------------- You can think of the change log as a conceptual "undo list" which explains how earlier versions were different from the current version. People can see the current version; they don't need the change log to tell them what is in it. What they want from a change log is a clear explanation of how the earlier version differed. The change log file is normally called `ChangeLog' and covers an entire directory. Each directory can have its own change log, or a directory can use the change log of its parent directory-it's up to you. Another alternative is to record change log information with a version control system such as RCS or CVS. This can be converted automatically to a `ChangeLog' file using `rcs2log'; in Emacs, the command `C-x v a' (`vc-update-change-log') does the job. There's no need to describe the full purpose of the changes or how they work together. If you think that a change calls for explanation, you're probably right. Please do explain it--but please put the explanation in comments in the code, where people will see it whenever they see the code. For example, "New function" is enough for the change log when you add a function, because there should be a comment before the function definition to explain what it does. In the past, we recommended not mentioning changes in non-software files (manuals, help files, etc.) in change logs. However, we've been advised that it is a good idea to include them, for the sake of copyright records. However, sometimes it is useful to write one line to describe the overall purpose of a batch of changes. The easiest way to add an entry to `ChangeLog' is with the Emacs command `M-x add-change-log-entry'. An entry should have an asterisk, the name of the changed file, and then in parentheses the name of the changed functions, variables or whatever, followed by a colon. Then describe the changes you made to that function or variable.  File: standards.info, Node: Style of Change Logs, Next: Simple Changes, Prev: Change Log Concepts, Up: Change Logs Style of Change Logs -------------------- Here are some simple examples of change log entries, starting with the header line that says who made the change and when it was installed, followed by descriptions of specific changes. (These examples are drawn from Emacs and GCC.) 1998-08-17 Richard Stallman * register.el (insert-register): Return nil. (jump-to-register): Likewise. * sort.el (sort-subr): Return nil. * tex-mode.el (tex-bibtex-file, tex-file, tex-region): Restart the tex shell if process is gone or stopped. (tex-shell-running): New function. * expr.c (store_one_arg): Round size up for move_block_to_reg. (expand_call): Round up when emitting USE insns. * stmt.c (assign_parms): Round size up for move_block_from_reg. It's important to name the changed function or variable in full. Don't abbreviate function or variable names, and don't combine them. Subsequent maintainers will often search for a function name to find all the change log entries that pertain to it; if you abbreviate the name, they won't find it when they search. For example, some people are tempted to abbreviate groups of function names by writing `* register.el ({insert,jump-to}-register)'; this is not a good idea, since searching for `jump-to-register' or `insert-register' would not find that entry. Separate unrelated change log entries with blank lines. When two entries represent parts of the same change, so that they work together, then don't put blank lines between them. Then you can omit the file name and the asterisk when successive entries are in the same file. Break long lists of function names by closing continued lines with `)', rather than `,', and opening the continuation with `(' as in this example: * keyboard.c (menu_bar_items, tool_bar_items) (Fexecute_extended_command): Deal with `keymap' property. When you install someone else's changes, put the contributor's name in the change log entry rather than in the text of the entry. In other words, write this: 2002-07-14 John Doe * sewing.c: Make it sew. rather than this: 2002-07-14 Usual Maintainer * sewing.c: Make it sew. Patch by jdoe@gnu.org. As for the date, that should be the date you applied the change.  File: standards.info, Node: Simple Changes, Next: Conditional Changes, Prev: Style of Change Logs, Up: Change Logs Simple Changes -------------- Certain simple kinds of changes don't need much detail in the change log. When you change the calling sequence of a function in a simple fashion, and you change all the callers of the function to use the new calling sequence, there is no need to make individual entries for all the callers that you changed. Just write in the entry for the function being called, "All callers changed"--like this: * keyboard.c (Fcommand_execute): New arg SPECIAL. All callers changed. When you change just comments or doc strings, it is enough to write an entry for the file, without mentioning the functions. Just "Doc fixes" is enough for the change log. There's no technical need to make change log entries for documentation files. This is because documentation is not susceptible to bugs that are hard to fix. Documentation does not consist of parts that must interact in a precisely engineered fashion. To correct an error, you need not know the history of the erroneous passage; it is enough to compare what the documentation says with the way the program actually works. However, you should keep change logs for documentation files when the project gets copyright assignments from its contributors, so as to make the records of authorship more accurate.  File: standards.info, Node: Conditional Changes, Next: Indicating the Part Changed, Prev: Simple Changes, Up: Change Logs Conditional Changes ------------------- C programs often contain compile-time `#if' conditionals. Many changes are conditional; sometimes you add a new definition which is entirely contained in a conditional. It is very useful to indicate in the change log the conditions for which the change applies. Our convention for indicating conditional changes is to use square brackets around the name of the condition. Here is a simple example, describing a change which is conditional but does not have a function or entity name associated with it: * xterm.c [SOLARIS2]: Include string.h. Here is an entry describing a new definition which is entirely conditional. This new definition for the macro `FRAME_WINDOW_P' is used only when `HAVE_X_WINDOWS' is defined: * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. Here is an entry for a change within the function `init_display', whose definition as a whole is unconditional, but the changes themselves are contained in a `#ifdef HAVE_LIBNCURSES' conditional: * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. Here is an entry for a change that takes affect only when a certain macro is _not_ defined: (gethostname) [!HAVE_SOCKETS]: Replace with winsock version.  File: standards.info, Node: Indicating the Part Changed, Prev: Conditional Changes, Up: Change Logs Indicating the Part Changed --------------------------- Indicate the part of a function which changed by using angle brackets enclosing an indication of what the changed part does. Here is an entry for a change in the part of the function `sh-while-getopts' that deals with `sh' commands: * progmodes/sh-script.el (sh-while-getopts) : Handle case that user-specified option string is empty.  File: standards.info, Node: Man Pages, Next: Reading other Manuals, Prev: Change Logs, Up: Documentation Man Pages ========= In the GNU project, man pages are secondary. It is not necessary or expected for every GNU program to have a man page, but some of them do. It's your choice whether to include a man page in your program. When you make this decision, consider that supporting a man page requires continual effort each time the program is changed. The time you spend on the man page is time taken away from more useful work. For a simple program which changes little, updating the man page may be a small job. Then there is little reason not to include a man page, if you have one. For a large program that changes a great deal, updating a man page may be a substantial burden. If a user offers to donate a man page, you may find this gift costly to accept. It may be better to refuse the man page unless the same person agrees to take full responsibility for maintaining it--so that you can wash your hands of it entirely. If this volunteer later ceases to do the job, then don't feel obliged to pick it up yourself; it may be better to withdraw the man page from the distribution until someone else agrees to update it. When a program changes only a little, you may feel that the discrepancies are small enough that the man page remains useful without updating. If so, put a prominent note near the beginning of the man page explaining that you don't maintain it and that the Texinfo manual is more authoritative. The note should say how to access the Texinfo documentation.  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.  File: standards.info, Node: Managing Releases, Next: References, Prev: Documentation, Up: Top The Release Process ******************* Making a release is more than just bundling up your source files in a tar file and putting it up for FTP. You should set up your software so that it can be configured to run on a variety of systems. Your Makefile should conform to the GNU standards described below, and your directory layout should also conform to the standards discussed below. Doing so makes it easy to include your package into the larger framework of all GNU software. * Menu: * Configuration:: How Configuration Should Work * Makefile Conventions:: Makefile Conventions * Releases:: Making Releases  File: standards.info, Node: Configuration, Next: Makefile Conventions, Up: Managing Releases How Configuration Should Work ============================= Each GNU distribution should come with a shell script named `configure'. This script is given arguments which describe the kind of machine and system you want to compile the program for. The `configure' script must record the configuration options so that they affect compilation. One way to do this is to make a link from a standard name such as `config.h' to the proper configuration file for the chosen system. If you use this technique, the distribution should _not_ contain a file named `config.h'. This is so that people won't be able to build the program without configuring it first. Another thing that `configure' can do is to edit the Makefile. If you do this, the distribution should _not_ contain a file named `Makefile'. Instead, it should include a file `Makefile.in' which contains the input used for editing. Once again, this is so that people won't be able to build the program without configuring it first. If `configure' does write the `Makefile', then `Makefile' should have a target named `Makefile' which causes `configure' to be rerun, setting up the same configuration that was set up last time. The files that `configure' reads should be listed as dependencies of `Makefile'. All the files which are output from the `configure' script should have comments at the beginning explaining that they were generated automatically using `configure'. This is so that users won't think of trying to edit them by hand. The `configure' script should write a file named `config.status' which describes which configuration options were specified when the program was last configured. This file should be a shell script which, if run, will recreate the same configuration. The `configure' script should accept an option of the form `--srcdir=DIRNAME' to specify the directory where sources are found (if it is not the current directory). This makes it possible to build the program in a separate directory, so that the actual source directory is not modified. If the user does not specify `--srcdir', then `configure' should check both `.' and `..' to see if it can find the sources. If it finds the sources in one of these places, it should use them from there. Otherwise, it should report that it cannot find the sources, and should exit with nonzero status. Usually the easy way to support `--srcdir' is by editing a definition of `VPATH' into the Makefile. Some rules may need to refer explicitly to the specified source directory. To make this possible, `configure' can add to the Makefile a variable named `srcdir' whose value is precisely the specified directory. The `configure' script should also take an argument which specifies the type of system to build the program for. This argument should look like this: CPU-COMPANY-SYSTEM For example, an Athlon-based GNU/Linux system might be `i686-pc-linux-gnu'. The `configure' script needs to be able to decode all plausible alternatives for how to describe a machine. Thus, `athlon-pc-gnu/linux' would be a valid alias. There is a shell script called `config.sub' (ftp://ftp.gnu.org/gnu/config/config.sub) that you can use as a subroutine to validate system types and canonicalize aliases. The `configure' script should also take the option `--build=BUILDTYPE', which should be equivalent to a plain BUILDTYPE argument. For example, `configure --build=i686-pc-linux-gnu' is equivalent to `configure i686-pc-linux-gnu'. When the build type is not specified by an option or argument, the `configure' script should normally guess it using the shell script `config.guess' (ftp://ftp.gnu.org/gnu/config/config.guess). Other options are permitted to specify in more detail the software or hardware present on the machine, and include or exclude optional parts of the package: `--enable-FEATURE[=PARAMETER]' Configure the package to build and install an optional user-level facility called FEATURE. This allows users to choose which optional features to include. Giving an optional PARAMETER of `no' should omit FEATURE, if it is built by default. No `--enable' option should *ever* cause one feature to replace another. No `--enable' option should ever substitute one useful behavior for another useful behavior. The only proper use for `--enable' is for questions of whether to build part of the program or exclude it. `--with-PACKAGE' The package PACKAGE will be installed, so configure this package to work with PACKAGE. Possible values of PACKAGE include `gnu-as' (or `gas'), `gnu-ld', `gnu-libc', `gdb', `x', and `x-toolkit'. Do not use a `--with' option to specify the file name to use to find certain files. That is outside the scope of what `--with' options are for. All `configure' scripts should accept all of these "detail" options, whether or not they make any difference to the particular package at hand. In particular, they should accept any option that starts with `--with-' or `--enable-'. This is so users will be able to configure an entire GNU source tree at once with a single set of options. You will note that the categories `--with-' and `--enable-' are narrow: they *do not* provide a place for any sort of option you might think of. That is deliberate. We want to limit the possible configuration options in GNU software. We do not want GNU programs to have idiosyncratic configuration options. Packages that perform part of the compilation process may support cross-compilation. In such a case, the host and target machines for the program may be different. The `configure' script should normally treat the specified type of system as both the host and the target, thus producing a program which works for the same type of machine that it runs on. To compile a program to run on a host type that differs from the build type, use the configure option `--host=HOSTTYPE', where HOSTTYPE uses the same syntax as BUILDTYPE. The host type normally defaults to the build type. To configure a cross-compiler, cross-assembler, or what have you, you should specify a target different from the host, using the configure option `--target=TARGETTYPE'. The syntax for TARGETTYPE is the same as for the host type. So the command would look like this: ./configure --host=HOSTTYPE --target=TARGETTYPE The target type normally defaults to the host type. Programs for which cross-operation is not meaningful need not accept the `--target' option, because configuring an entire operating system for cross-operation is not a meaningful operation. Some programs have ways of configuring themselves automatically. If your program is set up to do this, your `configure' script can simply ignore most of its arguments.  File: standards.info, Node: Makefile Conventions, Next: Releases, Prev: Configuration, Up: Managing Releases Makefile Conventions ==================== This node describes conventions for writing the Makefiles for GNU programs. Using Automake will help you write a Makefile that follows these conventions. * Menu: * Makefile Basics:: General Conventions for Makefiles * Utilities in Makefiles:: Utilities in Makefiles * Command Variables:: Variables for Specifying Commands * Directory Variables:: Variables for Installation Directories * Standard Targets:: Standard Targets for Users * Install Command Categories:: Three categories of commands in the `install' rule: normal, pre-install and post-install.  File: standards.info, Node: Makefile Basics, Next: Utilities in Makefiles, Up: Makefile Conventions General Conventions for Makefiles --------------------------------- Every Makefile should contain this line: SHELL = /bin/sh to avoid trouble on systems where the `SHELL' variable might be inherited from the environment. (This is never a problem with GNU `make'.) Different `make' programs have incompatible suffix lists and implicit rules, and this sometimes creates confusion or misbehavior. So it is a good idea to set the suffix list explicitly using only the suffixes you need in the particular Makefile, like this: .SUFFIXES: .SUFFIXES: .c .o The first line clears out the suffix list, the second introduces all suffixes which may be subject to implicit rules in this Makefile. Don't assume that `.' is in the path for command execution. When you need to run programs that are a part of your package during the make, please make sure that it uses `./' if the program is built as part of the make or `$(srcdir)/' if the file is an unchanging part of the source code. Without one of these prefixes, the current search path is used. The distinction between `./' (the "build directory") and `$(srcdir)/' (the "source directory") is important because users can build in a separate directory using the `--srcdir' option to `configure'. A rule of the form: foo.1 : foo.man sedscript sed -e sedscript foo.man > foo.1 will fail when the build directory is not the source directory, because `foo.man' and `sedscript' are in the source directory. When using GNU `make', relying on `VPATH' to find the source file will work in the case where there is a single dependency file, since the `make' automatic variable `$<' will represent the source file wherever it is. (Many versions of `make' set `$<' only in implicit rules.) A Makefile target like foo.o : bar.c $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o should instead be written as foo.o : bar.c $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@ in order to allow `VPATH' to work correctly. When the target has multiple dependencies, using an explicit `$(srcdir)' is the easiest way to make the rule work well. For example, the target above for `foo.1' is best written as: foo.1 : foo.man sedscript sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@ GNU distributions usually contain some files which are not source files--for example, Info files, and the output from Autoconf, Automake, Bison or Flex. Since these files normally appear in the source directory, they should always appear in the source directory, not in the build directory. So Makefile rules to update them should put the updated files in the source directory. However, if a file does not appear in the distribution, then the Makefile should not put it in the source directory, because building a program in ordinary circumstances should not modify the source directory in any way. Try to make the build and installation targets, at least (and all their subtargets) work correctly with a parallel `make'.  File: standards.info, Node: Utilities in Makefiles, Next: Command Variables, Prev: Makefile Basics, Up: Makefile Conventions Utilities in Makefiles ---------------------- Write the Makefile commands (and any shell scripts, such as `configure') to run in `sh', not in `csh'. Don't use any special features of `ksh' or `bash'. The `configure' script and the Makefile rules for building and installation should not use any utilities directly except these: cat cmp cp diff echo egrep expr false grep install-info ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true The compression program `gzip' can be used in the `dist' rule. Stick to the generally supported options for these programs. For example, don't use `mkdir -p', convenient as it may be, because most systems don't support it. It is a good idea to avoid creating symbolic links in makefiles, since a few systems don't support them. The Makefile rules for building and installation can also use compilers and related programs, but should do so via `make' variables so that the user can substitute alternatives. Here are some of the programs we mean: ar bison cc flex install ld ldconfig lex make makeinfo ranlib texi2dvi yacc Use the following `make' variables to run those programs: $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) When you use `ranlib' or `ldconfig', you should make sure nothing bad happens if the system does not have the program in question. Arrange to ignore an error from that command, and print a message before the command to tell the user that failure of this command does not mean a problem. (The Autoconf `AC_PROG_RANLIB' macro can help with this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. Additional utilities that can be used via Make variables are: chgrp chmod chown mknod It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist.  File: standards.info, Node: Command Variables, Next: Directory Variables, Prev: Utilities in Makefiles, Up: Makefile Conventions Variables for Specifying Commands --------------------------------- Makefiles should provide variables for overriding certain commands, options, and so on. In particular, you should run most utility programs via variables. Thus, if you use Bison, have a variable named `BISON' whose default value is set with `BISON = bison', and refer to it with `$(BISON)' whenever you need to use Bison. File management utilities such as `ln', `rm', `mv', and so on, need not be referred to through variables in this way, since users don't need to replace them with other programs. Each program-name variable should come with an options variable that is used to supply options to the program. Append `FLAGS' to the program-name variable name to get the options variable name--for example, `BISONFLAGS'. (The names `CFLAGS' for the C compiler, `YFLAGS' for yacc, and `LFLAGS' for lex, are exceptions to this rule, but we keep them because they are standard.) Use `CPPFLAGS' in any compilation command that runs the preprocessor, and use `LDFLAGS' in any compilation command that does linking as well as in any direct use of `ld'. If there are C compiler options that _must_ be used for proper compilation of certain files, do not include them in `CFLAGS'. Users expect to be able to specify `CFLAGS' freely themselves. Instead, arrange to pass the necessary options to the C compiler independently of `CFLAGS', by writing them explicitly in the compilation commands or by defining an implicit rule, like this: CFLAGS = -g ALL_CFLAGS = -I. $(CFLAGS) .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< Do include the `-g' option in `CFLAGS', because that is not _required_ for proper compilation. You can consider it a default that is only recommended. If the package is set up so that it is compiled with GCC by default, then you might as well include `-O' in the default value of `CFLAGS' as well. Put `CFLAGS' last in the compilation command, after other variables containing compiler options, so the user can use `CFLAGS' to override the others. `CFLAGS' should be used in every invocation of the C compiler, both those which do compilation and those which do linking. Every Makefile should define the variable `INSTALL', which is the basic command for installing a file into the system. Every Makefile should also define the variables `INSTALL_PROGRAM' and `INSTALL_DATA'. (The default for `INSTALL_PROGRAM' should be `$(INSTALL)'; the default for `INSTALL_DATA' should be `${INSTALL} -m 644'.) Then it should use those variables as the commands for actual installation, for executables and nonexecutables respectively. Use these variables as follows: $(INSTALL_PROGRAM) foo $(bindir)/foo $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a Optionally, you may prepend the value of `DESTDIR' to the target filename. Doing this allows the installer to create a snapshot of the installation to be copied onto the real target filesystem later. Do not set the value of `DESTDIR' in your Makefile, and do not include it in any installed files. With support for `DESTDIR', the above examples become: $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a Always use a file name, not a directory name, as the second argument of the installation commands. Use a separate command for each file to be installed.  File: standards.info, Node: Directory Variables, Next: Standard Targets, Prev: Command Variables, Up: Makefile Conventions Variables for Installation Directories -------------------------------------- Installation directories should always be named by variables, so it is easy to install in a nonstandard place. The standard names for these variables are described below. They are based on a standard filesystem layout; variants of it are used in SVR4, 4.4BSD, GNU/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, and nothing should be directly installed into these two directories. `prefix' A prefix used in constructing the default values of the variables listed below. The default value of `prefix' should be `/usr/local'. When building the complete GNU system, the prefix will be empty and `/usr' will be a symbolic link to `/'. (If you are using Autoconf, write it as `@prefix@'.) Running `make install' with a different value of `prefix' from the one used to build the program should _not_ recompile the program. `exec_prefix' A prefix used in constructing the default values of some of the variables listed below. The default value of `exec_prefix' should be `$(prefix)'. (If you are using Autoconf, write it as `@exec_prefix@'.) Generally, `$(exec_prefix)' is used for directories that contain machine-specific files (such as executables and subroutine libraries), while `$(prefix)' is used directly for other directories. Running `make install' with a different value of `exec_prefix' from the one used to build the program should _not_ recompile the program. Executable programs are installed in one of the following directories. `bindir' The directory for installing executable programs that users can run. This should normally be `/usr/local/bin', but write it as `$(exec_prefix)/bin'. (If you are using Autoconf, write it as `@bindir@'.) `sbindir' The directory for installing executable programs that can be run from the shell, but are only generally useful to system administrators. This should normally be `/usr/local/sbin', but write it as `$(exec_prefix)/sbin'. (If you are using Autoconf, write it as `@sbindir@'.) `libexecdir' The directory for installing executable programs to be run by other programs rather than by users. This directory should normally be `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'. (If you are using Autoconf, write it as `@libexecdir@'.) Data files used by the program during its execution are divided into categories in two ways. * Some files are normally modified by programs; others are never normally modified (though users may edit some of these). * Some files are architecture-independent and can be shared by all machines at a site; some are architecture-dependent and can be shared only by machines of the same kind and operating system; others may never be shared between two machines. This makes for six different possibilities. However, we want to discourage the use of architecture-dependent files, aside from object files and libraries. It is much cleaner to make other data files architecture-independent, and it is generally not hard. Here are the variables Makefiles should use to specify directories to put these various kinds of files in: `datarootdir' The root of the directory tree for read-only architecture-independent data files. This should normally be `/usr/local/share', but write it as `$(prefix)/share'. `datadir''s default value is based on this variable; so are `infodir', `mandir', and others. `datadir' The directory for installing ideosyncratic read-only architecture-independent data files for this program. This is usually the same place as `datarootdir', but we use the two separate variables so that you can move these ideosyncratic files without altering the location for Info files, man pages, etc. The default definition of `datadir' should be `$(datarootdir)'. (If you are using Autoconf, write it as `@datadir@'.) `sysconfdir' The directory for installing read-only data files that pertain to a single machine-that is to say, files for configuring a host. Mailer and network configuration files, `/etc/passwd', and so forth belong here. All the files in this directory should be ordinary ASCII text files. This directory should normally be `/usr/local/etc', but write it as `$(prefix)/etc'. (If you are using Autoconf, write it as `@sysconfdir@'.) Do not install executables here in this directory (they probably belong in `$(libexecdir)' or `$(sbindir)'). Also do not install files that are modified in the normal course of their use (programs whose purpose is to change the configuration of the system excluded). Those probably belong in `$(localstatedir)'. `sharedstatedir' The directory for installing architecture-independent data files which the programs modify while they run. This should normally be `/usr/local/com', but write it as `$(prefix)/com'. (If you are using Autoconf, write it as `@sharedstatedir@'.) `localstatedir' The directory for installing data files which the programs modify while they run, and that pertain to one specific machine. Users should never need to modify files in this directory to configure the package's operation; put such configuration information in separate files that go in `$(datadir)' or `$(sysconfdir)'. `$(localstatedir)' should normally be `/usr/local/var', but write it as `$(prefix)/var'. (If you are using Autoconf, write it as `@localstatedir@'.) These variables specify the directory for installing certain specific types of files, if your program has them. Every GNU package should have Info files, so every program needs `infodir', but not all need `libdir' or `lispdir'. `includedir' The directory for installing header files to be included by user programs with the C `#include' preprocessor directive. This should normally be `/usr/local/include', but write it as `$(prefix)/include'. (If you are using Autoconf, write it as `@includedir@'.) Most compilers other than GCC do not look for header files in directory `/usr/local/include'. So installing the header files this way is only useful with GCC. Sometimes this is not a problem because some libraries are only really intended to work with GCC. But some libraries are intended to work with other compilers. They should install their header files in two places, one specified by `includedir' and one specified by `oldincludedir'. `oldincludedir' The directory for installing `#include' header files for use with compilers other than GCC. This should normally be `/usr/include'. (If you are using Autoconf, you can write it as `@oldincludedir@'.) The Makefile commands should check whether the value of `oldincludedir' is empty. If it is, they should not try to use it; they should cancel the second installation of the header files. A package should not replace an existing header in this directory unless the header came from the same package. Thus, if your Foo package provides a header file `foo.h', then it should install the header file in the `oldincludedir' directory if either (1) there is no `foo.h' there or (2) the `foo.h' that exists came from the Foo package. To tell whether `foo.h' came from the Foo package, put a magic string in the file--part of a comment--and `grep' for that string. `infodir' The directory for installing the Info files for this package. By default, it should be `/usr/local/share/info', but it should be written as `$(datarootdir)/info'. (If you are using Autoconf, write it as `@infodir@'.) `libdir' The directory for object files and libraries of object code. Do not install executables here, they probably ought to go in `$(libexecdir)' instead. The value of `libdir' should normally be `/usr/local/lib', but write it as `$(exec_prefix)/lib'. (If you are using Autoconf, write it as `@libdir@'.) `lispdir' The directory for installing any Emacs Lisp files in this package. By default, it should be `/usr/local/share/emacs/site-lisp', but it should be written as `$(datarootdir)/emacs/site-lisp'. If you are using Autoconf, write the default as `@lispdir@'. In order to make `@lispdir@' work, you need the following lines in your `configure.in' file: lispdir='${datarootdir}/emacs/site-lisp' AC_SUBST(lispdir) `localedir' The directory for installing locale-specific message catalogs for this package. By default, it should be `/usr/local/share/locale', but it should be written as `$(datarootdir)/locale'. (If you are using Autoconf, write it as `@localedir@'.) Unix-style man pages are installed in one of the following: `mandir' The top-level directory for installing the man pages (if any) for this package. It will normally be `/usr/local/share/man', but you should write it as `$(datarootdir)/man'. (If you are using Autoconf, write it as `@mandir@'.) `man1dir' The directory for installing section 1 man pages. Write it as `$(mandir)/man1'. `man2dir' The directory for installing section 2 man pages. Write it as `$(mandir)/man2' `...' *Don't make the primary documentation for any GNU software be a man page. Write a manual in Texinfo instead. Man pages are just for the sake of people running GNU software on Unix, which is a secondary application only.* `manext' The file name extension for the installed man page. This should contain a period followed by the appropriate digit; it should normally be `.1'. `man1ext' The file name extension for installed section 1 man pages. `man2ext' The file name extension for installed section 2 man pages. `...' Use these names instead of `manext' if the package needs to install man pages in more than one section of the manual. And finally, you should set the following variable: `srcdir' The directory for the sources being compiled. The value of this variable is normally inserted by the `configure' shell script. (If you are using Autconf, use `srcdir = @srcdir@'.) For example: # Common prefix for installation directories. # NOTE: This directory must exist when you start the install. prefix = /usr/local datarootdir = $(prefix)/share datadir = $(datarootdir) exec_prefix = $(prefix) # Where to put the executable for the command `gcc'. bindir = $(exec_prefix)/bin # Where to put the directories used by the compiler. libexecdir = $(exec_prefix)/libexec # Where to put the Info files. infodir = $(datarootdir)/info If your program installs a large number of files into one of the standard user-specified directories, it might be useful to group them into a subdirectory particular to that program. If you do this, you should write the `install' rule to create these subdirectories. Do not expect the user to include the subdirectory name in the value of any of the variables listed above. The idea of having a uniform set of variable names for installation directories is to enable the user to specify the exact same values for several different GNU packages. In order for this to be useful, all the packages must be designed so that they will work sensibly when the user does so.  File: standards.info, Node: Standard Targets, Next: Install Command Categories, Prev: Directory Variables, Up: Makefile Conventions Standard Targets for Users -------------------------- All GNU programs should have the following targets in their Makefiles: `all' Compile the entire program. This should be the default target. This target need not rebuild any documentation files; Info files should normally be included in the distribution, and DVI files should be made only when explicitly asked for. By default, the Make rules should compile and link with `-g', so that executable programs have debugging symbols. Users who don't mind being helpless can strip the executables later if they wish. `install' Compile the program and copy the executables, libraries, and so on to the file names where they should reside for actual use. If there is a simple test to verify that a program is properly installed, this target should run that test. Do not strip executables when installing them. Devil-may-care users can use the `install-strip' target to do that. 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 `exec_prefix', as well as all subdirectories that are needed. One way to do this is by means of an `installdirs' target as described below. Use `-' before any command for installing a man page, so that `make' will ignore any errors. This is in case there are systems that don't have the Unix man page documentation system installed. The way to install Info files is to copy them into `$(infodir)' with `$(INSTALL_DATA)' (*note Command Variables::), and then run the `install-info' program if it is present. `install-info' is a program that edits the Info `dir' file to add or update the menu entry for the given Info file; it is part of the Texinfo package. Here is a sample rule to install an Info file: $(DESTDIR)$(infodir)/foo.info: foo.info $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ else d=$(srcdir); fi; \ $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@; \ # Run install-info only if it exists. # Use `if' instead of just prepending `-' to the # line so we notice real errors from install-info. # We use `$(SHELL) -c' because some shells do not # fail gracefully when there is an unknown command. if $(SHELL) -c 'install-info --version' \ >/dev/null 2>&1; then \ install-info --dir-file=$(DESTDIR)$(infodir)/dir \ $(DESTDIR)$(infodir)/foo.info; \ else true; fi When writing the `install' target, you must classify all the commands into three categories: normal ones, "pre-installation" commands and "post-installation" commands. *Note Install Command Categories::. `uninstall' Delete all the installed files--the copies that the `install' target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. The uninstallation commands are divided into three categories, just like the installation commands. *Note Install Command Categories::. `install-strip' Like `install', but strip the executable files while installing them. In simple cases, this target can use the `install' target in a simple way: install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ install But if the package installs scripts as well as real executables, the `install-strip' target can't just refer to the `install' target; it has to strip the executables but not the scripts. `install-strip' should not strip the executables in the build directory which are being copied for installation. It should only strip the copies that are installed. Normally we do not recommend stripping an executable unless you are sure the program has no bugs. However, it can be reasonable to install a stripped executable for actual execution while saving the unstripped executable elsewhere in case there is a bug. `clean' Delete all files from the current directory that are normally created by building the program. Don't delete the files that record the configuration. Also preserve files that could be made by building, but normally aren't because the distribution comes with them. Delete `.dvi' files here if they are not part of the distribution. `distclean' Delete all files from the current directory that are created by configuring or building the program. If you have unpacked the source and built the program without creating any other files, `make distclean' should leave only the files that were in the distribution. `mostlyclean' Like `clean', but may refrain from deleting a few files that people normally don't want to recompile. For example, the `mostlyclean' target for GCC does not delete `libgcc.a', because recompiling it is rarely necessary and takes a lot of time. `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. The reason we say "almost everything" is that running the command `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' target 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 the special `maintainer-clean' target should start with these two: @echo 'This command is intended for maintainers to use; it' @echo 'deletes files that may need special tools to rebuild.' `TAGS' Update a tags table for this program. `info' Generate any Info files needed. The best way to write the rules is as follows: info: foo.info foo.info: foo.texi chap1.texi chap2.texi $(MAKEINFO) $(srcdir)/foo.texi You must define the variable `MAKEINFO' in the Makefile. It should run the `makeinfo' program, which is part of the Texinfo distribution. Normally a GNU distribution comes with Info files, and that means the Info files are present in the source directory. Therefore, the Make rule for an info file should update it in the source directory. When users build the package, ordinarily Make will not update the Info files because they will already be up to date. `dvi' Generate DVI files for all Texinfo documentation. For example: dvi: foo.dvi foo.dvi: foo.texi chap1.texi chap2.texi $(TEXI2DVI) $(srcdir)/foo.texi You must define the variable `TEXI2DVI' in the Makefile. It should run the program `texi2dvi', which is part of the Texinfo distribution.(1) Alternatively, write just the dependencies, and allow GNU `make' to provide the command. `dist' Create a distribution tar file for this program. The tar file should be set up so that the file names in the tar file start with a subdirectory name which is the name of the package it is a distribution for. This name can include the version number. For example, the distribution tar file of GCC version 1.40 unpacks into a subdirectory named `gcc-1.40'. The easiest way to do this is to create a subdirectory appropriately named, use `ln' or `cp' to install the proper files in it, and then `tar' that subdirectory. Compress the tar file with `gzip'. For example, the actual distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'. The `dist' target should explicitly depend on all non-source files that are in the distribution, to make sure they are up to date in the distribution. *Note Making Releases: Releases. `check' Perform self-tests (if any). The user must build the program before running the tests, but need not install the program; you should write the self-tests so that they work when the program is built but not installed. The following targets are suggested as conventional names, for programs in which they are useful. `installcheck' Perform installation tests (if any). The user must build and install the program before running the tests. You should not assume that `$(bindir)' is in the search path. `installdirs' It's useful to add a target named `installdirs' to create the directories where files are installed, and their parent directories. There is a script called `mkinstalldirs' which is convenient for this; you can find it in the Texinfo package. You can use a rule like this: # Make sure all installation directories (e.g. $(bindir)) # actually exist by making them if necessary. installdirs: mkinstalldirs $(srcdir)/mkinstalldirs $(bindir) $(datadir) \ $(libdir) $(infodir) \ $(mandir) or, if you wish to support `DESTDIR', # Make sure all installation directories (e.g. $(bindir)) # actually exist by making them if necessary. installdirs: mkinstalldirs $(srcdir)/mkinstalldirs \ $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \ $(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \ $(DESTDIR)$(mandir) This rule should not modify the directories where compilation is done. It should do nothing but create installation directories. ---------- Footnotes ---------- (1) `texi2dvi' uses TeX to do the real work of formatting. TeX is not distributed with Texinfo.  File: standards.info, Node: Install Command Categories, Prev: Standard Targets, Up: Makefile Conventions Install Command Categories -------------------------- When writing the `install' target, you must classify all the commands into three categories: normal ones, "pre-installation" commands and "post-installation" commands. Normal commands move files into their proper places, and set their modes. They may not alter any files except the ones that come entirely from the package they belong to. Pre-installation and post-installation commands may alter other files; in particular, they can edit global configuration files or data bases. Pre-installation commands are typically executed before the normal commands, and post-installation commands are typically run after the normal commands. The most common use for a post-installation command is to run `install-info'. This cannot be done with a normal command, since it alters a file (the Info directory) which does not come entirely and solely from the package being installed. It is a post-installation command because it needs to be done after the normal command which installs the package's Info files. Most programs don't need any pre-installation commands, but we have the feature just in case it is needed. To classify the commands in the `install' rule into these three categories, insert "category lines" among them. A category line specifies the category for the commands that follow. A category line consists of a tab and a reference to a special Make variable, plus an optional comment at the end. There are three variables you can use, one for each category; the variable name specifies the category. Category lines are no-ops in ordinary execution because these three Make variables are normally undefined (and you _should not_ define them in the makefile). Here are the three possible category lines, each with a comment that explains what it means: $(PRE_INSTALL) # Pre-install commands follow. $(POST_INSTALL) # Post-install commands follow. $(NORMAL_INSTALL) # Normal commands follow. If you don't use a category line at the beginning of the `install' rule, all the commands are classified as normal until the first category line. If you don't use any category lines, all the commands are classified as normal. These are the category lines for `uninstall': $(PRE_UNINSTALL) # Pre-uninstall commands follow. $(POST_UNINSTALL) # Post-uninstall commands follow. $(NORMAL_UNINSTALL) # Normal commands follow. Typically, a pre-uninstall command would be used for deleting entries from the Info directory. If the `install' or `uninstall' target has any dependencies which act as subroutines of installation, then you should start _each_ dependency's commands with a category line, and start the main target's commands with a category line also. This way, you can ensure that each command is placed in the right category regardless of which of the dependencies actually run. Pre-installation and post-installation commands should not run any programs except for these: [ basename bash cat chgrp chmod chown cmp cp dd diff echo egrep expand expr false fgrep find getopt grep gunzip gzip hostname install install-info kill ldconfig ln ls md5sum mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee test touch true uname xargs yes The reason for distinguishing the commands in this way is for the sake of making binary packages. Typically a binary package contains all the executables and other files that need to be installed, and has its own method of installing them--so it does not need to run the normal installation commands. But installing the binary package does need to execute the pre-installation and post-installation commands. Programs to build binary packages work by extracting the pre-installation and post-installation commands. Here is one way of extracting the pre-installation commands: make -n install -o all \ PRE_INSTALL=pre-install \ POST_INSTALL=post-install \ NORMAL_INSTALL=normal-install \ | gawk -f pre-install.awk where the file `pre-install.awk' could contain this: $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ {on = 0} on {print $0} $0 ~ /^\t[ \t]*pre_install[ \t]*$/ {on = 1} The resulting file of pre-installation commands is executed as a shell script as part of installing the binary package.  File: standards.info, Node: Releases, Prev: Makefile Conventions, Up: Managing Releases Making Releases =============== You should identify each release with a pair of version numbers, a major version and a minor. We have no objection to using more than two numbers, but it is very unlikely that you really need them. Package the distribution of `Foo version 69.96' up in a gzipped tar file with the name `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. The distribution should contain a file named `README' which gives the name of the package, and a general description of what it does. It is also good to explain the purpose of each of the first-level subdirectories in the package, if there are any. The `README' file should either state the version number of the package, or refer to where in the package it can be found. The `README' file should refer to the file `INSTALL', which should contain an explanation of the installation procedure. The `README' file should also refer to the file which contains the copying conditions. The GNU GPL, if used, should be in a file called `COPYING'. If the GNU LGPL is used, it should be in a file called `COPYING.LIB'. 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. 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-DOS. A name on MS-DOS consists of up to 8 characters, optionally followed by a period and up to three characters. MS-DOS 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' or `*.texi' 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: References, Next: Copying This Manual, Prev: Managing Releases, Up: Top References to Non-Free Software and Documentation ************************************************* A GNU program should not recommend use of any non-free program. We can't stop some people from writing proprietary programs, or stop other people from using them, but we can and should refuse to advertise them to new potential customers. Proprietary software is a social and ethical problem, and the point of GNU is to solve that problem. The GNU definition of free software is found in , with a list of important licenses and whether they qualify as free in . The terms "free" and "non-free", used in this document, refer to that definition. If it is not clear whether a license qualifies as free under this definition, please ask the GNU Project by writing to . We will answer, and if the license is an important one, we will add it to the list. When a non-free program or system is well known, you can mention it in passing--that is harmless, since users who might want to use it probably already know about it. For instance, it is fine to explain how to build your package on top of some widely used non-free operating system, or how to use it together with some widely used non-free program. However, you should give only the necessary information to help those who already use the non-free program to use your program with it--don't give, or refer to, any further information about the proprietary program, and don't imply that the proprietary program enhances your program, or that its existence is in any way a good thing. The goal should be that people already using the proprietary program will get the advice they need about how to use your free program with it, while people who don't already use the proprietary program will not see anything to lead them to take an interest in it. If a non-free program or system is obscure in your program's domain, your program should not mention or support it at all, since doing so would tend to popularize the non-free program more than it popularizes your program. (You cannot hope to find many additional users among the users of Foobar if the users of Foobar are few.) Sometimes a program is free software in itself but depends on a non-free platform in order to run. For instance, many Java programs depend on Sun's Java implementation, and won't run on the GNU Java Compiler (which does not yet have all the features) or won't run with the GNU Java libraries. To recommend that program is inherently to recommend the non-free platform as well; if you should not do the latter, then don't do the former. A GNU package should not refer the user to any non-free documentation for free software. Free documentation that can be included in free operating systems is essential for completing the GNU system, or any free operating system, so it is a major focus of the GNU Project; to recommend use of documentation that we are not allowed to use in GNU would weaken the impetus for the community to produce documentation that we can include. So GNU packages should never recommend non-free documentation. By contrast, it is ok to refer to journal articles and textbooks in the comments of a program for explanation of how it functions, even though they be non-free. This is because we don't include such things in the GNU system even if we are allowed to-they are outside the scope of an operating system project. Referring to a web site that describes or recommends a non-free program is in effect promoting that software, so please do not make links (or mention by name) web sites that contain such material. This policy is relevant particulary for the web pages for a GNU package. Following links from nearly any web site can lead to non-free software; this is an inescapable aspect of the nature of the web, and in itself is no objection to linking to a site. As long as the site does not itself recommend a non-free program, there is no need be concerned about the sites it links to for other reasons. Thus, for example, you should not make a link to AT&T's web site, because that recommends AT&T's non-free software packages; you should not make a link to a site that links to AT&T's site saying it is a place to get a non-free program; but if a site you want to link to refers to AT&T's web site in some other context (such as long-distance telephone service), that is not a problem.  File: standards.info, Node: Copying This Manual, Next: Index, Prev: References, Up: Top Copying This Manual ******************* * Menu: * GNU Free Documentation License:: License for copying this manual  File: standards.info, Node: GNU Free Documentation License, Up: Copying This Manual GNU Free Documentation License ============================== Version 1.2, November 2002 Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warrany Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents ---------------------------------------------------- To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: standards.info, Node: Index, Prev: Copying This Manual, Up: Top Index ***** * Menu: * #endif, commenting: Comments. * --help option: Command-Line Interfaces. * --version option: Command-Line Interfaces. * -Wall compiler option: Syntactic Conventions. * accepting contributions: Contributions. * address for bug reports: Command-Line Interfaces. * ANSI C standard: Standard C. * arbitrary limits on data: Semantics. * autoconf: System Portability. * avoiding proprietary code: Reading Non-Free Code. * behavior, dependent on program's name: User Interfaces. * binary packages: Install Command Categories. * bindir: Directory Variables. * braces, in C source: Formatting. * bug reports: Command-Line Interfaces. * canonical name of a program: Command-Line Interfaces. * casting pointers to integers: CPU Portability. * CGI programs, standard options for: Command-Line Interfaces. * change logs: Change Logs. * change logs, conditional changes: Conditional Changes. * change logs, style: Style of Change Logs. * command-line arguments, decoding: Semantics. * command-line interface: Command-Line Interfaces. * commenting: Comments. * compatibility with C and POSIX standards: Compatibility. * compiler warnings: Syntactic Conventions. * conditional changes, and change logs: Conditional Changes. * conditionals, comments for: Comments. * configure: Configuration. * control-L: Formatting. * conventions for makefiles: Makefile Conventions. * corba: Graphical Interfaces. * credits for manuals: Manual Credits. * data types, and portability: CPU Portability. * declaration for system functions: System Functions. * documentation: Documentation. * doschk: Names. * downloading this manual: Preface. * error messages: Semantics. * error messages, formatting: Errors. * exec_prefix: Directory Variables. * expressions, splitting: Formatting. * FDL, GNU Free Documentation License: GNU Free Documentation License. * file usage: File Usage. * file-name limitations: Names. * formatting error messages: Errors. * formatting source code: Formatting. * formfeed: Formatting. * function argument, declaring: Syntactic Conventions. * function prototypes: Standard C. * getopt: Command-Line Interfaces. * gettext: Internationalization. * gnome: Graphical Interfaces. * graphical user interface: Graphical Interfaces. * gtk: Graphical Interfaces. * GUILE: Source Language. * implicit int: Syntactic Conventions. * impossible conditions: Semantics. * internationalization: Internationalization. * legal aspects: Legal Issues. * legal papers: Contributions. * libexecdir: Directory Variables. * libraries: Libraries. * library functions, and portability: System Functions. * license for manuals: License for Manuals. * lint: Syntactic Conventions. * long option names: Option Table. * long-named options: Command-Line Interfaces. * makefile, conventions for: Makefile Conventions. * malloc return value: Semantics. * man pages: Man Pages. * manual structure: Manual Structure Details. * memory allocation failure: Semantics. * memory usage: Memory Usage. * message text, and internationalization: Internationalization. * mmap: Mmap. * multiple variables in a line: Syntactic Conventions. * names of variables, functions, and files: Names. * NEWS file: NEWS File. * non-POSIX systems, and portability: System Portability. * non-standard extensions: Using Extensions. * NUL characters: Semantics. * open brace: Formatting. * optional features, configure-time: Configuration. * options for compatibility: Compatibility. * options, standard command-line: Command-Line Interfaces. * output device and program's behavior: User Interfaces. * packaging: Releases. * PATH_INFO, specifying standard options as: Command-Line Interfaces. * portability, and data types: CPU Portability. * portability, and library functions: System Functions. * portability, between system types: System Portability. * POSIX compatibility: Compatibility. * POSIXLY_CORRECT, environment variable: Compatibility. * post-installation commands: Install Command Categories. * pre-installation commands: Install Command Categories. * prefix: Directory Variables. * program configuration: Configuration. * program design: Design Advice. * program name and its behavior: User Interfaces. * program's canonical name: Command-Line Interfaces. * programming languges: Source Language. * proprietary programs: Reading Non-Free Code. * README file: Releases. * references to non-free material: References. * releasing: Managing Releases. * sbindir: Directory Variables. * signal handling: Semantics. * spaces before open-paren: Formatting. * standard command-line options: Command-Line Interfaces. * standards for makefiles: Makefile Conventions. * string library functions: System Functions. * syntactic conventions: Syntactic Conventions. * table of long options: Option Table. * temporary files: Semantics. * temporary variables: Syntactic Conventions. * texinfo.tex, in a distribution: Releases. * TMPDIR environment variable: Semantics. * trademarks: Trademarks. * where to obtain standards.texi: Preface.  Tag Table: Node: Top761 Node: Preface1980 Node: Legal Issues4428 Node: Reading Non-Free Code4888 Node: Contributions6608 Node: Trademarks8754 Node: Design Advice10381 Node: Source Language10961 Node: Compatibility12965 Node: Using Extensions14585 Node: Standard C16153 Node: Conditional Compilation18548 Node: Program Behavior19938 Node: Semantics20853 Node: Libraries25538 Node: Errors26775 Node: User Interfaces29260 Node: Graphical Interfaces30857 Node: Command-Line Interfaces31884 Node: Option Table38198 Node: Memory Usage53254 Node: File Usage54271 Node: Writing C55011 Node: Formatting55857 Node: Comments59912 Node: Syntactic Conventions63206 Node: Names66610 Node: System Portability68811 Node: CPU Portability71683 Node: System Functions74931 Node: Internationalization80130 Node: Mmap83275 Node: Documentation83977 Node: GNU Manuals85078 Node: Doc Strings and Manuals90341 Node: Manual Structure Details91886 Node: License for Manuals93296 Node: Manual Credits94262 Node: Printed Manuals94647 Node: NEWS File95325 Node: Change Logs95995 Node: Change Log Concepts96741 Node: Style of Change Logs98818 Node: Simple Changes101336 Node: Conditional Changes102766 Node: Indicating the Part Changed104176 Node: Man Pages104691 Node: Reading other Manuals106307 Node: Managing Releases107088 Node: Configuration107847 Node: Makefile Conventions114808 Node: Makefile Basics115606 Node: Utilities in Makefiles118768 Node: Command Variables120901 Node: Directory Variables124466 Node: Standard Targets136428 Ref: Standard Targets-Footnote-1147676 Node: Install Command Categories147776 Node: Releases152346 Node: References156265 Node: Copying This Manual160881 Node: GNU Free Documentation License161095 Node: Index183486  End Tag Table autoconf2.59-2.59+dfsg/doc/standards.texi0000644000175000017500000037301007731213370017472 0ustar taffittaffit\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename standards.info @settitle GNU Coding Standards @c This date is automagically updated when you save this file: @set lastupdate April 29, 2003 @c %**end of header @dircategory GNU organization @direntry * Standards: (standards). GNU coding standards. @end direntry @c @setchapternewpage odd @setchapternewpage off @c Put everything in one index (arbitrarily chosen to be the concept index). @syncodeindex fn cp @syncodeindex ky cp @syncodeindex pg cp @syncodeindex vr cp @c This is used by a cross ref in make-stds.texi @set CODESTD 1 @iftex @set CHAPTER chapter @end iftex @ifinfo @set CHAPTER node @end ifinfo @copying The GNU coding standards, last updated @value{lastupdate}. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end copying @titlepage @title GNU Coding Standards @author Richard Stallman, et al. @author last updated @value{lastupdate} @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @ifnottex @node Top, Preface, (dir), (dir) @top Version @insertcopying @end ifnottex @menu * Preface:: About the GNU Coding Standards * Legal Issues:: Keeping Free Software Free * Design Advice:: General Program Design * Program Behavior:: Program Behavior for All Programs * Writing C:: Making The Best Use of C * Documentation:: Documenting Programs * Managing Releases:: The Release Process * References:: References to Non-Free Software or Documentation * Copying This Manual:: How to Make Copies of This Manual * Index:: @end menu @node Preface @chapter About the GNU Coding Standards The GNU Coding Standards were written by Richard Stallman and other GNU Project volunteers. Their purpose is to make the GNU system clean, consistent, and easy to install. This document can also be read as a guide to writing portable, robust and reliable programs. It focuses on programs written in C, but many of the rules and principles are useful even if you write in another programming language. The rules often state reasons for writing in a certain way. This release of the GNU Coding Standards was last updated @value{lastupdate}. @cindex where to obtain @code{standards.texi} @cindex downloading this manual If you did not obtain this file directly from the GNU project and recently, please check for a newer version. You can get the GNU Coding Standards from the GNU World Wide Web server host in several different formats: @uref{http://www.gnu.org/prep/standards.text}, @uref{http://www.gnu.org/prep/standards.info}, and @uref{http://www.gnu.org/prep/standards.dvi}, as well as the Texinfo ``source'' which is divided in two files: @uref{http://www.gnu.org/prep/standards.texi} and @uref{http://www.gnu.org/prep/make-stds.texi}. The GNU Coding Standards are also available in HTML format starting at @uref{http://www.gnu.org/prep/standards_toc.html}. Corrections or suggestions for this document should be sent to @email{bug-standards@@gnu.org}. If you make a suggestion, please include a suggested new wording for it; our time is limited. We prefer a context diff to the @file{standards.texi} or @file{make-stds.texi} files, but if you don't have those files, please mail your suggestion anyway. These standards cover the minimum of what is important when writing a GNU package. Likely, the needs for additional standards will come up. Sometimes, you might suggest that such standards be added to this document. If you think your standards would be generally useful, please do suggest them. You should also set standards for your package on many questions not addressed or not firmly specified here. The most important point is to be self-consistent---try to stick to the conventions you pick, and try to document them as much as possible. That way, your program will be more maintainable by others. The GNU Hello program serves as an example of how to follow the GNU coding standards for a trivial program which prints @samp{Hello, world!}. @uref{http://www.gnu.org/software/hello/hello.html}. @node Legal Issues @chapter Keeping Free Software Free @cindex legal aspects This @value{CHAPTER} discusses how you can make sure that GNU software avoids legal difficulties, and other related issues. @menu * Reading Non-Free Code:: Referring to Proprietary Programs * Contributions:: Accepting Contributions * Trademarks:: How We Deal with Trademark Issues @end menu @node Reading Non-Free Code @section Referring to Proprietary Programs @cindex proprietary programs @cindex avoiding proprietary code Don't in any circumstances refer to Unix source code for or during your work on GNU! (Or to any other proprietary programs.) If you have a vague recollection of the internals of a Unix program, this does not absolutely mean you can't write an imitation of it, but do try to organize the imitation internally along different lines, because this is likely to make the details of the Unix version irrelevant and dissimilar to your results. For example, Unix utilities were generally optimized to minimize memory use; if you go for speed instead, your program will be very different. You could keep the entire input file in core and scan it there instead of using stdio. Use a smarter algorithm discovered more recently than the Unix program. Eliminate use of temporary files. Do it in one pass instead of two (we did this in the assembler). Or, on the contrary, emphasize simplicity instead of speed. For some applications, the speed of today's computers makes simpler algorithms adequate. Or go for generality. For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead. Make sure your program handles NULs and other funny characters in the input files. Add a programming language for extensibility and write part of the program in that language. Or turn some parts of the program into independently usable libraries. Or use a simple garbage collector instead of tracking precisely when to free memory, or use a new GNU facility such as obstacks. @node Contributions @section Accepting Contributions @cindex legal papers @cindex accepting contributions If the program you are working on is copyrighted by the Free Software Foundation, then when someone else sends you a piece of code to add to the program, we need legal papers to use it---just as we asked you to sign papers initially. @emph{Each} person who makes a nontrivial contribution to a program must sign some sort of legal papers in order for us to have clear title to the program; the main author alone is not enough. So, before adding in any contributions from other people, please tell us, so we can arrange to get the papers. Then wait until we tell you that we have received the signed papers, before you actually use the contribution. This applies both before you release the program and afterward. If you receive diffs to fix a bug, and they make significant changes, we need legal papers for that change. This also applies to comments and documentation files. For copyright law, comments and code are just text. Copyright applies to all kinds of text, so we need legal papers for all kinds. We know it is frustrating to ask for legal papers; it's frustrating for us as well. But if you don't wait, you are going out on a limb---for example, what if the contributor's employer won't sign a disclaimer? You might have to take that code out again! You don't need papers for changes of a few lines here or there, since they are not significant for copyright purposes. Also, you don't need papers if all you get from the suggestion is some ideas, not actual code which you use. For example, if someone send you one implementation, but you write a different implementation of the same idea, you don't need to get papers. The very worst thing is if you forget to tell us about the other contributor. We could be very embarrassed in court some day as a result. We have more detailed advice for maintainers of programs; if you have reached the stage of actually maintaining a program for GNU (whether released or not), please ask us for a copy. @node Trademarks @section Trademarks @cindex trademarks Please do not include any trademark acknowledgements in GNU software packages or documentation. Trademark acknowledgements are the statements that such-and-such is a trademark of so-and-so. The GNU Project has no objection to the basic idea of trademarks, but these acknowledgements feel like kowtowing, and there is no legal requirement for them, so we don't use them. What is legally required, as regards other people's trademarks, is to avoid using them in ways which a reader might reasonably understand as naming or labeling our own programs or activities. For example, since ``Objective C'' is (or at least was) a trademark, we made sure to say that we provide a ``compiler for the Objective C language'' rather than an ``Objective C compiler''. The latter would have been meant as a shorter way of saying the former, but it does not explicitly state the relationship, so it could be misinterpreted as using ``Objective C'' as a label for the compiler rather than for the language. Please don't use ``win'' as an abbreviation for Microsoft Windows in GNU software or documentation. In hacker terminology, calling something a "win" is a form of praise. If you wish to praise Microsoft Windows when speaking on your own, by all means do so, but not in GNU software. Usually we write the word ``windows'' in full, but when brevity is very important (as in file names and sometimes symbol names), we abbreviate it to ``w''. For instance, the files and functions in Emacs that deal with Windows start with @samp{w32}. @node Design Advice @chapter General Program Design @cindex program design This @value{CHAPTER} discusses some of the issues you should take into account when designing your program. @c Standard or ANSI C @c @c In 1989 the American National Standards Institute (ANSI) standardized @c C as standard X3.159-1989. In December of that year the @c International Standards Organization ISO adopted the ANSI C standard @c making minor changes. In 1990 ANSI then re-adopted ISO standard @c C. This version of C is known as either ANSI C or Standard C. @c A major revision of the C Standard appeared in 1999. @menu * Source Language:: Which languges to use. * Compatibility:: Compatibility with other implementations * Using Extensions:: Using non-standard features * Standard C:: Using Standard C features * Conditional Compilation:: Compiling Code Only If A Conditional is True @end menu @node Source Language @section Which Languages to Use @cindex programming languges When you want to use a language that gets compiled and runs at high speed, the best language to use is C. Using another language is like using a non-standard feature: it will cause trouble for users. Even if GCC supports the other language, users may find it inconvenient to have to install the compiler for that other language in order to build your program. For example, if you write your program in C++, people will have to install the GNU C++ compiler in order to compile your program. C has one other advantage over C++ and other compiled languages: more people know C, so more people will find it easy to read and modify the program if it is written in C. So in general it is much better to use C, rather than the comparable alternatives. But there are two exceptions to that conclusion: @itemize @bullet @item It is no problem to use another language to write a tool specifically intended for use with that language. That is because the only people who want to build the tool will be those who have installed the other language anyway. @item If an application is of interest only to a narrow part of the community, then the question of which language it is written in has less effect on other people, so you may as well please yourself. @end itemize Many programs are designed to be extensible: they include an interpreter for a language that is higher level than C. Often much of the program is written in that language, too. The Emacs editor pioneered this technique. @cindex GUILE The standard extensibility interpreter for GNU software is GUILE, which implements the language Scheme (an especially clean and simple dialect of Lisp). @uref{http://www.gnu.org/software/guile/}. We don't reject programs written in other ``scripting languages'' such as Perl and Python, but using GUILE is very important for the overall consistency of the GNU system. @node Compatibility @section Compatibility with Other Implementations @cindex compatibility with C and @sc{posix} standards @cindex @sc{posix} compatibility With occasional exceptions, utility programs and libraries for GNU should be upward compatible with those in Berkeley Unix, and upward compatible with Standard C if Standard C specifies their behavior, and upward compatible with @sc{posix} if @sc{posix} specifies their behavior. When these standards conflict, it is useful to offer compatibility modes for each of them. @cindex options for compatibility Standard C and @sc{posix} prohibit many kinds of extensions. Feel free to make the extensions anyway, and include a @samp{--ansi}, @samp{--posix}, or @samp{--compatible} option to turn them off. However, if the extension has a significant chance of breaking any real programs or scripts, then it is not really upward compatible. So you should try to redesign its interface to make it upward compatible. @cindex @code{POSIXLY_CORRECT}, environment variable Many GNU programs suppress extensions that conflict with @sc{posix} if the environment variable @code{POSIXLY_CORRECT} is defined (even if it is defined with a null value). Please make your program recognize this variable if appropriate. When a feature is used only by users (not by programs or command files), and it is done poorly in Unix, feel free to replace it completely with something totally different and better. (For example, @code{vi} is replaced with Emacs.) But it is nice to offer a compatible feature as well. (There is a free @code{vi} clone, so we offer it.) Additional useful features are welcome regardless of whether there is any precedent for them. @node Using Extensions @section Using Non-standard Features @cindex non-standard extensions Many GNU facilities that already exist support a number of convenient extensions over the comparable Unix facilities. Whether to use these extensions in implementing your program is a difficult question. On the one hand, using the extensions can make a cleaner program. On the other hand, people will not be able to build the program unless the other GNU tools are available. This might cause the program to work on fewer kinds of machines. With some extensions, it might be easy to provide both alternatives. For example, you can define functions with a ``keyword'' @code{INLINE} and define that as a macro to expand into either @code{inline} or nothing, depending on the compiler. In general, perhaps it is best not to use the extensions if you can straightforwardly do without them, but to use the extensions if they are a big improvement. An exception to this rule are the large, established programs (such as Emacs) which run on a great variety of systems. Using GNU extensions in such programs would make many users unhappy, so we don't do that. Another exception is for programs that are used as part of compilation: anything that must be compiled with other compilers in order to bootstrap the GNU compilation facilities. If these require the GNU compiler, then no one can compile them without having them installed already. That would be extremely troublesome in certain cases. @node Standard C @section Standard C and Pre-Standard C @cindex @sc{ansi} C standard 1989 Standard C is widespread enough now that it is ok to use its features in new programs. There is one exception: do not ever use the ``trigraph'' feature of Standard C. 1999 Standard C is not widespread yet, so please do not require its features in programs. It is ok to use its features if they are present. However, it is easy to support pre-standard compilers in most programs, so if you know how to do that, feel free. If a program you are maintaining has such support, you should try to keep it working. @cindex function prototypes To support pre-standard C, instead of writing function definitions in standard prototype form, @example int foo (int x, int y) @dots{} @end example @noindent write the definition in pre-standard style like this, @example int foo (x, y) int x, y; @dots{} @end example @noindent and use a separate declaration to specify the argument prototype: @example int foo (int, int); @end example You need such a declaration anyway, in a header file, to get the benefit of prototypes in all the files where the function is called. And once you have the declaration, you normally lose nothing by writing the function definition in the pre-standard style. This technique does not work for integer types narrower than @code{int}. If you think of an argument as being of a type narrower than @code{int}, declare it as @code{int} instead. There are a few special cases where this technique is hard to use. For example, if a function argument needs to hold the system type @code{dev_t}, you run into trouble, because @code{dev_t} is shorter than @code{int} on some machines; but you cannot use @code{int} instead, because @code{dev_t} is wider than @code{int} on some machines. There is no type you can safely use on all machines in a non-standard definition. The only way to support non-standard C and pass such an argument is to check the width of @code{dev_t} using Autoconf and choose the argument type accordingly. This may not be worth the trouble. In order to support pre-standard compilers that do not recognize prototypes, you may want to use a preprocessor macro like this: @example /* Declare the prototype for a general external function. */ #if defined (__STDC__) || defined (WINDOWSNT) #define P_(proto) proto #else #define P_(proto) () #endif @end example @node Conditional Compilation @section Conditional Compilation When supporting configuration options already known when building your program we prefer using @code{if (... )} over conditional compilation, as in the former case the compiler is able to perform more extensive checking of all possible code paths. For example, please write @smallexample if (HAS_FOO) ... else ... @end smallexample @noindent instead of: @smallexample #ifdef HAS_FOO ... #else ... #endif @end smallexample A modern compiler such as GCC will generate exactly the same code in both cases, and we have been using similar techniques with good success in several projects. Of course, the former method assumes that @code{HAS_FOO} is defined as either 0 or 1. While this is not a silver bullet solving all portability problems, and is not always appropriate, following this policy would have saved GCC developers many hours, or even days, per year. In the case of function-like macros like @code{REVERSIBLE_CC_MODE} in GCC which cannot be simply used in @code{if( ...)} statements, there is an easy workaround. Simply introduce another macro @code{HAS_REVERSIBLE_CC_MODE} as in the following example: @smallexample #ifdef REVERSIBLE_CC_MODE #define HAS_REVERSIBLE_CC_MODE 1 #else #define HAS_REVERSIBLE_CC_MODE 0 #endif @end smallexample @node Program Behavior @chapter Program Behavior for All Programs This @value{CHAPTER} describes conventions for writing robust software. It also describes general standards for error messages, the command line interface, and how libraries should behave. @menu * Semantics:: Writing robust programs * Libraries:: Library behavior * Errors:: Formatting error messages * User Interfaces:: Standards about interfaces generally * Graphical Interfaces:: Standards for graphical interfaces * Command-Line Interfaces:: Standards for command line interfaces * Option Table:: Table of long options * Memory Usage:: When and how to care about memory needs * File Usage:: Which files to use, and where @end menu @node Semantics @section Writing Robust Programs @cindex arbitrary limits on data Avoid arbitrary limits on the length or number of @emph{any} data 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. @cindex @code{NUL} characters Utilities reading files should not drop NUL characters, or any other nonprinting characters @emph{including those with codes above 0177}. The only sensible exceptions would be utilities specifically intended for interface to certain types of terminals or printers that can't handle those characters. Whenever possible, try to make programs work properly with sequences of bytes that represent multibyte characters, using encodings such as UTF-8 and others. @cindex error messages Check every system call for an error return, unless you know you wish to ignore errors. Include the system error text (from @code{perror} or equivalent) in @emph{every} error message resulting from a failing system call, as well as the name of the file if any and the name of the utility. Just ``cannot open foo.c'' or ``stat failed'' is not sufficient. @cindex @code{malloc} return value @cindex memory allocation failure Check every call to @code{malloc} or @code{realloc} to see if it returned zero. Check @code{realloc} even if you are making the block smaller; in a system that rounds block sizes to a power of 2, @code{realloc} may get a different block if you ask for less space. In Unix, @code{realloc} can destroy the storage block if it returns zero. GNU @code{realloc} does not have this bug: if it fails, the original block is unchanged. Feel free to assume the bug is fixed. If you wish to run your program on Unix, and wish to avoid lossage in this case, you can use the GNU @code{malloc}. You must expect @code{free} to alter the contents of the block that was freed. Anything you want to fetch from the block, you must fetch before calling @code{free}. If @code{malloc} fails in a noninteractive program, make that a fatal error. In an interactive program (one that reads commands from the user), it is better to abort the command and return to the command reader loop. This allows the user to kill other processes to free up virtual memory, and then try the command again. @cindex command-line arguments, decoding Use @code{getopt_long} to decode arguments, unless the argument syntax makes this unreasonable. When static storage is to be written in during program execution, use explicit C code to initialize it. Reserve C initialized declarations for data that will not be changed. @c ADR: why? Try to avoid low-level interfaces to obscure Unix data structures (such as file directories, utmp, or the layout of kernel memory), since these are less likely to work compatibly. If you need to find all the files in a directory, use @code{readdir} or some other high-level interface. These are supported compatibly by GNU. @cindex signal handling The preferred signal handling facilities are the BSD variant of @code{signal}, and the @sc{posix} @code{sigaction} function; the alternative USG @code{signal} interface is an inferior design. Nowadays, using the @sc{posix} signal functions may be the easiest way to make a program portable. If you use @code{signal}, then on GNU/Linux systems running GNU libc version 1, you should include @file{bsd/signal.h} instead of @file{signal.h}, so as to get BSD behavior. It is up to you whether to support systems where @code{signal} has only the USG behavior, or give up on them. @cindex impossible conditions In error checks that detect ``impossible'' conditions, just abort. There is usually no point in printing any message. These checks indicate the existence of bugs. Whoever wants to fix the bugs will have to read the source code and run a debugger. So explain the problem with comments in the source. The relevant data will be in variables, which are easy to examine with the debugger, so there is no point moving them elsewhere. Do not use a count of errors as the exit status for a program. @emph{That does not work}, because exit status values are limited to 8 bits (0 through 255). A single run of the program might have 256 errors; if you try to return 256 as the exit status, the parent process will see 0 as the status, and it will appear that the program succeeded. @cindex temporary files @cindex @code{TMPDIR} environment variable If you make temporary files, check the @code{TMPDIR} environment variable; if that variable is defined, use the specified directory instead of @file{/tmp}. In addition, be aware that there is a possible security problem when creating temporary files in world-writable directories. In C, you can avoid this problem by creating temporary files in this manner: @example fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0600); @end example @noindent or by using the @code{mkstemps} function from libiberty. In bash, use @code{set -C} to avoid this problem. @node Libraries @section Library Behavior @cindex libraries Try to make library functions reentrant. If they need to do dynamic storage allocation, at least try to avoid any nonreentrancy aside from that of @code{malloc} itself. Here are certain name conventions for libraries, to avoid name conflicts. Choose a name prefix for the library, more than two characters long. All external function and variable names should start with this prefix. In addition, there should only be one of these in any given library member. This usually means putting each one in a separate source file. An exception can be made when two external symbols are always used together, so that no reasonable program could use one without the other; then they can both go in the same file. External symbols that are not documented entry points for the user should have names beginning with @samp{_}. The @samp{_} should be followed by the chosen name prefix for the library, to prevent collisions with other libraries. These can go in the same files with user entry points if you like. Static functions and variables can be used as you like and need not fit any naming convention. @node Errors @section Formatting Error Messages @cindex formatting error messages @cindex error messages, formatting Error messages from compilers should look like this: @example @var{source-file-name}:@var{lineno}: @var{message} @end example @noindent If you want to mention the column number, use one of these formats: @example @var{source-file-name}:@var{lineno}:@var{column}: @var{message} @var{source-file-name}:@var{lineno}.@var{column}: @var{message} @end example @noindent Line numbers should start from 1 at the beginning of the file, and column numbers should start from 1 at the beginning of the line. (Both of these conventions are chosen for compatibility.) Calculate column numbers assuming that space and all ASCII printing characters have equal width, and assuming tab stops every 8 columns. The error message can also give both the starting and ending positions of the erroneous text. There are several formats so that you can avoid redundant information such as a duplicate line number. Here are the possible formats: @example @var{source-file-name}:@var{lineno-1}.@var{column-1}-@var{lineno-2}.@var{column-2}: @var{message} @var{source-file-name}:@var{lineno-1}.@var{column-1}-@var{column-2}: @var{message} @var{source-file-name}:@var{lineno-1}-@var{lineno-2}: @var{message} @end example @noindent When an error is spread over several files, you can use this format: @example @var{file-1}:@var{lineno-1}.@var{column-1}-@var{file-2}:@var{lineno-2}.@var{column-2}: @var{message} @end example Error messages from other noninteractive programs should look like this: @example @var{program}:@var{source-file-name}:@var{lineno}: @var{message} @end example @noindent when there is an appropriate source file, or like this: @example @var{program}: @var{message} @end example @noindent when there is no relevant source file. If you want to mention the column number, use this format: @example @var{program}:@var{source-file-name}:@var{lineno}:@var{column}: @var{message} @end example In an interactive program (one that is reading commands from a terminal), it is better not to include the program name in an error message. The place to indicate which program is running is in the prompt or with the screen layout. (When the same program runs with input from a source other than a terminal, it is not interactive and would do best to print error messages using the noninteractive style.) The string @var{message} should not begin with a capital letter when it follows a program name and/or file name, because that isn't the beginning of a sentence. (The sentence conceptually starts at the beginning of the line.) 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 end with a period. @node User Interfaces @section Standards for Interfaces Generally @cindex program name and its behavior @cindex behavior, dependent on program's name Please don't make the behavior of a utility depend on the name used to invoke it. It is useful sometimes to make a link to a utility with a different name, and that should not change what it does. Instead, use a run time option or a compilation switch or both to select among the alternate behaviors. @cindex output device and program's behavior Likewise, please don't make the behavior of the program depend on the type of output device it is used with. Device independence is an important principle of the system's design; do not compromise it merely to save someone from typing an option now and then. (Variation in error message syntax when using a terminal is ok, because that is a side issue that people do not depend on.) If you think one behavior is most useful when the output is to a terminal, and another is most useful when the output is a file or a pipe, then it is usually best to make the default behavior the one that is useful with output to a terminal, and have an option for the other behavior. Compatibility requires certain programs to depend on the type of output device. It would be disastrous if @code{ls} or @code{sh} did not do so in the way all users expect. In some of these cases, we supplement the program with a preferred alternate version that does not depend on the output device type. For example, we provide a @code{dir} program much like @code{ls} except that its default output format is always multi-column format. @node Graphical Interfaces @section Standards for Graphical Interfaces @cindex graphical user interface @cindex gtk When you write a program that provides a graphical user interface, please make it work with X Windows and the GTK toolkit unless the functionality specifically requires some alternative (for example, ``displaying jpeg images while in console mode''). In addition, please provide a command-line interface to control the functionality. (In many cases, the graphical user interface can be a separate program which invokes the command-line program.) This is so that the same jobs can be done from scripts. @cindex corba @cindex gnome Please also consider providing a CORBA interface (for use from GNOME), a library interface (for use from C), and perhaps a keyboard-driven console interface (for use by users from console mode). Once you are doing the work to provide the functionality and the graphical interface, these won't be much extra work. @node Command-Line Interfaces @section Standards for Command Line Interfaces @cindex command-line interface @findex getopt It is a good idea to follow the @sc{posix} guidelines for the command-line options of a program. The easiest way to do this is to use @code{getopt} to parse them. Note that the GNU version of @code{getopt} will normally permit options anywhere among the arguments unless the special argument @samp{--} is used. This is not what @sc{posix} specifies; it is a GNU extension. @cindex long-named options Please define long-named options that are equivalent to the single-letter Unix-style options. We hope to make GNU more user friendly this way. This is easy to do with the GNU function @code{getopt_long}. One of the advantages of long-named options is that they can be consistent from program to program. For example, users should be able to expect the ``verbose'' option of any GNU program which has one, to be spelled precisely @samp{--verbose}. To achieve this uniformity, look at the table of common long-option names when you choose the option names for your program (@pxref{Option Table}). It is usually a good idea for file names given as ordinary arguments to be input files only; any output files would be specified using options (preferably @samp{-o} or @samp{--output}). Even if you allow an output file name as an ordinary argument for compatibility, try to provide an option as another way to specify it. This will lead to more consistency among GNU utilities, and fewer idiosyncracies for users to remember. @cindex standard command-line options @cindex options, standard command-line @cindex CGI programs, standard options for @cindex PATH_INFO, specifying standard options as All programs should support two standard options: @samp{--version} and @samp{--help}. CGI programs should accept these as command-line options, and also if given as the @env{PATH_INFO}; for instance, visiting @url{http://example.org/p.cgi/--help} in a browser should output the same information as inokving @samp{p.cgi --help} from the command line. @table @code @cindex @samp{--version} option @item --version This option should direct the program to print information about its name, version, origin and legal status, all on standard output, and then exit successfully. Other options and arguments should be ignored once this is seen, and the program should not perform its normal function. @cindex canonical name of a program @cindex program's canonical name The first line is meant to be easy for a program to parse; the version number proper starts after the last space. In addition, it contains the canonical name for this program, in this format: @example GNU Emacs 19.30 @end example @noindent The program's name should be a constant string; @emph{don't} compute it from @code{argv[0]}. The idea is to state the standard or canonical name for the program, not its file name. There are other ways to find out the precise file name where a command is found in @code{PATH}. If the program is a subsidiary part of a larger package, mention the package name in parentheses, like this: @example emacsserver (GNU Emacs) 19.30 @end example @noindent If the package has a version number which is different from this program's version number, you can mention the package version number just before the close-parenthesis. If you @strong{need} to mention the version numbers of libraries which are distributed separately from the package which contains this program, you can do so by printing an additional line of version info for each library you want to mention. Use the same format for these lines as for the first line. Please do not mention all of the libraries that the program uses ``just for completeness''---that would produce a lot of unhelpful clutter. Please mention library version numbers only if you find in practice that they are very important to you in debugging. The following line, after the version number line or lines, should be a copyright notice. If more than one copyright notice is called for, put each on a separate line. Next should follow a brief statement that the program is free software, and that users are free to copy and change it on certain conditions. If the program is covered by the GNU GPL, say so here. Also mention that there is no warranty, to the extent permitted by law. It is ok to finish the output with a list of the major authors of the program, as a way of giving credit. Here's an example of output that follows these rules: @smallexample GNU Emacs 19.34.5 Copyright (C) 1996 Free Software Foundation, Inc. GNU Emacs comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the files named COPYING. @end smallexample You should adapt this to your program, of course, filling in the proper year, copyright holder, name of program, and the references to distribution terms, and changing the rest of the wording as necessary. This copyright notice only needs to mention the most recent year in which changes were made---there's no need to list the years for previous versions' changes. You don't have to mention the name of the program in these notices, if that is inconvenient, since it appeared in the first line. Translations of the above lines must preserve the validity of the copyright notices (@pxref{Internationalization}). If the translation's character set supports it, the @samp{(C)} should be replaced with the copyright symbol, as follows: @ifinfo (the official copyright symbol, which is the letter C in a circle); @end ifinfo @ifnotinfo @copyright{} @end ifnotinfo Write the word ``Copyright'' exactly like that, in English. Do not translate it into another language. International treaties recognize the English word ``Copyright''; translations into other languages do not have legal significance. @cindex @samp{--help} option @item --help This option should output brief documentation for how to invoke the program, on standard output, then exit successfully. Other options and arguments should be ignored once this is seen, and the program should not perform its normal function. @cindex address for bug reports @cindex bug reports Near the end of the @samp{--help} option's output there should be a line that says where to mail bug reports. It should have this format: @example Report bugs to @var{mailing-address}. @end example @end table @node Option Table @section Table of Long Options @cindex long option names @cindex table of long options Here is a table of long options used by GNU programs. It is surely incomplete, but we aim to list all the options that a new program might want to be compatible with. If you use names not already in the table, please send @email{bug-standards@@gnu.org} a list of them, with their meanings, so we can update the table. @c Please leave newlines between items in this table; it's much easier @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 @c a semicolon between the lists of the programs that use them, not a @c period. --friedman @table @samp @item after-date @samp{-N} in @code{tar}. @item all @samp{-a} in @code{du}, @code{ls}, @code{nm}, @code{stty}, @code{uname}, and @code{unexpand}. @item all-text @samp{-a} in @code{diff}. @item almost-all @samp{-A} in @code{ls}. @item append @samp{-a} in @code{etags}, @code{tee}, @code{time}; @samp{-r} in @code{tar}. @item archive @samp{-a} in @code{cp}. @item archive-name @samp{-n} in @code{shar}. @item arglength @samp{-l} in @code{m4}. @item ascii @samp{-a} in @code{diff}. @item assign @samp{-v} in @code{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 background For server programs, run in the background. @item backward-search @samp{-B} in @code{ctags}. @item basename @samp{-f} in @code{shar}. @item batch Used in GDB. @item baud Used in GDB. @item before @samp{-b} in @code{tac}. @item binary @samp{-b} in @code{cpio} and @code{diff}. @item bits-per-code @samp{-b} in @code{shar}. @item block-size Used in @code{cpio} and @code{tar}. @item blocks @samp{-b} in @code{head} and @code{tail}. @item break-file @samp{-b} in @code{ptx}. @item brief Used in various programs to make output shorter. @item bytes @samp{-c} in @code{head}, @code{split}, and @code{tail}. @item c@t{++} @samp{-C} in @code{etags}. @item catenate @samp{-A} in @code{tar}. @item cd Used in various programs to specify the directory to use. @item changes @samp{-c} in @code{chgrp} and @code{chown}. @item classify @samp{-F} in @code{ls}. @item colons @samp{-c} in @code{recode}. @item command @samp{-c} in @code{su}; @samp{-x} in GDB. @item compare @samp{-d} in @code{tar}. @item compat Used in @code{gawk}. @item compress @samp{-Z} in @code{tar} and @code{shar}. @item concatenate @samp{-A} in @code{tar}. @item confirmation @samp{-w} in @code{tar}. @item context Used in @code{diff}. @item copyleft @samp{-W copyleft} in @code{gawk}. @item copyright @samp{-C} in @code{ptx}, @code{recode}, and @code{wdiff}; @samp{-W copyright} in @code{gawk}. @item core Used in GDB. @item count @samp{-q} in @code{who}. @item count-links @samp{-l} in @code{du}. @item create Used in @code{tar} and @code{cpio}. @item cut-mark @samp{-c} in @code{shar}. @item cxref @samp{-x} in @code{ctags}. @item date @samp{-d} in @code{touch}. @item debug @samp{-d} in Make and @code{m4}; @samp{-t} in Bison. @item define @samp{-D} in @code{m4}. @item defines @samp{-d} in Bison and @code{ctags}. @item delete @samp{-D} in @code{tar}. @item dereference @samp{-L} in @code{chgrp}, @code{chown}, @code{cpio}, @code{du}, @code{ls}, and @code{tar}. @item dereference-args @samp{-D} in @code{du}. @item device Specify an I/O device (special file name). @item diacritics @samp{-d} in @code{recode}. @item dictionary-order @samp{-d} in @code{look}. @item diff @samp{-d} in @code{tar}. @item digits @samp{-n} in @code{csplit}. @item directory Specify the directory to use, in various programs. In @code{ls}, it means to show directories themselves rather than their contents. In @code{rm} and @code{ln}, it means to not treat links to directories specially. @item discard-all @samp{-x} in @code{strip}. @item discard-locals @samp{-X} in @code{strip}. @item dry-run @samp{-n} in Make. @item ed @samp{-e} in @code{diff}. @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 environment-overrides @samp{-e} in Make. @item eof @samp{-e} in @code{xargs}. @item epoch Used in GDB. @item error-limit Used in @code{makeinfo}. @item error-output @samp{-o} in @code{m4}. @item escape @samp{-b} in @code{ls}. @item exclude-from @samp{-X} in @code{tar}. @item exec Used in GDB. @item exit @samp{-x} in @code{xargs}. @item exit-0 @samp{-e} in @code{unshar}. @item expand-tabs @samp{-t} in @code{diff}. @item expression @samp{-e} in @code{sed}. @item extern-only @samp{-g} in @code{nm}. @item extract @samp{-i} in @code{cpio}; @samp{-x} in @code{tar}. @item faces @samp{-f} in @code{finger}. @item fast @samp{-f} in @code{su}. @item fatal-warnings @samp{-E} in @code{m4}. @item file @samp{-f} in @code{info}, @code{gawk}, Make, @code{mt}, and @code{tar}; @samp{-n} in @code{sed}; @samp{-r} in @code{touch}. @item field-separator @samp{-F} in @code{gawk}. @item file-prefix @samp{-b} in Bison. @item file-type @samp{-F} in @code{ls}. @item files-from @samp{-T} in @code{tar}. @item fill-column Used in @code{makeinfo}. @item flag-truncation @samp{-F} in @code{ptx}. @item fixed-output-files @samp{-y} in Bison. @item follow @samp{-f} in @code{tail}. @item footnote-style Used in @code{makeinfo}. @item force @samp{-f} in @code{cp}, @code{ln}, @code{mv}, and @code{rm}. @item force-prefix @samp{-F} in @code{shar}. @item foreground For server programs, run in the foreground; in other words, don't do anything special to run the server in the background. @item format Used in @code{ls}, @code{time}, and @code{ptx}. @item freeze-state @samp{-F} in @code{m4}. @item fullname Used in GDB. @item gap-size @samp{-g} in @code{ptx}. @item get @samp{-x} in @code{tar}. @item graphic @samp{-i} in @code{ul}. @item graphics @samp{-g} in @code{recode}. @item group @samp{-g} in @code{install}. @item gzip @samp{-z} in @code{tar} and @code{shar}. @item hashsize @samp{-H} in @code{m4}. @item header @samp{-h} in @code{objdump} and @code{recode} @item heading @samp{-H} in @code{who}. @item help Used to ask for brief usage information. @item here-delimiter @samp{-d} in @code{shar}. @item hide-control-chars @samp{-q} in @code{ls}. @item html In @code{makeinfo}, output HTML. @item idle @samp{-u} in @code{who}. @item ifdef @samp{-D} in @code{diff}. @item ignore @samp{-I} in @code{ls}; @samp{-x} in @code{recode}. @item ignore-all-space @samp{-w} in @code{diff}. @item ignore-backups @samp{-B} in @code{ls}. @item ignore-blank-lines @samp{-B} in @code{diff}. @item ignore-case @samp{-f} in @code{look} and @code{ptx}; @samp{-i} in @code{diff} and @code{wdiff}. @item ignore-errors @samp{-i} in Make. @item ignore-file @samp{-i} in @code{ptx}. @item ignore-indentation @samp{-I} in @code{etags}. @item ignore-init-file @samp{-f} in Oleo. @item ignore-interrupts @samp{-i} in @code{tee}. @item ignore-matching-lines @samp{-I} in @code{diff}. @item ignore-space-change @samp{-b} in @code{diff}. @item ignore-zeros @samp{-i} in @code{tar}. @item include @samp{-i} in @code{etags}; @samp{-I} in @code{m4}. @item include-dir @samp{-I} in Make. @item incremental @samp{-G} in @code{tar}. @item info @samp{-i}, @samp{-l}, and @samp{-m} in Finger. @item init-file In some programs, specify the name of the file to read as the user's init file. @item initial @samp{-i} in @code{expand}. @item initial-tab @samp{-T} in @code{diff}. @item inode @samp{-i} in @code{ls}. @item interactive @samp{-i} in @code{cp}, @code{ln}, @code{mv}, @code{rm}; @samp{-e} in @code{m4}; @samp{-p} in @code{xargs}; @samp{-w} in @code{tar}. @item intermix-type @samp{-p} in @code{shar}. @item iso-8601 Used in @code{date} @item jobs @samp{-j} in Make. @item just-print @samp{-n} in Make. @item keep-going @samp{-k} in Make. @item keep-files @samp{-k} in @code{csplit}. @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 line-bytes @samp{-C} in @code{split}. @item lines Used in @code{split}, @code{head}, and @code{tail}. @item link @samp{-l} in @code{cpio}. @item lint @itemx lint-old Used in @code{gawk}. @item list @samp{-t} in @code{cpio}; @samp{-l} in @code{recode}. @item list @samp{-t} in @code{tar}. @item literal @samp{-N} in @code{ls}. @item load-average @samp{-l} in Make. @item login Used in @code{su}. @item machine No listing of which programs already use this; someone should check to see if any actually do, and tell @email{gnu@@gnu.org}. @item macro-name @samp{-M} in @code{ptx}. @item mail @samp{-m} in @code{hello} and @code{uname}. @item make-directories @samp{-d} in @code{cpio}. @item makefile @samp{-f} in Make. @item mapped Used in GDB. @item max-args @samp{-n} in @code{xargs}. @item max-chars @samp{-n} in @code{xargs}. @item max-lines @samp{-l} in @code{xargs}. @item max-load @samp{-l} in Make. @item max-procs @samp{-P} in @code{xargs}. @item mesg @samp{-T} in @code{who}. @item message @samp{-T} in @code{who}. @item minimal @samp{-d} in @code{diff}. @item mixed-uuencode @samp{-M} in @code{shar}. @item mode @samp{-m} in @code{install}, @code{mkdir}, and @code{mkfifo}. @item modification-time @samp{-m} in @code{tar}. @item multi-volume @samp{-M} in @code{tar}. @item name-prefix @samp{-a} in Bison. @item nesting-limit @samp{-L} in @code{m4}. @item net-headers @samp{-a} in @code{shar}. @item new-file @samp{-W} in Make. @item no-builtin-rules @samp{-r} in Make. @item no-character-count @samp{-w} in @code{shar}. @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-lines @samp{-l} in Bison. @item no-piping @samp{-P} in @code{shar}. @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-splash Don't print a startup splash screen. @item no-split Used in @code{makeinfo}. @item no-static @samp{-a} in @code{gprof}. @item no-time @samp{-E} in @code{gprof}. @item no-timestamp @samp{-m} in @code{shar}. @item no-validate Used in @code{makeinfo}. @item no-wait Used in @code{emacsclient}. @item no-warn Used in various programs to inhibit warnings. @item node @samp{-n} in @code{info}. @item nodename @samp{-n} in @code{uname}. @item nonmatching @samp{-f} in @code{cpio}. @item nstuff @samp{-n} in @code{objdump}. @item null @samp{-0} in @code{xargs}. @item number @samp{-n} in @code{cat}. @item number-nonblank @samp{-b} in @code{cat}. @item numeric-sort @samp{-n} in @code{nm}. @item numeric-uid-gid @samp{-n} in @code{cpio} and @code{ls}. @item nx Used in GDB. @item old-archive @samp{-o} in @code{tar}. @item old-file @samp{-o} in Make. @item one-file-system @samp{-l} in @code{tar}, @code{cp}, and @code{du}. @item only-file @samp{-o} in @code{ptx}. @item only-prof @samp{-f} in @code{gprof}. @item only-time @samp{-F} in @code{gprof}. @item options @samp{-o} in @code{getopt}, @code{fdlist}, @code{fdmount}, @code{fdmountd}, and @code{fdumount}. @item output In various programs, specify the output file name. @item output-prefix @samp{-o} in @code{shar}. @item override @samp{-o} in @code{rm}. @item overwrite @samp{-c} in @code{unshar}. @item owner @samp{-o} in @code{install}. @item paginate @samp{-l} in @code{diff}. @item paragraph-indent Used in @code{makeinfo}. @item parents @samp{-p} in @code{mkdir} and @code{rmdir}. @item pass-all @samp{-p} in @code{ul}. @item pass-through @samp{-p} in @code{cpio}. @item port @samp{-P} in @code{finger}. @item portability @samp{-c} in @code{cpio} and @code{tar}. @item posix Used in @code{gawk}. @item prefix-builtins @samp{-P} in @code{m4}. @item prefix @samp{-f} in @code{csplit}. @item preserve Used in @code{tar} and @code{cp}. @item preserve-environment @samp{-p} in @code{su}. @item preserve-modification-time @samp{-m} in @code{cpio}. @item preserve-order @samp{-s} in @code{tar}. @item preserve-permissions @samp{-p} in @code{tar}. @item print @samp{-l} in @code{diff}. @item print-chars @samp{-L} in @code{cmp}. @item print-data-base @samp{-p} in Make. @item print-directory @samp{-w} in Make. @item print-file-name @samp{-o} in @code{nm}. @item print-symdefs @samp{-s} in @code{nm}. @item printer @samp{-p} in @code{wdiff}. @item prompt @samp{-p} in @code{ed}. @item proxy Specify an HTTP proxy. @item query-user @samp{-X} in @code{shar}. @item question @samp{-q} in Make. @item quiet Used in many programs to inhibit the usual output. @strong{Note:} every program accepting @samp{--quiet} should accept @samp{--silent} as a synonym. @item quiet-unshar @samp{-Q} in @code{shar} @item quote-name @samp{-Q} in @code{ls}. @item rcs @samp{-n} in @code{diff}. @item re-interval Used in @code{gawk}. @item read-full-blocks @samp{-B} in @code{tar}. @item readnow Used in GDB. @item recon @samp{-n} in Make. @item record-number @samp{-R} in @code{tar}. @item recursive Used in @code{chgrp}, @code{chown}, @code{cp}, @code{ls}, @code{diff}, and @code{rm}. @item reference-limit Used in @code{makeinfo}. @item references @samp{-r} in @code{ptx}. @item regex @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 rename @samp{-r} in @code{cpio}. @item replace @samp{-i} in @code{xargs}. @item report-identical-files @samp{-s} in @code{diff}. @item reset-access-time @samp{-a} in @code{cpio}. @item reverse @samp{-r} in @code{ls} and @code{nm}. @item reversed-ed @samp{-f} in @code{diff}. @item right-side-defs @samp{-R} in @code{ptx}. @item same-order @samp{-s} in @code{tar}. @item same-permissions @samp{-p} in @code{tar}. @item save @samp{-g} in @code{stty}. @item se Used in GDB. @item sentence-regexp @samp{-S} in @code{ptx}. @item separate-dirs @samp{-S} in @code{du}. @item separator @samp{-s} in @code{tac}. @item sequence Used by @code{recode} to chose files or pipes for sequencing passes. @item shell @samp{-s} in @code{su}. @item show-all @samp{-A} in @code{cat}. @item show-c-function @samp{-p} in @code{diff}. @item show-ends @samp{-E} in @code{cat}. @item show-function-line @samp{-F} in @code{diff}. @item show-tabs @samp{-T} in @code{cat}. @item silent Used in many programs to inhibit the usual output. @strong{Note:} every program accepting @samp{--silent} should accept @samp{--quiet} as a synonym. @item size @samp{-s} in @code{ls}. @item socket Specify a file descriptor for a network server to use for its socket, instead of opening and binding a new socket. This provides a way to run, in a nonpriveledged process, a server that normally needs a reserved port number. @item sort Used in @code{ls}. @item source @samp{-W source} in @code{gawk}. @item sparse @samp{-S} in @code{tar}. @item speed-large-files @samp{-H} in @code{diff}. @item split-at @samp{-E} in @code{unshar}. @item split-size-limit @samp{-L} in @code{shar}. @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 stop @samp{-S} in Make. @item strict @samp{-s} in @code{recode}. @item strip @samp{-s} in @code{install}. @item strip-all @samp{-s} in @code{strip}. @item strip-debug @samp{-S} in @code{strip}. @item submitter @samp{-s} in @code{shar}. @item suffix @samp{-S} in @code{cp}, @code{ln}, @code{mv}. @item suffix-format @samp{-b} in @code{csplit}. @item sum @samp{-s} in @code{gprof}. @item summarize @samp{-s} in @code{du}. @item symbolic @samp{-s} in @code{ln}. @item symbols Used in GDB and @code{objdump}. @item synclines @samp{-s} in @code{m4}. @item sysname @samp{-s} in @code{uname}. @item tabs @samp{-t} in @code{expand} and @code{unexpand}. @item tabsize @samp{-T} in @code{ls}. @item terminal @samp{-T} in @code{tput} and @code{ul}. @samp{-t} in @code{wdiff}. @item text @samp{-a} in @code{diff}. @item text-files @samp{-T} in @code{shar}. @item time Used in @code{ls} and @code{touch}. @item timeout Specify how long to wait before giving up on some operation. @item to-stdout @samp{-O} in @code{tar}. @item total @samp{-c} in @code{du}. @item touch @samp{-t} in Make, @code{ranlib}, and @code{recode}. @item trace @samp{-t} in @code{m4}. @item traditional @samp{-t} in @code{hello}; @samp{-W traditional} in @code{gawk}; @samp{-G} in @code{ed}, @code{m4}, and @code{ptx}. @item tty Used in GDB. @item typedefs @samp{-t} in @code{ctags}. @item typedefs-and-c++ @samp{-T} in @code{ctags}. @item typeset-mode @samp{-t} in @code{ptx}. @item uncompress @samp{-z} in @code{tar}. @item unconditional @samp{-u} in @code{cpio}. @item undefine @samp{-U} in @code{m4}. @item undefined-only @samp{-u} in @code{nm}. @item update @samp{-u} in @code{cp}, @code{ctags}, @code{mv}, @code{tar}. @item usage Used in @code{gawk}; same as @samp{--help}. @item uuencode @samp{-B} in @code{shar}. @item vanilla-operation @samp{-V} in @code{shar}. @item verbose Print more information about progress. Many programs support this. @item verify @samp{-W} in @code{tar}. @item version Print the version number. @item version-control @samp{-V} in @code{cp}, @code{ln}, @code{mv}. @item vgrind @samp{-v} in @code{ctags}. @item volume @samp{-V} in @code{tar}. @item what-if @samp{-W} in Make. @item whole-size-limit @samp{-l} in @code{shar}. @item width @samp{-w} in @code{ls} and @code{ptx}. @item word-regexp @samp{-W} in @code{ptx}. @item writable @samp{-T} in @code{who}. @item zeros @samp{-z} in @code{gprof}. @end table @node Memory Usage @section Memory Usage @cindex memory usage If a program typically uses just a few meg of memory, don't bother making any effort to reduce memory usage. For example, if it is impractical for other reasons to operate on files more than a few meg long, it is reasonable to read entire input files into core to operate on them. However, for programs such as @code{cat} or @code{tail}, that can usefully operate on very large files, it is important to avoid using a technique that would artificially limit the size of files it can handle. If a program works by lines and could be applied to arbitrary user-supplied input files, it should keep only a line in memory, because this is not very hard and users will want to be able to operate on input files that are bigger than will fit in core all at once. If your program creates complicated data structures, just make them in core and give a fatal error if @code{malloc} returns zero. @node File Usage @section File Usage @cindex file usage Programs should be prepared to operate when @file{/usr} and @file{/etc} are read-only file systems. Thus, if the program manages log files, lock files, backup files, score files, or any other files which are modified for internal purposes, these files should not be stored in @file{/usr} or @file{/etc}. There are two exceptions. @file{/etc} is used to store system configuration information; it is reasonable for a program to modify files in @file{/etc} when its job is to update the system configuration. Also, if the user explicitly asks to modify one file in a directory, it is reasonable for the program to store other files in the same directory. @node Writing C @chapter Making The Best Use of C This @value{CHAPTER} provides advice on how best to use the C language when writing GNU software. @menu * Formatting:: Formatting Your Source Code * Comments:: Commenting Your Work * Syntactic Conventions:: Clean Use of C Constructs * Names:: Naming Variables, Functions, and Files * System Portability:: Portability between different operating systems * CPU Portability:: Supporting the range of CPU types * System Functions:: Portability and ``standard'' library functions * Internationalization:: Techniques for internationalization * Mmap:: How you can safely use @code{mmap}. @end menu @node Formatting @section Formatting Your Source Code @cindex formatting source code @cindex open brace @cindex braces, in C source It is important to put the open-brace that starts the body of a C function in column zero, and avoid putting any other open-brace or open-parenthesis or open-bracket in column zero. Several tools look for open-braces in column zero to find the beginnings of C functions. These tools will not work on code not formatted that way. It is also important for function definitions to start the name of the function in column zero. This helps people to search for function definitions, and may also help certain tools recognize them. Thus, the proper format is this: @example static char * concat (s1, s2) /* Name starts in column zero here */ char *s1, *s2; @{ /* Open brace in column zero here */ @dots{} @} @end example @noindent or, if you want to use Standard C syntax, format the definition like this: @example static char * concat (char *s1, char *s2) @{ @dots{} @} @end example In Standard C, if the arguments don't fit nicely on one line, split it like this: @example int lots_of_args (int an_integer, long a_long, short a_short, double a_double, float a_float) @dots{} @end example The rest of this section gives our recommendations for other aspects of C formatting style, which is also the default style of the @code{indent} program in version 1.2 and newer. It corresponds to the options @smallexample -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob @end smallexample We don't think of these recommendations as requirements, because it causes no problems for users if two different programs have different formatting styles. But whatever style you use, please use it consistently, since a mixture of styles within one program tends to look ugly. If you are contributing changes to an existing program, please follow the style of that program. For the body of the function, our recommended style looks like this: @example if (x < foo (y, z)) haha = bar[4] + 5; else @{ while (z) @{ haha += foo (z, z); z--; @} return ++x + bar (); @} @end example @cindex spaces before open-paren We find it easier to read a program when it has spaces before the open-parentheses and after the commas. Especially after the commas. When you split an expression into multiple lines, split it before an operator, not after one. Here is the right way: @cindex expressions, splitting @example if (foo_this_is_long && bar > win (x, y, z) && remaining_condition) @end example Try to avoid having two operators of different precedence at the same level of indentation. For example, don't write this: @example mode = (inmode[j] == VOIDmode || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j]) ? outmode[j] : inmode[j]); @end example Instead, use extra parentheses so that the indentation shows the nesting: @example mode = ((inmode[j] == VOIDmode || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j]))) ? outmode[j] : inmode[j]); @end example Insert extra parentheses so that Emacs will indent the code properly. For example, the following indentation looks nice if you do it by hand, @example v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000; @end example @noindent but Emacs would alter it. Adding a set of parentheses produces something that looks equally nice, and which Emacs will preserve: @example v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000 + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000); @end example Format do-while statements like this: @example do @{ a = foo (a); @} while (a > 0); @end example @cindex formfeed @cindex control-L Please use formfeed characters (control-L) to divide the program into pages at logical places (but not within a function). It does not matter just how long the pages are, since they do not have to fit on a printed page. The formfeeds should appear alone on lines by themselves. @node Comments @section Commenting Your Work @cindex commenting Every program should start with a comment saying briefly what it is for. Example: @samp{fmt - filter for simple filling of text}. Please write the comments in a GNU program in English, because English is the one language that nearly all programmers in all countries can read. If you do not write English well, please write comments in English as well as you can, then ask other people to help rewrite them. If you can't write comments in English, please find someone to work with you and translate your comments into English. 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 @code{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 @dots{}''). 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: @example /* Nonzero means truncate lines in the display; zero means continue them. */ int truncate_lines; @end example @cindex conditionals, comments for @cindex @code{#endif}, commenting Every @samp{#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, @emph{including its sense}. @samp{#else} should have a comment describing the condition @emph{and sense} of the code that follows. For example: @example @group #ifdef foo @dots{} #else /* not foo */ @dots{} #endif /* not foo */ @end group @group #ifdef foo @dots{} #endif /* foo */ @end group @end example @noindent but, by contrast, write the comments this way for a @samp{#ifndef}: @example @group #ifndef foo @dots{} #else /* foo */ @dots{} #endif /* foo */ @end group @group #ifndef foo @dots{} #endif /* not foo */ @end group @end example @node Syntactic Conventions @section Clean Use of C Constructs @cindex syntactic conventions @cindex implicit @code{int} @cindex function argument, declaring Please explicitly declare the types of all objects. For example, you should explicitly declare all arguments to functions, and you should declare functions to return @code{int} rather than omitting the @code{int}. @cindex compiler warnings @cindex @samp{-Wall} compiler option Some programmers like to use the GCC @samp{-Wall} option, and change the code whenever it issues a warning. If you want to do this, then do. Other programmers prefer not to use @samp{-Wall}, because it gives warnings for valid and legitimate code which they do not want to change. If you want to do this, then do. The compiler should be your servant, not your master. Declarations of external functions and functions to appear later in the source file should all go in one place near the beginning of the file (somewhere before the first function definition in the file), or else should go in a header file. Don't put @code{extern} declarations inside functions. @cindex temporary variables It used to be common practice to use the same local variables (with names like @code{tem}) over and over for different values within one function. Instead of doing this, it is better declare a separate local variable for each distinct purpose, and give it a name which is meaningful. This not only makes programs easier to understand, it also facilitates optimization by good compilers. You can also move the declaration of each local variable into the smallest scope that includes all its uses. This makes the program even cleaner. Don't use local variables or parameters that shadow global identifiers. @cindex multiple variables in a line Don't declare multiple variables in one declaration that spans lines. Start a new declaration on each line, instead. For example, instead of this: @example @group int foo, bar; @end group @end example @noindent write either this: @example int foo, bar; @end example @noindent or this: @example int foo; int bar; @end example @noindent (If they are global variables, each should have a comment preceding it anyway.) When you have an @code{if}-@code{else} statement nested in another @code{if} statement, always put braces around the @code{if}-@code{else}. Thus, never write like this: @example if (foo) if (bar) win (); else lose (); @end example @noindent always like this: @example if (foo) @{ if (bar) win (); else lose (); @} @end example If you have an @code{if} statement nested inside of an @code{else} statement, either write @code{else if} on one line, like this, @example if (foo) @dots{} else if (bar) @dots{} @end example @noindent with its @code{then}-part indented like the preceding @code{then}-part, or write the nested @code{if} within braces like this: @example if (foo) @dots{} else @{ if (bar) @dots{} @} @end example Don't declare both a structure tag and variables or typedefs in the same declaration. Instead, declare the structure tag separately and then use it to declare the variables or typedefs. Try to avoid assignments inside @code{if}-conditions. For example, don't write this: @example if ((foo = (char *) malloc (sizeof *foo)) == 0) fatal ("virtual memory exhausted"); @end example @noindent instead, write this: @example foo = (char *) malloc (sizeof *foo); if (foo == 0) fatal ("virtual memory exhausted"); @end example @pindex lint Don't make the program ugly to placate @code{lint}. Please don't insert any casts to @code{void}. Zero without a cast is perfectly fine as a null pointer constant, except when calling a varargs function. @node Names @section Naming Variables, Functions, and Files @cindex names of variables, functions, and files The names of global variables and functions in a program serve as comments of a sort. So don't choose terse names---instead, look for names that give useful information about the meaning of the variable or function. In a GNU program, names should be English, like other comments. Local variable names can be shorter, because they are used only within one context, where (presumably) comments explain their purpose. Try to limit your use of abbreviations in symbol names. It is ok to make a few abbreviations, explain what they mean, and then use them frequently, but don't use lots of obscure abbreviations. 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 upper case for macros and @code{enum} constants, and for name-prefixes that follow a uniform convention. For example, you should use names like @code{ignore_space_change_flag}; don't use names like @code{iCantReadThis}. Variables that indicate whether command-line options have been specified should be named after the meaning of the option, not after the option-letter. A comment should state both the exact meaning of the option and its letter. For example, @example @group /* Ignore changes in horizontal whitespace (-b). */ int ignore_space_change_flag; @end group @end example When you want to define names with constant integer values, use @code{enum} rather than @samp{#define}. GDB knows about enumeration constants. @cindex file-name limitations @pindex doschk You might want to make sure that none of the file names would conflict the files were loaded onto an MS-DOS file system which shortens the names. You can use the program @code{doschk} to test for this. Some GNU programs were designed to limit themselves to file names of 14 characters or less, to avoid file name conflicts if they are read into older System V systems. Please preserve this feature in the existing GNU programs that have it, but there is no need to do this in new GNU programs. @code{doschk} also reports file names longer than 14 characters. @node System Portability @section Portability between System Types @cindex portability, between system types In the Unix world, ``portability'' refers to porting to different Unix versions. For a GNU program, this kind of portability is desirable, but not paramount. The primary purpose of GNU software is to run on top of the GNU kernel, compiled with the GNU C compiler, on various types of @sc{cpu}. So the kinds of portability that are absolutely necessary are quite limited. But it is important to support Linux-based GNU systems, since they are the form of GNU that is popular. Beyond that, it is good to support the other free operating systems (*BSD), and it is nice to support other Unix-like systems if you want to. Supporting a variety of Unix-like systems is desirable, although not paramount. It is usually not too hard, so you may as well do it. But you don't have to consider it an obligation, if it does turn out to be hard. @pindex autoconf The easiest way to achieve portability to most Unix-like systems is to use Autoconf. It's unlikely that your program needs to know more information about the host platform than Autoconf can provide, simply because most of the programs that need such knowledge have already been written. Avoid using the format of semi-internal data bases (e.g., directories) when there is a higher-level alternative (@code{readdir}). @cindex non-@sc{posix} systems, and portability As for systems that are not like Unix, such as MSDOS, Windows, the Macintosh, VMS, and MVS, supporting them is often a lot of work. When that is the case, it is better to spend your time adding features that will be useful on GNU and GNU/Linux, rather than on supporting other incompatible systems. If you do support Windows, please do not abbreviate it as ``win''. In hacker terminology, calling something a ``win'' is a form of praise. You're free to praise Microsoft Windows on your own if you want, but please don't do this in GNU packages. Instead of abbreviating ``Windows'' to ``un'', you can write it in full or abbreviate it to ``woe'' or ``w''. In GNU Emacs, for instance, we use @samp{w32} in file names of Windows-specific files, but the macro for Windows conditionals is called @code{WINDOWSNT}. It is a good idea to define the ``feature test macro'' @code{_GNU_SOURCE} when compiling your C files. When you compile on GNU or GNU/Linux, this will enable the declarations of GNU library extension functions, and that will usually give you a compiler error message if you define the same function names in some other way in your program. (You don't have to actually @emph{use} these functions, if you prefer to make the program more portable to other systems.) But whether or not you use these GNU extensions, you should avoid using their names for any other meanings. Doing so would make it hard to move your code into other GNU programs. @node CPU Portability @section Portability between @sc{cpu}s @cindex data types, and portability @cindex portability, and data types Even GNU systems will differ because of differences among @sc{cpu} types---for example, difference in byte ordering and alignment requirements. It is absolutely essential to handle these differences. However, don't make any effort to cater to the possibility that an @code{int} will be less than 32 bits. We don't support 16-bit machines in GNU. Similarly, don't make any effort to cater to the possibility that @code{long} will be smaller than predefined types like @code{size_t}. For example, the following code is ok: @example printf ("size = %lu\n", (unsigned long) sizeof array); printf ("diff = %ld\n", (long) (pointer2 - pointer1)); @end example 1989 Standard C requires this to work, and we know of only one counterexample: 64-bit programs on Microsoft Windows IA-64. We will leave it to those who want to port GNU programs to that environment to figure out how to do it. Predefined file-size types like @code{off_t} are an exception: they are longer than @code{long} on many platforms, so code like the above won't work with them. One way to print an @code{off_t} value portably is to print its digits yourself, one by one. Don't assume that the address of an @code{int} object is also the address of its least-significant byte. This is false on big-endian machines. Thus, don't make the following mistake: @example int c; @dots{} while ((c = getchar()) != EOF) write(file_descriptor, &c, 1); @end example When calling functions, you need not worry about the difference between pointers of various types, or between pointers and integers. On most machines, there's no difference anyway. As for the few machines where there is a difference, all of them support Standard C prototypes, so you can use prototypes (perhaps conditionalized to be active only in Standard C) to make the code work on those systems. In certain cases, it is ok to pass integer and pointer arguments indiscriminately to the same function, and use no prototype on any system. For example, many GNU programs have error-reporting functions that pass their arguments along to @code{printf} and friends: @example error (s, a1, a2, a3) char *s; char *a1, *a2, *a3; @{ fprintf (stderr, "error: "); fprintf (stderr, s, a1, a2, a3); @} @end example @noindent In practice, this works on all machines, since a pointer is generally the widest possible kind of argument; it is much simpler than any ``correct'' alternative. Be sure @emph{not} to use a prototype for such functions. If you have decided to use Standard C, then you can instead define @code{error} using @file{stdarg.h}, and pass the arguments along to @code{vfprintf}. @cindex casting pointers to integers Avoid casting pointers to integers if you can. Such casts greatly reduce portability, and in most programs they are easy to avoid. In the cases where casting pointers to integers is essential---such as, a Lisp interpreter which stores type information as well as an address in one word---you'll have to make explicit provisions to handle different word sizes. You will also need to make provision for systems in which the normal range of addresses you can get from @code{malloc} starts far away from zero. @node System Functions @section Calling System Functions @cindex library functions, and portability @cindex portability, and library functions C implementations differ substantially. Standard C reduces but does not eliminate the incompatibilities; meanwhile, many GNU packages still support pre-standard compilers because this is not hard to do. This chapter gives recommendations for how to use the more-or-less standard C library functions to avoid unnecessary loss of portability. @itemize @bullet @item Don't use the return value of @code{sprintf}. It returns the number of characters written on some systems, but not on all systems. @item Be aware that @code{vfprintf} is not always available. @item @code{main} should be declared to return type @code{int}. It should terminate either by calling @code{exit} or by returning the integer status code; make sure it cannot ever return an undefined value. @cindex declaration for system functions @item Don't declare system functions explicitly. Almost any declaration for a system function is wrong on some system. To minimize conflicts, leave it to the system header files to declare system functions. If the headers don't declare a function, let it remain undeclared. While it may seem unclean to use a function without declaring it, in practice this works fine for most system library functions on the systems where this really happens; thus, the disadvantage is only theoretical. By contrast, actual declarations have frequently caused actual conflicts. @item If you must declare a system function, don't specify the argument types. Use an old-style declaration, not a Standard C prototype. The more you specify about the function, the more likely a conflict. @item In particular, don't unconditionally declare @code{malloc} or @code{realloc}. Most GNU programs use those functions just once, in functions conventionally named @code{xmalloc} and @code{xrealloc}. These functions call @code{malloc} and @code{realloc}, respectively, and check the results. Because @code{xmalloc} and @code{xrealloc} are defined in your program, you can declare them in other files without any risk of type conflict. On most systems, @code{int} is the same length as a pointer; thus, the calls to @code{malloc} and @code{realloc} work fine. For the few exceptional systems (mostly 64-bit machines), you can use @strong{conditionalized} declarations of @code{malloc} and @code{realloc}---or put these declarations in configuration files specific to those systems. @cindex string library functions @item The string functions require special treatment. Some Unix systems have a header file @file{string.h}; others have @file{strings.h}. Neither file name is portable. There are two things you can do: use Autoconf to figure out which file to include, or don't include either file. @item If you don't include either strings file, you can't get declarations for the string functions from the header file in the usual way. That causes less of a problem than you might think. The newer standard string functions should be avoided anyway because many systems still don't support them. The string functions you can use are these: @example strcpy strncpy strcat strncat strlen strcmp strncmp strchr strrchr @end example The copy and concatenate functions work fine without a declaration as long as you don't use their values. Using their values without a declaration fails on systems where the width of a pointer differs from the width of @code{int}, and perhaps in other cases. It is trivial to avoid using their values, so do that. The compare functions and @code{strlen} work fine without a declaration on most systems, possibly all the ones that GNU software runs on. You may find it necessary to declare them @strong{conditionally} on a few systems. The search functions must be declared to return @code{char *}. Luckily, there is no variation in the data type they return. But there is variation in their names. Some systems give these functions the names @code{index} and @code{rindex}; other systems use the names @code{strchr} and @code{strrchr}. Some systems support both pairs of names, but neither pair works on all systems. You should pick a single pair of names and use it throughout your program. (Nowadays, it is better to choose @code{strchr} and @code{strrchr} for new programs, since those are the standard names.) Declare both of those names as functions returning @code{char *}. On systems which don't support those names, define them as macros in terms of the other pair. For example, here is what to put at the beginning of your file (or in a header) if you want to use the names @code{strchr} and @code{strrchr} throughout: @example #ifndef HAVE_STRCHR #define strchr index #endif #ifndef HAVE_STRRCHR #define strrchr rindex #endif char *strchr (); char *strrchr (); @end example @end itemize Here we assume that @code{HAVE_STRCHR} and @code{HAVE_STRRCHR} are macros defined in systems where the corresponding functions exist. One way to get them properly defined is to use Autoconf. @node Internationalization @section Internationalization @cindex internationalization @pindex gettext GNU has a library called GNU gettext that makes it easy to translate the messages in a program into various languages. You should use this library in every program. Use English for the messages as they appear in the program, and let gettext provide the way to translate them into other languages. Using GNU gettext involves putting a call to the @code{gettext} macro around each string that might need translation---like this: @example printf (gettext ("Processing file `%s'...")); @end example @noindent This permits GNU gettext to replace the string @code{"Processing file `%s'..."} with a translated version. Once a program uses gettext, please make a point of writing calls to @code{gettext} when you add new strings that call for translation. Using GNU gettext in a package involves specifying a @dfn{text domain name} for the package. The text domain name is used to separate the translations for this package from the translations for other packages. Normally, the text domain name should be the same as the name of the package---for example, @samp{fileutils} for the GNU file utilities. @cindex message text, and internationalization To enable gettext to work well, avoid writing code that makes assumptions about the structure of words or sentences. When you want the precise text of a sentence to vary depending on the data, use two or more alternative string constants each containing a complete sentences, rather than inserting conditionalized words or phrases into a single sentence framework. Here is an example of what not to do: @example printf ("%d file%s processed", nfiles, nfiles != 1 ? "s" : ""); @end example @noindent The problem with that example is that it assumes that plurals are made by adding `s'. If you apply gettext to the format string, like this, @example printf (gettext ("%d file%s processed"), nfiles, nfiles != 1 ? "s" : ""); @end example @noindent the message can use different words, but it will still be forced to use `s' for the plural. Here is a better way: @example printf ((nfiles != 1 ? "%d files processed" : "%d file processed"), nfiles); @end example @noindent This way, you can apply gettext to each of the two strings independently: @example printf ((nfiles != 1 ? gettext ("%d files processed") : gettext ("%d file processed")), nfiles); @end example @noindent This can be any method of forming the plural of the word for ``file'', and also handles languages that require agreement in the word for ``processed''. A similar problem appears at the level of sentence structure with this code: @example printf ("# Implicit rule search has%s been done.\n", f->tried_implicit ? "" : " not"); @end example @noindent Adding @code{gettext} calls to this code cannot give correct results for all languages, because negation in some languages requires adding words at more than one place in the sentence. By contrast, adding @code{gettext} calls does the job straightfowardly if the code starts out like this: @example printf (f->tried_implicit ? "# Implicit rule search has been done.\n", : "# Implicit rule search has not been done.\n"); @end example @node Mmap @section Mmap @findex mmap Don't assume that @code{mmap} either works on all files or fails for all files. It may work on some files and fail on others. The proper way to use @code{mmap} is to try it on the specific file for which you want to use it---and if @code{mmap} doesn't work, fall back on doing the job in another way using @code{read} and @code{write}. The reason this precaution is needed is that the GNU kernel (the HURD) provides a user-extensible file system, in which there can be many different kinds of ``ordinary files.'' Many of them support @code{mmap}, but some do not. It is important to make programs handle all these kinds of files. @node Documentation @chapter Documenting Programs @cindex documentation A GNU program should ideally come with full free documentation, adequate for both reference and tutorial purposes. If the package can be programmed or extended, the documentation should cover programming or extending it, as well as just using it. @menu * GNU Manuals:: Writing proper manuals. * Doc Strings and Manuals:: Compiling doc strings doesn't make a manual. * Manual Structure Details:: Specific structure conventions. * License for Manuals:: Writing the distribution terms for a manual. * Manual Credits:: Giving credit to documentation contributors. * Printed Manuals:: Mentioning the printed manual. * NEWS File:: NEWS files supplement manuals. * Change Logs:: Recording Changes * 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 document format for the GNU system is the Texinfo formatting language. Every GNU package should (ideally) have documentation in Texinfo both for reference and for learners. Texinfo makes it possible to produce a good quality formatted book, using @TeX{}, and to generate an Info file. It is also possible to generate HTML output from Texinfo source. See the Texinfo manual, either the hardcopy, or the on-line version available through @code{info} or the Emacs Info subsystem (@kbd{C-h i}). Nowadays some other formats such as Docbook and Sgmltexi can be converted automatically into Texinfo. It is ok to produce the Texinfo documentation by conversion this way, as long as it gives good results. Programmers often find it most natural to structure the documentation following the structure of the implementation, which they know. But this structure is not necessarily good for explaining how to use the program; it may be irrelevant and confusing for a user. At every level, from the sentences in a paragraph to the grouping of topics into separate manuals, the right way to structure documentation is according to the concepts and questions that a user will have in mind when reading it. Sometimes this structure of ideas matches the structure of the implementation of the software being documented---but often they are different. Often the most important part of learning to write good documentation is learning to notice when you are structuring the documentation like the implementation, and think about better alternatives. For example, each program in the GNU system probably ought to be documented in one manual; but this does not mean each program should have its own manual. That would be following the structure of the implementation, rather than the structure that helps the user understand. Instead, each manual should cover a coherent @emph{topic}. For example, instead of a manual for @code{diff} and a manual for @code{diff3}, we have one manual for ``comparison of files'' which covers both of those programs, as well as @code{cmp}. By documenting these programs together, we can make the whole subject clearer. The manual which discusses a program should certainly 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 questions that a user will ask when thinking about the job that the program does. Don't just tell the reader what each feature can do---say what jobs it is good for, and show how to use it for those jobs. Explain what is recommended usage, and what kinds of usage users should avoid. 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. The Bison manual is a good example of this---please take a look at it to see what we mean. That is not as hard as it first sounds. 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. To serve as a reference, a manual should have an Index that list all the functions, variables, options, and important concepts that are part of the program. One combined Index should do for a short manual, but sometimes for a complex package it is better to use multiple indices. The Texinfo manual includes advice on preparing good index entries, see @ref{Index Entries, , Making Index Entries, texinfo, The GNU Texinfo Manual}, and see @ref{Indexing Commands, , Defining the Entries of an Index, texinfo, The GNU Texinfo manual}. Don't use Unix man pages as a model for how to write GNU documentation; most of them are terse, badly structured, and give inadequate explanation of the underlying concepts. (There are, of course, some exceptions.) Also, Unix man pages use a particular format which is different from what we use in GNU manuals. Please include an email address in the manual for where to report bugs @emph{in the text of the manual}. 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 directory names. Please do not use the term ``illegal'' to refer to erroneous input to a computer program. Please use ``invalid'' for this, and reserve the term ``illegal'' for activities prohibited by law. @node Doc Strings and Manuals @section Doc Strings and Manuals Some programming systems, such as Emacs, provide a documentation string for each function, command or variable. You may be tempted to write a reference manual by compiling the documentation strings and writing a little additional text to go around them---but you must not do it. That approach is a fundamental mistake. The text of well-written documentation strings will be entirely wrong for a manual. A documentation string needs to stand alone---when it appears on the screen, there will be no other text to introduce or explain it. Meanwhile, it can be rather informal in style. The text describing a function or variable in a manual must not stand alone; it appears in the context of a section or subsection. Other text at the beginning of the section should explain some of the concepts, and should often make some general points that apply to several functions or variables. The previous descriptions of functions and variables in the section will also have given information about the topic. A description written to stand alone would repeat some of that information; this redundance looks bad. Meanwhile, the informality that is acceptable in a documentation string is totally unacceptable in a manual. The only good way to use documentation strings in writing a good manual is to use them as a source of information for writing good text. @node Manual Structure Details @section Manual Structure Details @cindex manual structure The title page of the manual should state the version of the programs or packages documented in the manual. The Top node of the manual should also contain this information. If the manual is changing more frequently than or independent of the program, also state a version number for the manual in both of these places. Each program documented in the manual should have a node named @samp{@var{program} Invocation} or @samp{Invoking @var{program}}. This node (together with its subnodes, if any) should describe the program's command line arguments and how to run it (the sort of information people would look in a man page for). Start with an @samp{@@example} containing a template for all the options and arguments that the program uses. Alternatively, put a menu item in some menu whose item name fits one of the above patterns. This identifies the node which that item points to as the node for this purpose, regardless of the node's actual name. The @samp{--usage} feature of the Info reader looks for such a node or menu item in order to find the relevant text, so it is essential for every Texinfo file to have one. If one manual describes several programs, it should have such a node for each program described in the manual. @node License for Manuals @section License for Manuals @cindex license for manuals Please use the GNU Free Documentation License for all GNU manuals that are more than a few pages long. Likewise for a collection of short documents---you only need one copy of the GNU FDL for the whole collection. For a single short document, you can use a very permissive non-copyleft license, to avoid taking up space with a long license. See @uref{http://www.gnu.org/copyleft/fdl-howto.html} for more explanation of how to employ the GFDL. Note that it is not obligatory to include a copy of the GNU GPL or GNU LGPL in a manual whose license is neither the GPL nor the LGPL. It can be a good idea to include the program's license in a large manual; in a short manual, whose size would be increased considerably by including the program's license, it is probably better not to include it. @node Manual Credits @section Manual Credits @cindex credits for manuals Please credit the principal human writers of the manual as the authors, on the title page of the manual. If a company sponsored the work, thank the company in a suitable place in the manual, but do not cite the company as an author. @node Printed Manuals @section Printed Manuals The FSF publishes some GNU manuals in printed form. To encourage sales of these manuals, the on-line versions of the manual should mention at the very start that the printed manual is available and should point at information for getting it---for instance, with a link to the page @url{http://www.gnu.org/order/order.html}. This should not be included in the printed manual, though, because there it is redundant. It is also useful to explain in the on-line forms of the manual how the user can print out the manual from the sources. @node NEWS File @section The NEWS File @cindex @file{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 identify the version they pertain to. Don't discard old items; leave them in the file after the newer items. This way, a user upgrading from any previous version can see what is new. If the @file{NEWS} file gets very long, move some of the older items into a file named @file{ONEWS} and put a note at the end referring the user to that file. @node Change Logs @section Change Logs @cindex change logs Keep a change log to describe all the changes made to program source files. The purpose of this is so that people investigating bugs in the future will know about the changes that might have introduced the bug. Often a new bug can be found by looking at what was recently changed. More importantly, change logs can help you eliminate conceptual inconsistencies between different parts of a program, by giving you a history of how the conflicting concepts arose and who they came from. @menu * Change Log Concepts:: * Style of Change Logs:: * Simple Changes:: * Conditional Changes:: * Indicating the Part Changed:: @end menu @node Change Log Concepts @subsection Change Log Concepts You can think of the change log as a conceptual ``undo list'' which explains how earlier versions were different from the current version. People can see the current version; they don't need the change log to tell them what is in it. What they want from a change log is a clear explanation of how the earlier version differed. The change log file is normally called @file{ChangeLog} and covers an entire directory. Each directory can have its own change log, or a directory can use the change log of its parent directory--it's up to you. Another alternative is to record change log information with a version control system such as RCS or CVS. This can be converted automatically to a @file{ChangeLog} file using @code{rcs2log}; in Emacs, the command @kbd{C-x v a} (@code{vc-update-change-log}) does the job. There's no need to describe the full purpose of the changes or how they work together. If you think that a change calls for explanation, you're probably right. Please do explain it---but please put the explanation in comments in the code, where people will see it whenever they see the code. For example, ``New function'' is enough for the change log when you add a function, because there should be a comment before the function definition to explain what it does. In the past, we recommended not mentioning changes in non-software files (manuals, help files, etc.) in change logs. However, we've been advised that it is a good idea to include them, for the sake of copyright records. However, sometimes it is useful to write one line to describe the overall purpose of a batch of changes. The easiest way to add an entry to @file{ChangeLog} is with the Emacs command @kbd{M-x add-change-log-entry}. An entry should have an asterisk, the name of the changed file, and then in parentheses the name of the changed functions, variables or whatever, followed by a colon. Then describe the changes you made to that function or variable. @node Style of Change Logs @subsection Style of Change Logs @cindex change logs, style Here are some simple examples of change log entries, starting with the header line that says who made the change and when it was installed, followed by descriptions of specific changes. (These examples are drawn from Emacs and GCC.) @example 1998-08-17 Richard Stallman * register.el (insert-register): Return nil. (jump-to-register): Likewise. * sort.el (sort-subr): Return nil. * tex-mode.el (tex-bibtex-file, tex-file, tex-region): Restart the tex shell if process is gone or stopped. (tex-shell-running): New function. * expr.c (store_one_arg): Round size up for move_block_to_reg. (expand_call): Round up when emitting USE insns. * stmt.c (assign_parms): Round size up for move_block_from_reg. @end example It's important to name the changed function or variable in full. Don't abbreviate function or variable names, and don't combine them. Subsequent maintainers will often search for a function name to find all the change log entries that pertain to it; if you abbreviate the name, they won't find it when they search. For example, some people are tempted to abbreviate groups of function names by writing @samp{* register.el (@{insert,jump-to@}-register)}; this is not a good idea, since searching for @code{jump-to-register} or @code{insert-register} would not find that entry. Separate unrelated change log entries with blank lines. When two entries represent parts of the same change, so that they work together, then don't put blank lines between them. Then you can omit the file name and the asterisk when successive entries are in the same file. Break long lists of function names by closing continued lines with @samp{)}, rather than @samp{,}, and opening the continuation with @samp{(} as in this example: @example * keyboard.c (menu_bar_items, tool_bar_items) (Fexecute_extended_command): Deal with `keymap' property. @end example When you install someone else's changes, put the contributor's name in the change log entry rather than in the text of the entry. In other words, write this: @example 2002-07-14 John Doe * sewing.c: Make it sew. @end example @noindent rather than this: @example 2002-07-14 Usual Maintainer * sewing.c: Make it sew. Patch by jdoe@@gnu.org. @end example As for the date, that should be the date you applied the change. @node Simple Changes @subsection Simple Changes Certain simple kinds of changes don't need much detail in the change log. When you change the calling sequence of a function in a simple fashion, and you change all the callers of the function to use the new calling sequence, there is no need to make individual entries for all the callers that you changed. Just write in the entry for the function being called, ``All callers changed''---like this: @example * keyboard.c (Fcommand_execute): New arg SPECIAL. All callers changed. @end example When you change just comments or doc strings, it is enough to write an entry for the file, without mentioning the functions. Just ``Doc fixes'' is enough for the change log. There's no technical need to make change log entries for documentation files. This is because documentation is not susceptible to bugs that are hard to fix. Documentation does not consist of parts that must interact in a precisely engineered fashion. To correct an error, you need not know the history of the erroneous passage; it is enough to compare what the documentation says with the way the program actually works. However, you should keep change logs for documentation files when the project gets copyright assignments from its contributors, so as to make the records of authorship more accurate. @node Conditional Changes @subsection Conditional Changes @cindex conditional changes, and change logs @cindex change logs, conditional changes C programs often contain compile-time @code{#if} conditionals. Many changes are conditional; sometimes you add a new definition which is entirely contained in a conditional. It is very useful to indicate in the change log the conditions for which the change applies. Our convention for indicating conditional changes is to use square brackets around the name of the condition. Here is a simple example, describing a change which is conditional but does not have a function or entity name associated with it: @example * xterm.c [SOLARIS2]: Include string.h. @end example Here is an entry describing a new definition which is entirely conditional. This new definition for the macro @code{FRAME_WINDOW_P} is used only when @code{HAVE_X_WINDOWS} is defined: @example * frame.h [HAVE_X_WINDOWS] (FRAME_WINDOW_P): Macro defined. @end example Here is an entry for a change within the function @code{init_display}, whose definition as a whole is unconditional, but the changes themselves are contained in a @samp{#ifdef HAVE_LIBNCURSES} conditional: @example * dispnew.c (init_display) [HAVE_LIBNCURSES]: If X, call tgetent. @end example Here is an entry for a change that takes affect only when a certain macro is @emph{not} defined: @example (gethostname) [!HAVE_SOCKETS]: Replace with winsock version. @end example @node Indicating the Part Changed @subsection Indicating the Part Changed Indicate the part of a function which changed by using angle brackets enclosing an indication of what the changed part does. Here is an entry for a change in the part of the function @code{sh-while-getopts} that deals with @code{sh} commands: @example * progmodes/sh-script.el (sh-while-getopts) : Handle case that user-specified option string is empty. @end example @node Man Pages @section Man Pages @cindex man pages In the GNU project, man pages are secondary. It is not necessary or expected for every GNU program to have a man page, but some of them do. It's your choice whether to include a man page in your program. When you make this decision, consider that supporting a man page requires continual effort each time the program is changed. The time you spend on the man page is time taken away from more useful work. For a simple program which changes little, updating the man page may be a small job. Then there is little reason not to include a man page, if you have one. For a large program that changes a great deal, updating a man page may be a substantial burden. If a user offers to donate a man page, you may find this gift costly to accept. It may be better to refuse the man page unless the same person agrees to take full responsibility for maintaining it---so that you can wash your hands of it entirely. If this volunteer later ceases to do the job, then don't feel obliged to pick it up yourself; it may be better to withdraw the man page from the distribution until someone else agrees to update it. When a program changes only a little, you may feel that the discrepancies are small enough that the man page remains useful without updating. If so, put a prominent note near the beginning of the man page explaining that you don't maintain it and that the Texinfo manual is more authoritative. The note should say 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 Managing Releases @chapter The Release Process @cindex releasing Making a release is more than just bundling up your source files in a tar file and putting it up for FTP. You should set up your software so that it can be configured to run on a variety of systems. Your Makefile should conform to the GNU standards described below, and your directory layout should also conform to the standards discussed below. Doing so makes it easy to include your package into the larger framework of all GNU software. @menu * Configuration:: How Configuration Should Work * Makefile Conventions:: Makefile Conventions * Releases:: Making Releases @end menu @node Configuration @section How Configuration Should Work @cindex program configuration @pindex configure Each GNU distribution should come with a shell script named @code{configure}. This script is given arguments which describe the kind of machine and system you want to compile the program for. The @code{configure} script must record the configuration options so that they affect compilation. One way to do this is to make a link from a standard name such as @file{config.h} to the proper configuration file for the chosen system. If you use this technique, the distribution should @emph{not} contain a file named @file{config.h}. This is so that people won't be able to build the program without configuring it first. Another thing that @code{configure} can do is to edit the Makefile. If you do this, the distribution should @emph{not} contain a file named @file{Makefile}. Instead, it should include a file @file{Makefile.in} which contains the input used for editing. Once again, this is so that people won't be able to build the program without configuring it first. If @code{configure} does write the @file{Makefile}, then @file{Makefile} should have a target named @file{Makefile} which causes @code{configure} to be rerun, setting up the same configuration that was set up last time. The files that @code{configure} reads should be listed as dependencies of @file{Makefile}. All the files which are output from the @code{configure} script should have comments at the beginning explaining that they were generated automatically using @code{configure}. This is so that users won't think of trying to edit them by hand. The @code{configure} script should write a file named @file{config.status} which describes which configuration options were specified when the program was last configured. This file should be a shell script which, if run, will recreate the same configuration. The @code{configure} script should accept an option of the form @samp{--srcdir=@var{dirname}} to specify the directory where sources are found (if it is not the current directory). This makes it possible to build the program in a separate directory, so that the actual source directory is not modified. If the user does not specify @samp{--srcdir}, then @code{configure} should check both @file{.} and @file{..} to see if it can find the sources. If it finds the sources in one of these places, it should use them from there. Otherwise, it should report that it cannot find the sources, and should exit with nonzero status. Usually the easy way to support @samp{--srcdir} is by editing a definition of @code{VPATH} into the Makefile. Some rules may need to refer explicitly to the specified source directory. To make this possible, @code{configure} can add to the Makefile a variable named @code{srcdir} whose value is precisely the specified directory. The @code{configure} script should also take an argument which specifies the type of system to build the program for. This argument should look like this: @example @var{cpu}-@var{company}-@var{system} @end example For example, an Athlon-based GNU/Linux system might be @samp{i686-pc-linux-gnu}. The @code{configure} script needs to be able to decode all plausible alternatives for how to describe a machine. Thus, @samp{athlon-pc-gnu/linux} would be a valid alias. There is a shell script called @uref{ftp://ftp.gnu.org/gnu/config/config.sub, @file{config.sub}} that you can use as a subroutine to validate system types and canonicalize aliases. The @code{configure} script should also take the option @option{--build=@var{buildtype}}, which should be equivalent to a plain @var{buildtype} argument. For example, @samp{configure --build=i686-pc-linux-gnu} is equivalent to @samp{configure i686-pc-linux-gnu}. When the build type is not specified by an option or argument, the @code{configure} script should normally guess it using the shell script @uref{ftp://ftp.gnu.org/gnu/config/config.guess, @file{config.guess}}. @cindex optional features, configure-time Other options are permitted to specify in more detail the software or hardware present on the machine, and include or exclude optional parts of the package: @table @samp @item --enable-@var{feature}@r{[}=@var{parameter}@r{]} Configure the package to build and install an optional user-level facility called @var{feature}. This allows users to choose which optional features to include. Giving an optional @var{parameter} of @samp{no} should omit @var{feature}, if it is built by default. No @samp{--enable} option should @strong{ever} cause one feature to replace another. No @samp{--enable} option should ever substitute one useful behavior for another useful behavior. The only proper use for @samp{--enable} is for questions of whether to build part of the program or exclude it. @item --with-@var{package} @c @r{[}=@var{parameter}@r{]} The package @var{package} will be installed, so configure this package to work with @var{package}. @c Giving an optional @var{parameter} of @c @samp{no} should omit @var{package}, if it is used by default. Possible values of @var{package} include @samp{gnu-as} (or @samp{gas}), @samp{gnu-ld}, @samp{gnu-libc}, @samp{gdb}, @samp{x}, and @samp{x-toolkit}. Do not use a @samp{--with} option to specify the file name to use to find certain files. That is outside the scope of what @samp{--with} options are for. @end table All @code{configure} scripts should accept all of these ``detail'' options, whether or not they make any difference to the particular package at hand. In particular, they should accept any option that starts with @samp{--with-} or @samp{--enable-}. This is so users will be able to configure an entire GNU source tree at once with a single set of options. You will note that the categories @samp{--with-} and @samp{--enable-} are narrow: they @strong{do not} provide a place for any sort of option you might think of. That is deliberate. We want to limit the possible configuration options in GNU software. We do not want GNU programs to have idiosyncratic configuration options. Packages that perform part of the compilation process may support cross-compilation. In such a case, the host and target machines for the program may be different. The @code{configure} script should normally treat the specified type of system as both the host and the target, thus producing a program which works for the same type of machine that it runs on. To compile a program to run on a host type that differs from the build type, use the configure option @option{--host=@var{hosttype}}, where @var{hosttype} uses the same syntax as @var{buildtype}. The host type normally defaults to the build type. To configure a cross-compiler, cross-assembler, or what have you, you should specify a target different from the host, using the configure option @samp{--target=@var{targettype}}. The syntax for @var{targettype} is the same as for the host type. So the command would look like this: @example ./configure --host=@var{hosttype} --target=@var{targettype} @end example The target type normally defaults to the host type. Programs for which cross-operation is not meaningful need not accept the @samp{--target} option, because configuring an entire operating system for cross-operation is not a meaningful operation. Some programs have ways of configuring themselves automatically. If your program is set up to do this, your @code{configure} script can simply ignore most of its arguments. @comment The makefile standards are in a separate file that is also @comment included by make.texinfo. Done by roland@gnu.ai.mit.edu on 1/6/93. @comment For this document, turn chapters into sections, etc. @lowersections @include make-stds.texi @raisesections @node Releases @section Making Releases @cindex packaging You should identify each release with a pair of version numbers, a major version and a minor. We have no objection to using more than two numbers, but it is very unlikely that you really need them. Package the distribution of @code{Foo version 69.96} up in a gzipped tar file with the name @file{foo-69.96.tar.gz}. It should unpack into a subdirectory named @file{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 @dfn{source files} and @dfn{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. @cindex @file{README} file The distribution should contain a file named @file{README} which gives the name of the package, and a general description of what it does. It is also good to explain the purpose of each of the first-level subdirectories in the package, if there are any. The @file{README} file should either state the version number of the package, or refer to where in the package it can be found. The @file{README} file should refer to the file @file{INSTALL}, which should contain an explanation of the installation procedure. The @file{README} file should also refer to the file which contains the copying conditions. The GNU GPL, if used, should be in a file called @file{COPYING}. If the GNU LGPL is used, it should be in a file called @file{COPYING.LIB}. 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, @code{lex}, @TeX{}, and @code{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 @strong{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 @code{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. 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-DOS. A name on MS-DOS consists of up to 8 characters, optionally followed by a period and up to three characters. MS-DOS will truncate extra characters both before and after the period. Thus, @file{foobarhacker.c} and @file{foobarhacker.o} are not ambiguous; they are truncated to @file{foobarha.c} and @file{foobarha.o}, which are distinct. @cindex @file{texinfo.tex}, in a distribution Include in your distribution a copy of the @file{texinfo.tex} you used to test print any @file{*.texinfo} or @file{*.texi} 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. @node References @chapter References to Non-Free Software and Documentation @cindex references to non-free material A GNU program should not recommend use of any non-free program. We can't stop some people from writing proprietary programs, or stop other people from using them, but we can and should refuse to advertise them to new potential customers. Proprietary software is a social and ethical problem, and the point of GNU is to solve that problem. The GNU definition of free software is found in @url{http://www.gnu.org/philosophy/free-sw.html}, with a list of important licenses and whether they qualify as free in @url{http://www.gnu.org/licenses/license-list.html}. The terms ``free'' and ``non-free'', used in this document, refer to that definition. If it is not clear whether a license qualifies as free under this definition, please ask the GNU Project by writing to @email{licensing@@gnu.org}. We will answer, and if the license is an important one, we will add it to the list. When a non-free program or system is well known, you can mention it in passing---that is harmless, since users who might want to use it probably already know about it. For instance, it is fine to explain how to build your package on top of some widely used non-free operating system, or how to use it together with some widely used non-free program. However, you should give only the necessary information to help those who already use the non-free program to use your program with it---don't give, or refer to, any further information about the proprietary program, and don't imply that the proprietary program enhances your program, or that its existence is in any way a good thing. The goal should be that people already using the proprietary program will get the advice they need about how to use your free program with it, while people who don't already use the proprietary program will not see anything to lead them to take an interest in it. If a non-free program or system is obscure in your program's domain, your program should not mention or support it at all, since doing so would tend to popularize the non-free program more than it popularizes your program. (You cannot hope to find many additional users among the users of Foobar if the users of Foobar are few.) Sometimes a program is free software in itself but depends on a non-free platform in order to run. For instance, many Java programs depend on Sun's Java implementation, and won't run on the GNU Java Compiler (which does not yet have all the features) or won't run with the GNU Java libraries. To recommend that program is inherently to recommend the non-free platform as well; if you should not do the latter, then don't do the former. A GNU package should not refer the user to any non-free documentation for free software. Free documentation that can be included in free operating systems is essential for completing the GNU system, or any free operating system, so it is a major focus of the GNU Project; to recommend use of documentation that we are not allowed to use in GNU would weaken the impetus for the community to produce documentation that we can include. So GNU packages should never recommend non-free documentation. By contrast, it is ok to refer to journal articles and textbooks in the comments of a program for explanation of how it functions, even though they be non-free. This is because we don't include such things in the GNU system even if we are allowed to--they are outside the scope of an operating system project. Referring to a web site that describes or recommends a non-free program is in effect promoting that software, so please do not make links (or mention by name) web sites that contain such material. This policy is relevant particulary for the web pages for a GNU package. Following links from nearly any web site can lead to non-free software; this is an inescapable aspect of the nature of the web, and in itself is no objection to linking to a site. As long as the site does not itself recommend a non-free program, there is no need be concerned about the sites it links to for other reasons. Thus, for example, you should not make a link to AT&T's web site, because that recommends AT&T's non-free software packages; you should not make a link to a site that links to AT&T's site saying it is a place to get a non-free program; but if a site you want to link to refers to AT&T's web site in some other context (such as long-distance telephone service), that is not a problem. @node Copying This Manual @appendix Copying This Manual @menu * GNU Free Documentation License:: License for copying this manual @end menu @include fdl.texi @node Index @unnumbered Index @printindex cp @bye Local variables: eval: (add-hook 'write-file-hooks 'time-stamp) time-stamp-start: "@set lastupdate " time-stamp-end: "$" time-stamp-format: "%:b %:d, %:y" compile-command: "make just-standards" End: autoconf2.59-2.59+dfsg/doc/Makefile.in0000644000175000017500000003373107752412547016676 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(autoconf_TEXINFOS) $(srcdir)/Makefile.in \ $(standards_TEXINFOS) Makefile.am stamp-vti texinfo.tex \ version.texi mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/config INFO_DEPS = autoconf.info standards.info DVIS = autoconf.dvi standards.dvi PDFS = autoconf.pdf standards.pdf PSS = autoconf.ps standards.ps HTMLS = autoconf.html standards.html TEXINFOS = autoconf.texi standards.texi TEXI2PDF = $(TEXI2DVI) --pdf --batch DVIPS = dvips am__installdirs = $(DESTDIR)$(infodir) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_MAKEINFOFLAGS = --no-split TEXI2DVI = texi2dvi --batch TEXI2HTML = texi2html TEXI2HTML_FLAGS = -split_chapter info_TEXINFOS = autoconf.texi standards.texi autoconf_TEXINFOS = fdl.texi install.texi standards_TEXINFOS = make-stds.texi # Files from texi2dvi that should be removed, but which Automake does # not know. CLEANFILES = autoconf.ACs autoconf.cvs autoconf.MSs autoconf.prs \ autoconf.ATs autoconf.evs autoconf.fns autoconf.ovs \ autoconf.tmp \ autoconf*.html standards*.html all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh .texi.info: restore=: && \ backupdir="$(am__leading_dot)am$$$$" && \ rm -rf $$backupdir && mkdir $$backupdir && \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then \ mv $$f $$backupdir; \ restore=mv; \ fi; \ done; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ then rc=0; else \ rc=$$?; \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; \ exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $< .texi.html: $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --html -I $(srcdir) \ -o $@ $< autoconf.info: autoconf.texi version.texi $(autoconf_TEXINFOS) autoconf.dvi: autoconf.texi version.texi $(autoconf_TEXINFOS) autoconf.pdf: autoconf.texi version.texi $(autoconf_TEXINFOS) autoconf.html: autoconf.texi version.texi $(autoconf_TEXINFOS) version.texi: stamp-vti stamp-vti: autoconf.texi $(top_srcdir)/configure @(dir=.; test -f ./autoconf.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/autoconf.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp version.texi \ || (echo "Updating version.texi"; \ cp vti.tmp version.texi) -@rm -f vti.tmp @cp version.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f stamp-vti version.texi standards.info: standards.texi $(standards_TEXINFOS) standards.dvi: standards.texi $(standards_TEXINFOS) standards.pdf: standards.texi $(standards_TEXINFOS) standards.html: standards.texi $(standards_TEXINFOS) .dvi.ps: $(DVIPS) -o $@ $< uninstall-info-am: $(PRE_UNINSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if cd $(DESTDIR)$(infodir); then \ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done dist-info: $(INFO_DEPS) list='$(INFO_DEPS)'; \ for base in $$list; do \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ for file in $$d/$$base*; do \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f $(distdir)/$$relfile || \ cp -p $$file $(distdir)/$$relfile; \ done; \ done mostlyclean-aminfo: -rm -rf autoconf.AC autoconf.ACs autoconf.AT autoconf.ATs autoconf.MS \ autoconf.MSs autoconf.aux autoconf.cp autoconf.cps \ autoconf.cv autoconf.cvs autoconf.ev autoconf.evs \ autoconf.fn autoconf.fns autoconf.ky autoconf.kys \ autoconf.log autoconf.ov autoconf.ovs autoconf.pg \ autoconf.pgs autoconf.pr autoconf.prs autoconf.tmp \ autoconf.toc autoconf.tp autoconf.tps autoconf.vr \ autoconf.vrs autoconf.dvi autoconf.pdf autoconf.ps \ autoconf.html standards.aux standards.cp standards.cps \ standards.fn standards.ky standards.log standards.pg \ standards.tmp standards.toc standards.tp standards.tps \ standards.vr standards.dvi standards.pdf standards.ps \ standards.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) installdirs: $(mkinstalldirs) $(DESTDIR)$(infodir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-info-am install-exec-am: install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(infodir) @list='$(INFO_DEPS)'; \ for file in $$list; do \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ else : ; fi; \ done; \ done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ done; \ else : ; fi install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic dist-info \ distclean distclean-generic distdir dvi dvi-am html html-am \ info info-am install install-am install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean \ mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am html: autoconf_1.html standards_1.html autoconf_1.html: autoconf.texi install.texi $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/autoconf.texi standards_1.html: standards.texi make-stds.texi $(TEXI2HTML) $(TEXI2HTML_FLAGS) $(srcdir)/standards.texi .PHONY: html # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/doc/texinfo.tex0000644000175000017500000066067107745431637017043 0ustar taffittaffit% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2003-10-16.18} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation; either version 2, or (at % your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this texinfo.tex file; see the file COPYING. If not, write % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % % In other words, you are welcome to use, share and improve this program. % You are forbidden to forbid anyone else to use, share and improve % what you give them. Help stamp out software-hoarding! % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org), % and /home/gd/gnu/doc/texinfo.tex on the GNU machines. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. % % The texinfo.tex in any given Texinfo distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. \message{Loading texinfo [version \texinfoversion]:} % 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]}% \catcode`+=\active \catcode`\_=\active} \message{Basics,} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexnoindent=\noindent \let\ptexlbrace=\{ \let\ptexless=< \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi % In some macros, we cannot use the `\? notation---the left quote is % in some cases the escape char. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dotChar = `\. \chardef\equalChar = `\= \chardef\exclamChar= `\! \chardef\questChar = `\? \chardef\semiChar = `\; \chardef\spaceChar = `\ % \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % Hyphenation fixes. \hyphenation{ap-pen-dix} \hyphenation{eshell} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{time-stamp} \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines\maxdimen }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingxxx.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 2\baselineskip \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \normalturnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \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} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg#1{% \let\next = #1% \begingroup \obeylines \futurelet\temp\parseargx } % If the next token is an obeyed space (from an @example environment or % the like), remove it and recurse. Otherwise, we're done. \def\parseargx{% % \obeyedspace is defined far below, after the definition of \sepspaces. \ifx\obeyedspace\temp \expandafter\parseargdiscardspace \else \expandafter\parseargline \fi } % Remove a single space (as the delimiter token to the macro call). {\obeyspaces % \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. % % First remove any @c comment, then any @comment. % Result of each macro is put in \toks0. \argremovec #1\c\relax % \expandafter\argremovecomment \the\toks0 \comment\relax % % % Call the caller's macro, saved as \next in \parsearg. \expandafter\next\expandafter{\the\toks0}% }% } % Since all \c{,omment} does is throw away the argument, we can let TeX % do that for us. The \relax here is matched by the \relax in the call % in \parseargline; it could be more or less anything, its purpose is % just to delimit the argument to the \c. \def\argremovec#1\c#2\relax{\toks0 = {#1}} \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} % \argremovec{,omment} might leave us with trailing spaces, though; e.g., % @end itemize @c foo % will have two active spaces as part of the argument with the % `itemize'. Here we remove all active spaces from #1, and assign the % result to \toks0. % % This loses if there are any *other* active characters besides spaces % in the argument -- _ ^ +, for example -- since they get expanded. % Fortunately, Texinfo does not define any such commands. (If it ever % does, the catcode of the characters in questionwill have to be changed % here.) But this means we cannot call \removeactivespaces as part of % \argremovec{,omment}, since @c uses \parsearg, and thus the argument % that \parsearg gets might well have any character at all in it. % \def\removeactivespaces#1{% \begingroup \ignoreactivespaces \edef\temp{#1}% \global\toks0 = \expandafter{\temp}% \endgroup } % Change the active space to expand to nothing. % \begingroup \obeyspaces \gdef\ignoreactivespaces{\obeyspaces\let =\empty} \endgroup \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} %% These are used to keep @begin/@end levels from running away %% Call \inENV within environments (after a \begingroup) \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} \def\ENVcheck{% \ifENV\errmessage{Still within an environment; press RETURN to continue} \endgroup\fi} % This is not perfect, but it should reduce lossage % @begin foo is the same as @foo, for now. \newhelp\EMsimple{Press RETURN to continue.} \outer\def\begin{\parsearg\beginxxx} \def\beginxxx #1{% \expandafter\ifx\csname #1\endcsname\relax {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else \csname #1\endcsname\fi} % @end foo executes the definition of \Efoo. % \def\end{\parsearg\endxxx} \def\endxxx #1{% \removeactivespaces{#1}% \edef\endthing{\the\toks0}% % \expandafter\ifx\csname E\endthing\endcsname\relax \expandafter\ifx\csname \endthing\endcsname\relax % There's no \foo, i.e., no ``environment'' foo. \errhelp = \EMsimple \errmessage{Undefined command `@end \endthing'}% \else \unmatchedenderror\endthing \fi \else % Everything's ok; the right environment has been started. \csname E\endthing\endcsname \fi } % There is an environment #1, but it hasn't been started. Give an error. % \def\unmatchedenderror#1{% \errhelp = \EMsimple \errmessage{This `@end #1' doesn't have a matching `@#1'}% } % Define the control sequence \E#1 to give an unmatched @end error. % \def\defineunmatchedend#1{% \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% } %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux file. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ptexi \else\ifx\temp\jmacro \j \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } % @! is an end-of-sentence bang. \def\!{!\spacefactor=3000 } % @? is an end-of-sentence query. \def\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi % % The \vtop we start below produces a box with normal height and large % depth; thus, TeX puts \baselineskip glue before it, and (when the % next line of text is done) \lineskip glue after it. (See p.82 of % the TeXbook.) Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \copy\groupbox \endgroup % End the \group. }% % \setbox\groupbox = \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. % Otherwise, the interline space between the last line of the group % and the first line afterwards is too small. But we can't put the % strut in \Egroup, since there it would be on a line by itself. % Hence this just inserts a strut at the beginning of each line. \everypar = {\strut}% % % Since we have a strut on every line, we don't need any of TeX's % normal interline spacing. \offinterlineskip % % OK, but now we have to do something about blank % lines in the input in @example-like environments, which normally % just turn into \lisppar, which will insert no space now that we've % turned off the interline space. Simplest is to make them be an % empty paragraph. \ifx\par\lisppar \edef\par{\leavevmode \par}% % % Reset ^^M's definition to new definition of \par. \obeylines \fi % % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \def\need{\parsearg\needx} % Old definition--didn't work. %\def\needx #1{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \def\needx#1{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break \let\br = \par % @dots{} output an ellipsis using the current font. % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % \def\dots{% \leavevmode \hbox to 1.5em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \leavevmode \hbox to 2em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% \spacefactor=3000 } % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \def\exdent{\parsearg\exdentyyy} \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} % This defn is used inside nofill environments such as @example. \def\nofillexdent{\parsearg\nofillexdentyyy} \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% \let\value=\expandablevalue \input\thisfile \endgroup} \def\thisfile{} % @center line % outputs that line, centered. % \def\center{\parsearg\docenter} \def\docenter#1{{% \ifhmode \hfil\break \fi \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{\hfil \ignorespaces#1\unskip \hfil}% \ifhmode \break \fi }} % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} \def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \def\paragraphindent{\parsearg\doparagraphindent} \def\doparagraphindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \def\exampleindent{\parsearg\doexampleindent} \def\doexampleindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \newdimen\currentparindent % \def\insertword{insert} % \def\firstparagraphindent{\parsearg\dofirstparagraphindent} \def\dofirstparagraphindent#1{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % We don't use $'s directly in the definition of \math because we need % to set catcodes according to plain TeX first, to allow for subscripts, % superscripts, special math chars, etc. % \let\implicitmath = $%$ font-lock fix % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ within @math be active (mathcode "8000), and distinguish by seeing % if the current family is \slfam, which is what @var uses. % {\catcode\underChar = \active \gdef\mathunderscore{% \catcode\underChar=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% }} % % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathcode`\_="8000 \mathunderscore \let\\ = \mathbackslash \mathactive \implicitmath\finishmath} \def\finishmath#1{#1\implicitmath\Etex} % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an % argument to a command which set the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus } } % @bullet and @minus need the same treatment as @math, just above. \def\bullet{\implicitmath\ptexbullet\implicitmath} \def\minus{\implicitmath-\implicitmath} % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \iflinks \readauxfile \fi % \openindices needs to do some work in any case. \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. % Just to be on the safe side, close the input stream before the \input. \openin 1 texinfo.cnf \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi \closein1 \temp % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest \ifx\pdfoutput\undefined \pdffalse \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\linkcolor = \relax \let\pdfmakeoutlines = \relax \else \pdftrue \pdfoutput = 1 \input pdfcolor \pdfcatalog{/PageMode /UseOutlines}% \def\dopdfimage#1#2#3{% \def\imagewidth{#2}% \def\imageheight{#3}% % without \immediate, pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi \ifnum\pdftexversion<13 #1.pdf% \else {#1.pdf}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code in a section title % aren't expanded. \atdummies \normalturnoffactive \pdfdest name{#1} xyz% }} \def\pdfmkpgn#1{#1} \let\linkcolor = \Blue % was Cyan, but that seems light? \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node % text, which might be empty if this toc entry had no % corresponding node. #4 is the page number. % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worthwhile, since most documents are normally structured. \def\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}% } % \def\pdfmakeoutlines{% \openin 1 \jobname.toc \ifeof 1\else\begingroup \closein 1 % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % % Read toc silently, to get counts of subentries for \pdfoutline. \def\numchapentry##1##2##3##4{\def\thischapnum{##2}}% \def\numsecentry##1##2##3##4{% \def\thissecnum{##2}% \advancenumber{chap\thischapnum}}% \def\numsubsecentry##1##2##3##4{% \def\thissubsecnum{##2}% \advancenumber{sec\thissecnum}}% \def\numsubsubsecentry##1##2##3##4{\advancenumber{subsec\thissubsecnum}}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \input \jobname.toc % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % Make special characters normal for writing to the pdf file. \indexnofonts \turnoffactive \input \jobname.toc \endgroup\fi } % \def\makelinks #1,{% \def\params{#1}\def\E{END}% \ifx\params\E \let\nextmakelinks=\relax \else \let\nextmakelinks=\makelinks \ifnum\lnkcount>0,\fi \picknum{#1}% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{\the\pgn}}% \linkcolor #1% \advance\lnkcount by 1% \endlink \fi \nextmakelinks } \def\picknum#1{\expandafter\pn#1} \def\pn#1{% \def\p{#1}% \ifx\p\lbrace \let\nextpn=\ppn \else \let\nextpn=\ppnn \def\first{#1} \fi \nextpn } \def\ppn#1{\pgn=#1\gobble} \def\ppnn{\pgn=\first} \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi \def\pdfurl#1{% \begingroup \normalturnoffactive\def\@{@}% \let\value=\expandablevalue \leavevmode\Red \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% % #1 \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS| \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \linkcolor #1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \fi % \ifx\pdfoutput \message{fonts,} % Font-change commands. % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf analogous to plain's \rm, etc. \newfam\sffam \def\sf{\fam=\sffam \tensf} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this one. \def\ttsl{\tenttsl} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % 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 % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} \newcount\mainmagstep \ifx\bigger\relax % not really supported. \mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else \mainmagstep=\magstephalf \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. \setfont\defbf\bfshape{10}{\magstep1} \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices, footnotes, small examples (9pt). \setfont\smallrm\rmshape{9}{1000} \setfont\smalltt\ttshape{9}{1000} \setfont\smallbf\bfshape{10}{900} \setfont\smallit\itshape{9}{1000} \setfont\smallsl\slshape{9}{1000} \setfont\smallsf\sfshape{9}{1000} \setfont\smallsc\scshape{10}{900} \setfont\smallttsl\ttslshape{10}{900} \font\smalli=cmmi9 \font\smallsy=cmsy9 % Fonts for small examples (8pt). \setfont\smallerrm\rmshape{8}{1000} \setfont\smallertt\ttshape{8}{1000} \setfont\smallerbf\bfshape{10}{800} \setfont\smallerit\itshape{8}{1000} \setfont\smallersl\slshape{8}{1000} \setfont\smallersf\sfshape{8}{1000} \setfont\smallersc\scshape{10}{800} \setfont\smallerttsl\ttslshape{10}{800} \font\smalleri=cmmi8 \font\smallersy=cmsy8 % Fonts for title page: \setfont\titlerm\rmbshape{12}{\magstep3} \setfont\titleit\itbshape{10}{\magstep4} \setfont\titlesl\slbshape{10}{\magstep4} \setfont\titlett\ttbshape{12}{\magstep3} \setfont\titlettsl\ttslshape{10}{\magstep4} \setfont\titlesf\sfbshape{17}{\magstep1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this so that font changes will continue to work % in math mode, where it is the current \fam that is relevant in most % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam % \tenbf}, for example. By redefining \tenbf, we obviate the need to % redefine \bf itself. \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \resetmathfonts \setleading{9.5pt}} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \smallerfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % % I wish we used A4 paper on this side of the Atlantic. % % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \textfonts % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000} \setfont\shortconttt\ttshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic \let\cite=\smartslanted \def\b#1{{\bf #1}} \let\strong=\b % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\frenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m } \catcode`@=\other \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null } \let\ttfont=\t \def\samp#1{`\tclose{#1}'\null} \setfont\keyrm\rmshape{8}{1000} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \frenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in \code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex } % % If we end up with any active - characters when handling the index, % just treat them as a normal -. \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \def\kbdinputstyle{\parsearg\kbdinputstylexxx} \def\kbdinputstylexxx#1{% \def\arg{#1}% \ifx\arg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\arg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\arg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct.' \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} % For @url, @env, @command quotes seem unnecessary, so use \code. \let\url=\code \let\env=\code \let\command=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @acronym downcases the argument and prints in smallcaps. \def\acronym#1{{\smallcaps \lowercase{#1}}} % @pounds{} is a sterling sign. \def\pounds{{\it\$}} % @registeredsymbol - R in a circle. For now, only works in text size; % we'd have to redo the font mechanism to change the \scriptstyle and % \scriptscriptstyle font sizes to make it look right in headings. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}% }$% } \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines \let\tt=\authortt}% % % Leave some space at the very top of the page. \vglue\titlepagetopglue % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% \def\titlezzz##1{\leftline{\titlefonts\rm ##1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Now you can put text using @subtitle. \def\subtitle{\parsearg\subtitlezzz}% \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% % % @author should come last, but may come many times. \def\author{\parsearg\authorzzz}% \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi {\authorfont \leftline{##1}}}% % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \oldpage \let\page = \oldpage \hbox{}}% % \def\page{\oldpage \hbox{}} } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make Tex use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\oddheading{\parsearg\oddheadingxxx} \def\everyheading{\parsearg\everyheadingxxx} \def\evenfooting{\parsearg\evenfootingxxx} \def\oddfooting{\parsearg\oddfootingxxx} \def\everyfooting{\parsearg\everyfootingxxx} {\catcode`\@=0 % \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -\baselineskip \global\advance\vsize by -\baselineskip } \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{ \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @vtable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} \def\internalBkitem{\smallbreak \parsearg\kitemzzz} \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% \itemzzz {#1}} \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% \itemzzz {#1}} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemfont{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. (Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue.) However, if what follows is an environment % such as @example, there will be no \parskip glue; then % the negative vskip we just would cause the example and the item to % crash together. So we use this bizarre value of 10001 as a signal % to \aboveenvbreak to insert \parskip glue after all. % (Possibly there are other commands that could be followed by % @example which need the same treatment, but not section titles; or % maybe section titles are the only special case and they should be % penalty 10001...) \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a table}} \def\itemx{\errmessage{@itemx while not in a table}} \def\kitem{\errmessage{@kitem while not in a table}} \def\kitemx{\errmessage{@kitemx while not in a table}} \def\xitem{\errmessage{@xitem while not in a table}} \def\xitemx{\errmessage{@xitemx while not in a table}} % Contains a kludge to get @end[description] to work. \def\description{\tablez{\dontindex}{1}{}{}{}{}} % @table, @ftable, @vtable. \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} {\obeylines\obeyspaces% \gdef\tablex #1^^M{% \tabley\dontindex#1 \endtabley}} \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} {\obeylines\obeyspaces% \gdef\ftablex #1^^M{% \tabley\fnitemindex#1 \endtabley \def\Eftable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} {\obeylines\obeyspaces% \gdef\vtablex #1^^M{% \tabley\vritemindex#1 \endtabley \def\Evtable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\dontindex #1{} \def\fnitemindex #1{\doind {fn}{\code{#1}}}% \def\vritemindex #1{\doind {vr}{\code{#1}}}% {\obeyspaces % \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} \def\tablez #1#2#3#4#5#6{% \aboveenvbreak % \begingroup % \def\Edescription{\Etable}% Necessary kludge. \let\itemindex=#1% \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % \ifnum 0#4>0 \tableindent=#4\mil \fi % \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % \def\itemfont{#2}% \itemmax=\tableindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \tableindent % \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi% \def\Etable{\endgraf\afterenvbreak\endgroup}% \let\item = \internalBitem % \let\itemx = \internalBitemx % \let\kitem = \internalBkitem % \let\kitemx = \internalBkitemx % \let\xitem = \internalBxitem % \let\xitemx = \internalBxitemx % } % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% \begingroup % ended by the @end itemize \itemizey {#1}{\Eitemize} } \def\itemizey#1#2{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi \def#2{\endgraf\afterenvbreak\endgroup}% \def\itemcontents{#1}% % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi \let\item=\itemizeitem } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \def\enumerate{\parsearg\enumeratezzz} \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% \begingroup % ended by the @end enumerate % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call itemizey, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % Definition of @item while inside @itemize. \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% \flushcr} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % % For those who want to use more than one line's worth of words in % the preamble, break the line within one argument and it % will parse correctly, i.e., % % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the part of the @columnfraction before the decimal point, which % is presumably either 0 or the empty string (but we don't check, we % just throw it away). #2 is the decimal part, which we use as the % percent of \hsize for this column. \def\pickupwholefraction#1.#2 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % @multitable ... @end multitable definitions: % \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip \let\item=\crcrwithfootnotes % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just & until % we encounter the problem it was intended to solve again. --karl, % nathan@acm.org, 20apr99. \let\tab=&% \let\startfootins=\startsavedfootnote \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 \def\Emultitable{% \global\setpercentfalse \crcrwithfootnotes\crcr \egroup\egroup }% % % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % \everycr will reset column counter, \colcount, at the end of % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \everycr{\noalign{% % % \filbreak%% keeps underfull box messages off when table breaks over pages. % Maybe so, but it also creates really weird page breaks when the table % breaks over pages. Wouldn't \vfil be better? Wait until the problem % manifests itself, so it can be fixed for real --karl. \global\colcount=0\relax}}% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively marking % characters. \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut \else %% FIXME: what is \box0 supposed to be? \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} % In case a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is % finished. Otherwise, the insertion is lost, it never migrates to the % main vertical list. --kasal, 22jan03. % \newbox\savedfootnotes % % \dotable \let's \startfootins to this, so that \dofootnote will call % it instead of starting the insertion right away. \def\startsavedfootnote{% \global\setbox\savedfootnotes = \vbox\bgroup \unvbox\savedfootnotes } \def\crcrwithfootnotes{% \crcr \ifvoid\savedfootnotes \else \noalign{\insert\footins{\box\savedfootnotes}}% \fi } \message{conditionals,} % Prevent errors for section commands. % Used in @ignore and in failing conditionals. \def\ignoresections{% \let\appendix=\relax \let\appendixsec=\relax \let\appendixsection=\relax \let\appendixsubsec=\relax \let\appendixsubsection=\relax \let\appendixsubsubsec=\relax \let\appendixsubsubsection=\relax %\let\begin=\relax %\let\bye=\relax \let\centerchap=\relax \let\chapter=\relax \let\contents=\relax \let\section=\relax \let\smallbook=\relax \let\subsec=\relax \let\subsection=\relax \let\subsubsec=\relax \let\subsubsection=\relax \let\titlepage=\relax \let\top=\relax \let\unnumbered=\relax \let\unnumberedsec=\relax \let\unnumberedsection=\relax \let\unnumberedsubsec=\relax \let\unnumberedsubsection=\relax \let\unnumberedsubsubsec=\relax \let\unnumberedsubsubsection=\relax } % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescriptionword{documentdescription} \def\documentdescription{\doignore{documentdescription}} \def\html{\doignore{html}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory = \comment % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode\spaceChar = 10 % % Ignore braces, so mismatched braces don't cause trouble. \catcode`\{ = 9 \catcode`\} = 9 % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \expandafter \dodoignore \csname#1\endcsname {#1}% } { \catcode`@=11 % We want to use \ST@P which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1#2{% % #1 contains, e.g., \ifinfo, a.k.a. @ifinfo. % #2 contains the string `ifinfo'. % % Define a command to find the next `@end #2', which must be on a line % by itself. \long\def\doignoretext##1^^M\end #2{\doignoretextyyy##1^^M#1\ST@P}% % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M#1##2\ST@P{\doignoreyyy{##2}\ST@P}% % % And now expand that command. \obeylines % \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \ST@P is present just after this macro. } % We have to swallow the remaining "\ST@P". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. \def\enddoignore{\endgroup\ignorespaces} % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % \def\set{\begingroup\catcode` =10 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. \fi \endgroup } % 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. % \def\clear{\parsearg\clearxxx} \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} % @value{foo} gets the text saved in variable foo. { \catcode`\_ = \active % % We might end up with active _ or - characters in the argument if % we're called from @code, as @code{@value{foo-bar_}}. So \let any % such active characters to their normal equivalents. \gdef\value{\begingroup \catcode`\-=\other \catcode`\_=\other \indexbreaks \let_\normalunderscore \valuexxx} } \def\valuexxx#1{\expandablevalue{#1}\endgroup} % We have this subroutine so that we can handle at least some @value's % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything % about that. The command has to be fully expandable (if the variable % is set), since the result winds up in the index file. This means that % if the variable's value contains other Texinfo commands, it's almost % certain it will fail (although perhaps we could fix that with % sufficient work to do a one-level expansion on the result, instead of % complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % \def\ifset{\parsearg\doifset} \def\doifset#1{% \expandafter\ifx\csname SET#1\endcsname\relax \let\next=\ifsetfail \else \let\next=\ifsetsucceed \fi \next } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\doignore{ifset}} \defineunmatchedend{ifset} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % \def\ifclear{\parsearg\doifclear} \def\doifclear#1{% \expandafter\ifx\csname SET#1\endcsname\relax \let\next=\ifclearsucceed \else \let\next=\ifclearfail \fi \next } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\doignore{ifclear}} \defineunmatchedend{ifclear} % @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we % read the text following, through the first @end iftex (etc.). Make % `@end iftex' (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \def\ifnothtml{\conditionalsucceed{ifnothtml}} \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}} \defineunmatchedend{iftex} \defineunmatchedend{ifnothtml} \defineunmatchedend{ifnotinfo} \defineunmatchedend{ifnotplaintext} % True conditional. Since \set globally defines its variables, we can % just start and end a group (to keep the @end definition undefined at % the outer level). % \def\conditionalsucceed#1{\begingroup \expandafter\def\csname E#1\endcsname{\endgroup}% } % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within \newindex. {\catcode`\@=11 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \undefined % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname\donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % \definedummyword defines \#1 as \realbackslash #1\space, thus % effectively preventing its expansion. This is used only for control % words, not control letters, because the \space would be incorrect % for control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword##1{% \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% }% \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% }% % % Do the redefinitions. \commondummies } % For the aux file, @ is the escape character. So we want to redefine % everything using @ instead of \realbackslash. When everything uses % @, this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % (See comments in \indexdummies.) \def\definedummyword##1{% \expandafter\def\csname ##1\endcsname{@##1\space}% }% \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{@##1}% }% % % Do the redefinitions. \commondummies } % Called from \indexdummies and \atdummies. \definedummyword and % \definedummyletter must be defined first. % \def\commondummies{% % \normalturnoffactive % % Control letters and accents. \definedummyletter{_}% \definedummyletter{,}% \definedummyletter{"}% \definedummyletter{`}% \definedummyletter{'}% \definedummyletter{^}% \definedummyletter{~}% \definedummyletter{=}% \definedummyword{u}% \definedummyword{v}% \definedummyword{H}% \definedummyword{dotaccent}% \definedummyword{ringaccent}% \definedummyword{tieaccent}% \definedummyword{ubaraccent}% \definedummyword{udotaccent}% \definedummyword{dotless}% % % Other non-English letters. \definedummyword{AA}% \definedummyword{AE}% \definedummyword{L}% \definedummyword{OE}% \definedummyword{O}% \definedummyword{aa}% \definedummyword{ae}% \definedummyword{l}% \definedummyword{oe}% \definedummyword{o}% \definedummyword{ss}% % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword{bf}% \definedummyword{gtr}% \definedummyword{hat}% \definedummyword{less}% \definedummyword{sf}% \definedummyword{sl}% \definedummyword{tclose}% \definedummyword{tt}% % % Texinfo font commands. \definedummyword{b}% \definedummyword{i}% \definedummyword{r}% \definedummyword{sc}% \definedummyword{t}% % \definedummyword{TeX}% \definedummyword{acronym}% \definedummyword{cite}% \definedummyword{code}% \definedummyword{command}% \definedummyword{dfn}% \definedummyword{dots}% \definedummyword{emph}% \definedummyword{env}% \definedummyword{file}% \definedummyword{kbd}% \definedummyword{key}% \definedummyword{math}% \definedummyword{option}% \definedummyword{samp}% \definedummyword{strong}% \definedummyword{uref}% \definedummyword{url}% \definedummyword{var}% \definedummyword{verb}% \definedummyword{w}% % % Assorted special characters. \definedummyword{bullet}% \definedummyword{copyright}% \definedummyword{dots}% \definedummyword{enddots}% \definedummyword{equiv}% \definedummyword{error}% \definedummyword{expansion}% \definedummyword{minus}% \definedummyword{pounds}% \definedummyword{point}% \definedummyword{print}% \definedummyword{result}% % % Handle some cases of @value -- where the variable name does not % contain - or _, and the value does not contain any % (non-fully-expandable) commands. \let\value = \expandablevalue % % Normal spaces, not active ones. \unsepspaces % % No macro expansion. \turnoffmacros } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexdummytex{TeX} \def\indexdummydots{...} % \def\indexnofonts{% \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % \let\,=\asis \let\"=\asis \let\`=\asis \let\'=\asis \let\^=\asis \let\~=\asis \let\==\asis \let\u=\asis \let\v=\asis \let\H=\asis \let\dotaccent=\asis \let\ringaccent=\asis \let\tieaccent=\asis \let\ubaraccent=\asis \let\udotaccent=\asis \let\dotless=\asis % % Other non-English letters. \def\AA{AA}% \def\AE{AE}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\aa{aa}% \def\ae{ae}% \def\l{l}% \def\oe{oe}% \def\o{o}% \def\ss{ss}% \def\exclamdown{!}% \def\questiondown{?}% % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % % Texinfo font commands. \let\b=\asis \let\i=\asis \let\r=\asis \let\sc=\asis \let\t=\asis % \let\TeX=\indexdummytex \let\acronym=\asis \let\cite=\asis \let\code=\asis \let\command=\asis \let\dfn=\asis \let\dots=\indexdummydots \let\emph=\asis \let\env=\asis \let\file=\asis \let\kbd=\asis \let\key=\asis \let\math=\asis \let\option=\asis \let\samp=\asis \let\strong=\asis \let\uref=\asis \let\url=\asis \let\var=\asis \let\verb=\asis \let\w=\asis } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % \empty if called from \doind, as we usually are. The main exception % is with defuns, which call us directly. % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \ifvmode \dosubindsanitize \else \dosubindwrite \fi }% \fi } % Write the entry to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\ \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write will make \lastskip zero. The result is that sequences % like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % \def\dosubindsanitize{% % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \skip0 = \lastskip \count255 = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\skip0 glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifdim\lastskip = 0pt \else \vskip-\skip0 \fi % \dosubindwrite % \ifdim\skip0 = 0pt % if \lastskip was zero, perhaps the last item was a % penalty, and perhaps it was >=10000, e.g., a \nobreak. % In that case, we want to re-insert the penalty; since we % just inserted a non-discardable item, any following glue % (such as a \parskip) would be a breakpoint. For example: % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\count255>9999 \nobreak \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\skip0 \fi } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \def\printindex{\parsearg\doprintindex} \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \everypar = {}% don't want the \kern\-parindent from indentation suppression. \indexbreaks % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \penalty -300 % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% \vskip .33\baselineskip plus .1\baselineskip % % Do our best not to break after the initial. \nobreak }} % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. % \def\entry#1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing columns. \vskip 0pt plus1pt % % Start a ``paragraph'' for the index entry so the line breaking % parameters we've set above will have an effect. \noindent % % Insert the text of the index entry. TeX will do line-breaking on it. #1% % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \def\tempa{{\rm }}% \def\tempb{#2}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd\ \else% % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else \ #2% The page number ends the paragraph. \fi \fi% \par \endgroup} % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % \unnumberedno is an oxymoron, of course. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise. % However, they are not reliable, because we don't use marks. \def\thischapter{} \def\thissection{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % Choose a numbered-heading macro % #1 is heading level if unmodified by @raisesections or @lowersections % #2 is text for heading \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \chapterzzz{#2}% \or \seczzz{#2}% \or \numberedsubseczzz{#2}% \or \numberedsubsubseczzz{#2}% \else \ifnum \absseclevel<0 \chapterzzz{#2}% \else \numberedsubsubseczzz{#2}% \fi \fi \suppressfirstparagraphindent } % like \numhead, but chooses appendix heading levels \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \appendixzzz{#2}% \or \appendixsectionzzz{#2}% \or \appendixsubseczzz{#2}% \or \appendixsubsubseczzz{#2}% \else \ifnum \absseclevel<0 \appendixzzz{#2}% \else \appendixsubsubseczzz{#2}% \fi \fi \suppressfirstparagraphindent } % like \numhead, but chooses numberless heading levels \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \unnumberedzzz{#2}% \or \unnumberedseczzz{#2}% \or \unnumberedsubseczzz{#2}% \or \unnumberedsubsubseczzz{#2}% \else \ifnum \absseclevel<0 \unnumberedzzz{#2}% \else \unnumberedsubsubseczzz{#2}% \fi \fi \suppressfirstparagraphindent } % @chapter, @appendix, @unnumbered. % \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy#1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 \message{\putwordChapter\space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy#1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \def\appendixnum{\putwordAppendix\space \appendixletter}% \message{\appendixnum}% \chapmacro{#1}{Yappendix}{\appendixletter}% \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\def\centerchap{\parsearg\centerchapyyy} \def\centerchapyyy#1{{\unnumberedyyy{#1}}} % @top is like @unnumbered. \outer\def\top{\parsearg\unnumberedyyy} \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy#1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}\message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy#1{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy#1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy#1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy#1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy#1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy#1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy#1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy#1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy#1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These are variants which are not "outer", so they can appear in @ifinfo. % Actually, they are now be obsolete; ordinary section commands should work. \def\infotop{\parsearg\unnumberedzzz} \def\infounnumbered{\parsearg\unnumberedzzz} \def\infounnumberedsec{\parsearg\unnumberedseczzz} \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} \def\infoappendix{\parsearg\appendixzzz} \def\infoappendixsec{\parsearg\appendixseczzz} \def\infoappendixsubsec{\parsearg\appendixsubseczzz} \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} \def\infochapter{\parsearg\chapterzzz} \def\infosection{\parsearg\sectionzzz} \def\infosubsection{\parsearg\subsectionzzz} \def\infosubsubsection{\parsearg\subsubsectionzzz} % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \def\heading{\parsearg\doheading} \def\subheading{\parsearg\dosubheading} \def\subsubheading{\parsearg\dosubsubheading} \def\doheading#1{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \def\dosubheading#1{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \def\dosubsubheading#1{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon \def\CHAPFplain{% \global\let\chapmacro=\chfplain \global\let\centerchapmacro=\centerchfplain} % Normal chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chfplain#1#2#3{% \pchapsepmacro {% \chapfonts \rm % % Have to define \thissection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\thissection{#1}% \gdef\thischaptername{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \def\thischapter{#1}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \xdef\thischapter{}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. And we don't % use \thissection because that changes with each section. % \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerchfplain#1{{% \def\centerparametersmaybe{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt }% \chfplain{#1}{Ynothing}{}% }} \CHAPFplain % The default % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\sectionheading#1#2#3#4{% {% % Switch to the right set of fonts. \csname #2fonts\endcsname \rm % % Insert space above the heading. \csname #2headingbreak\endcsname % % Only insert the space after the number if we have a section number. \def\sectionlevel{#2}% \def\temptype{#3}% % \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\thissection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \thissection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\thissection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\thissection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chfplain. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chfplain. \donoderef{#3}% % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) \vskip-\parskip % % This \nobreak is purely so the last item on the list is a \penalty % of 10000. This is so other code, for instance \parsebodycommon, can % check for and avoid allowing breakpoints. Otherwise, it would % insert a valid breakpoint between: % @section sec-whatever % @deffn def-whatever \nobreak } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks \toks0 = {#2}% \toks2 = \expandafter{\lastnode}% \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}% {\the\toks2}{\noexpand\folio}}}% \temp \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \def\thischapter{}% \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 % We can't do this, because then an actual ^ in a section % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. %\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. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % Normal (long) toc. \def\contents{% \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \pdfmakeoutlines \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 2pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % Final typesetting of a toc entry; we use the same \entry macro as for % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks % Do not use \turnoffactive in these arguments. Since the toc is % typeset in cmr, characters such as _ would come out wrong; we % have to do the usual translation tricks. \entry{#1}{#2}% \endgroup} % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} % \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{ \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\==\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @end lisp. % @lisp does a \begingroup so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % {\obeyspaces % \gdef\sepspaces{\obeyspaces\let =\tie}} % Define \obeyedspace to be our active space, whatever it is. This is % for use in \parsearg. {\sepspaces% \global\let\obeyedspace= } % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty>10000 \else \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \def\cartouche{% \par % can't be in the midst of a paragraph. \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing=\comment \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \hsize=\cartinner \kern3pt \begingroup \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \def\Ecartouche{% \endgroup \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \endgroup }} % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \let\exdent=\nofillexdent \let\nonarrowing=\relax \fi } % Define the \E... control sequence only if we are inside the particular % environment, so the error checking in \end will work. % % To end an @example-like environment, we first end the paragraph (via % \afterenvbreak's vertical glue), and then the group. That way we keep % the zero \parskip that the environments set -- \parskip glue will be % inserted at the beginning of the next paragraph in the document, after % the environment. % \def\nonfillfinish{\afterenvbreak\endgroup} % @lisp: indented, narrowed, typewriter font. \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. \def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% \smallexamplefonts \lisp } \let\smallexample = \smalllisp % @display: same as @lisp except keep current font. % \def\display{\begingroup \nonfillstart \let\Edisplay = \nonfillfinish \gobble } % % @smalldisplay: @display plus smaller fonts. % \def\smalldisplay{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% \smallexamplefonts \rm \display } % @format: same as @display except don't narrow margins. % \def\format{\begingroup \let\nonarrowing = t \nonfillstart \let\Eformat = \nonfillfinish \gobble } % % @smallformat: @format plus smaller fonts. % \def\smallformat{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% \smallexamplefonts \rm \format } % @flushleft (same as @format). % \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} % @flushright. % \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble } % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. % \def\quotation{% \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % We have retained a nonzero parskip for the environment, since we're % doing normal filling. So to avoid extra space below the environment... \def\Equotation{\parskip = 0pt \nonfillfinish}% % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \let\nonarrowing = \relax \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=12}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font \begingroup \catcode`\`=\active\gdef`{\relax\lq} \endgroup % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \catcode`\`=\active \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup \def\setupverbatim{% % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] %% Include LaTeX hack for completeness -- never know %% \begingroup %% \catcode`|=0 \catcode`[=1 %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ %% #1|endgroup|def|Everbatim[]|end[verbatim]] %% |endgroup % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}% \endgroup % \def\verbatim{% \def\Everbatim{\nonfillfinish\endgroup}% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim\doverbatim } % @verbatiminclude FILE - insert text of file in verbatim environment. % % Allow normal characters that we make active in the argument (a file name). \def\verbatiminclude{% \begingroup \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \parsearg\doverbatiminclude } \def\setupverbatiminclude{% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim } % \def\doverbatiminclude#1{% % Restore active chars for included file. \endgroup \begingroup \let\value=\expandablevalue \def\thisfile{#1}% \expandafter\expandafter\setupverbatiminclude\input\thisfile \endgroup \nonfillfinish \endgroup } % @copying ... @end copying. % Save the text away for @insertcopying later. Many commands won't be % allowed in this context, but that's ok. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\begingroup % Define a command to swallow text until we reach `@end copying'. % \ is the escape char in this texinfo.tex file, so it is the % delimiter for the command; @ will be the escape char when we read % it, but that doesn't matter. \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% % % We must preserve ^^M's in the input file; see \insertcopying below. \catcode`\^^M = \active \docopying } % What we do to finish off the copying text. % \def\enddocopying{\endgroup\ignorespaces} % @insertcopying. Here we must play games with ^^M's. On the one hand, % we need them to delimit commands such as `@end quotation', so they % must be active. On the other hand, we certainly don't want every % end-of-line to be a \par, as would happen with the normal active % definition of ^^M. On the third hand, two ^^M's in a row should still % generate a \par. % % Our approach is to make ^^M insert a space and a penalty1 normally; % then it can also check if \lastpenalty=1. If it does, then manually % do \par. % % This messes up the normal definitions of @c[omment], so we redefine % it. Similarly for @ignore. (These commands are used in the gcc % manual for man page generation.) % % Seems pretty fragile, most line-oriented commands will presumably % fail, but for the limited use of getting the copying text (which % should be quite simple) inserted, we can hope it's ok. % {\catcode`\^^M=\active % \gdef\insertcopying{\begingroup % \parindent = 0pt % looks wrong on title page \def^^M{% \ifnum \lastpenalty=1 % \par % \else % \space \penalty 1 % \fi % }% % % Fix @c[omment] for catcode 13 ^^M's. \def\c##1^^M{\ignorespaces}% \let\comment = \c % % % Don't bother jumping through all the hoops that \doignore does, it % would be very hard since the catcodes are already set. \long\def\ignore##1\end ignore{\ignorespaces}% % \copyingtext % \endgroup}% } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active \catcode`\[=\active \catcode`\]=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \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. \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. % also in that case restore the outer-level definition of (. \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % \gdef\normalparens{\boldbrax\let&=\ampnr} } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } \let\ampnr = \& \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % Active &'s sneak into the index arguments, so make sure it's defined. { \catcode`& = \active \global\let& = \ampnr } % \defname, which formats the name of the @def (not the args). % #1 is the function name. % #2 is the type of definition, such as "Function". % \def\defname#1#2{% % How we'll output the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#2}% \ifx\temp\empty \def\defnametype{}% \else \def\defnametype{[\rm #2]}% \fi % % Get the values of \leftskip and \rightskip as they were outside the @def... \dimen2=\leftskip \advance\dimen2 by -\defbodyindent % % Figure out values for the paragraph shape. \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}% \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line \dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations \parshape 2 0in \dimen0 \defargsindent \dimen1 % % Output arg 2 ("Function" or some such) but stuck inside a box of % width 0 so it does not interfere with linebreaking. \noindent % {% Adjust \hsize to exclude the ambient margins, % so that \rightline will obey them. \advance \hsize by -\dimen2 \dimen3 = 0pt % was -1.25pc \rlap{\rightline{\defnametype\kern\dimen3}}% }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent \exdentamount=\defbodyindent {\df #1}\enskip % output function name % \defunargs will be called next to output the arguments, if any. } % Common pieces to start any @def... % #1 is the \E... control sequence to end the definition (which we define). % #2 is the \...x control sequence (which our caller defines). % #3 is the control sequence to process the header, such as \defunheader. % \def\parsebodycommon#1#2#3{% \begingroup\inENV % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check for penalty 10002 (inserted by % \defargscommonending) instead of 10000, since the sectioning % commands insert a \penalty10000, and we don't want to allow a break % between a section heading and a defun. \ifnum\lastpenalty=10002 \penalty2000 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \ifnum\lastpenalty<10000 \medbreak \else \medskip % preceded by discardable penalty, so not a breakpoint \fi % % Define the \E... end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } % Common part of the \...x definitions. % \def\defxbodycommon{% % As with \parsebodycommon above, allow line break if we have multiple % x headers in a row. It's not a great place, though. \ifnum\lastpenalty=10002 \penalty2000 \fi % \begingroup\obeylines } % Process body of @defun, @deffn, @defmac, etc. % \def\defparsebody#1#2#3{% \parsebodycommon{#1}{#2}{#3}% \def#2{\defxbodycommon \activeparens \spacesplit#3}% \catcode\equalChar=\active \begingroup\obeylines\activeparens \spacesplit#3% } % #1, #2, #3 are the common arguments (see \parsebodycommon above). % #4, delimited by the space, is the class name. % \def\defmethparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}% \begingroup\obeylines\activeparens % The \empty here prevents misinterpretation of a construct such as % @deffn {whatever} {Enharmonic comma} % See comments at \deftpparsebody, although in our case we don't have % to remove the \empty afterwards, since it is empty. \spacesplit{#3{#4}}\empty } % Used for @deftypemethod and @deftypeivar. % #1, #2, #3 are the common arguments (see \defparsebody). % #4, delimited by a space, is the class name. % #5 is the method's return type. % \def\deftypemethparsebody#1#2#3#4 #5 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}% \begingroup\obeylines\activeparens \spacesplit{#3{#4}{#5}}% } % Used for @deftypeop. The change from \deftypemethparsebody is an % extra argument at the beginning which is the `category', instead of it % being the hardwired string `Method' or `Instance Variable'. We have % to account for this both in the \...x definition and in parsing the % input at hand. Thus also need a control sequence (passed as #5) for % the \E... definition to assign the category name to. % \def\deftypeopparsebody#1#2#3#4#5 #6 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 ##3 {\def#4{##1}% \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}% \begingroup\obeylines\activeparens \spacesplit{#3{#5}{#6}}% } % For @defop. \def\defopparsebody #1#2#3#4#5 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 {\def#4{##1}% \defxbodycommon \activeparens \spacesplit{#3{##2}}}% \begingroup\obeylines\activeparens \spacesplit{#3{#5}}% } % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. % \def\defvarparsebody #1#2#3{% \parsebodycommon{#1}{#2}{#3}% \def#2{\defxbodycommon \spacesplit#3}% \catcode\equalChar=\active \begingroup\obeylines \spacesplit#3% } % @defopvar. \def\defopvarparsebody #1#2#3#4#5 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 {\def#4{##1}% \defxbodycommon \spacesplit{#3{##2}}}% \begingroup\obeylines \spacesplit{#3{#5}}% } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% \begingroup\obeylines \spacesplit{#3{#4}}% } % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the % type is just `struct', because we lose the braces in `{struct % termios}' when \spacesplit reads its undelimited argument. Sigh. % \let\deftpparsebody=\defvrparsebody % % So, to get around this, we put \empty in with the type name. That % way, TeX won't find exactly `{...}' as an undelimited argument, and % won't strip off the braces. % \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% \begingroup\obeylines \spacesplit{\parsetpheaderline{#3{#4}}}\empty } % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% % Split up #2 (the rest of the input line) at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, % the second is all of #2 after that space token. % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. % {\obeylines % \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}% \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{% \ifx\relax #3% #1{#2}{}% \else % #1{#2}{#3#4}% \fi}% } % Define @defun. % This is called to end the arguments processing for all the @def... commands. % \def\defargscommonending{% \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty 10002 % signal to \parsebodycommon and \defxbodycommon. } % This expands the args and terminates the paragraph they comprise. % \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Set the font temporarily and use \font in case \setfont made \tensl a macro. {\tensl\hyphenchar\font=0}% #1% {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \defargscommonending } \def\deftypefunargs #1{% % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Use \boldbraxnoamp, not \functionparens, so that & is not special. \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \defargscommonending } % Do complete processing of one @defun or @defunx line already parsed. % @deffn Command forward-char nchars \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defun == @deffn Function \def\defun{\defparsebody\Edefun\defunx\defunheader} \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} % #1 is the data type. #2 is the name and args. \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} % #1 is the data type, #2 the name, #3 the args. \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} % \defheaderxcond#1\relax$.$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. \def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} % #1 is the classification, #2 the data type, #3 the name, #4 the args. \def\deftypefnheaderx #1#2#3 #4\relax{% \doind {fn}{\code{#3}}% Make entry in function index \begingroup \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working \defname {\defheaderxcond#2\relax$.$#3}{#1}% \deftypefunargs {#4}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defop CATEGORY CLASS OPERATION ARG... % \def\defop #1 {\def\defoptype{#1}% \defopparsebody\Edefop\defopx\defopheader\defoptype} % \def\defopheader#1#2#3{% \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry \begingroup \defname{#2}{\defoptype\ \putwordon\ #1}% \defunargs{#3}% \endgroup } % @deftypeop CATEGORY CLASS TYPE OPERATION ARG... % \def\deftypeop #1 {\def\deftypeopcategory{#1}% \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader \deftypeopcategory} % % #1 is the class name, #2 the data type, #3 the operation name, #4 the args. \def\deftypeopheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$.$#3} {\deftypeopcategory\ \putwordon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypemethod CLASS TYPE METHOD ARG... % \def\deftypemethod{% \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} % % #1 is the class name, #2 the data type, #3 the method name, #4 the args. \def\deftypemethodheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypeivar CLASS TYPE VARNAME % \def\deftypeivar{% \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} % % #1 is the class name, #2 the data type, #3 the variable name. \def\deftypeivarheader#1#2#3{% \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index \begingroup \defname{\defheaderxcond#2\relax$.$#3} {\putwordInstanceVariableof\ \code{#1}}% \defvarargs{#3}% \endgroup } % @defmethod == @defop Method % \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} % % #1 is the class name, #2 the method name, #3 the args. \def\defmethodheader#1#2#3{% \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{#2}{\putwordMethodon\ \code{#1}}% \defunargs{#3}% \endgroup } % @defcv {Class Option} foo-class foo-flag \def\defcv #1 {\def\defcvtype{#1}% \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry \begingroup \defname{#2}{\defcvtype\ \putwordof\ #1}% \defvarargs{#3}% \endgroup } % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME % \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} % \def\defivarheader#1#2#3{% \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% \defvarargs{#3}% \endgroup } % @defvar % First, define the processing that is wanted for arguments of @defvar. % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% \defargscommonending } % @defvr Counter foo-count \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} % @defvar == @defvr Variable \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefvar}% \defvarargs {#2}\endgroup % } % @defopt == @defvr {User Option} \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefopt}% \defvarargs {#2}\endgroup % } % @deftypevar int foobar \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name, perhaps followed by text that % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}% \defargscommonending \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1} \defargscommonending \endgroup} % Now define @deftp % Args are printed in bold, a slight difference from @defvar. \def\deftpargs #1{\bf \defvarargs{#1}} % @deftp Class window height width ... \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} % These definitions are used if you use @defunx (etc.) % anywhere other than immediately after a @defun or @defunx. % \def\defcvx#1 {\errmessage{@defcvx in invalid context}} \def\deffnx#1 {\errmessage{@deffnx in invalid context}} \def\defivarx#1 {\errmessage{@defivarx in invalid context}} \def\defmacx#1 {\errmessage{@defmacx in invalid context}} \def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} \def\defoptx #1 {\errmessage{@defoptx in invalid context}} \def\defopx#1 {\errmessage{@defopx in invalid context}} \def\defspecx#1 {\errmessage{@defspecx in invalid context}} \def\deftpx#1 {\errmessage{@deftpx in invalid context}} \def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} \def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} \def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} \def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} \def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} \def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} \def\defunx#1 {\errmessage{@defunx in invalid context}} \def\defvarx#1 {\errmessage{@defvarx in invalid context}} \def\defvrx#1 {\errmessage{@defvrx in invalid context}} \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \let\xeatspaces\eatspaces \input \jobname.tmp \endgroup } \else \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? \def\macrolist{} % List of all defined macros in the form % \do\macro1\do\macro2... % Utility routines. % Thisdoes \let #1 = #2, except with \csnames. \def\cslet#1#2{% \expandafter\expandafter \expandafter\let \expandafter\expandafter \csname#1\endcsname \csname#2\endcsname} % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\macrobodyctxt{% \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\{=\other \catcode`\}=\other \catcode`\@=\other \catcode`\^^M=\other \usembodybackslash} \def\macroargctxt{% \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\@=\other \catcode`\\=\other} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% % Add the macroname to \macrolist \toks0 = \expandafter{\macrolist\do}% \xdef\macrolist{\the\toks0 \expandafter\noexpand\csname\the\macname\endcsname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \def\unmacro{\parsearg\dounmacro} \def\dounmacro#1{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\do\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx#1\relax % remove this \else \noexpand\do \noexpand #1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \next} % We mant to disable all macros during \shipout so that they are not % expanded by \write. \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% \edef\next{\macrolist}\expandafter\endgroup\next} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{\ignoreactivespaces \edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% \expandafter\noexpand\csname#2\endcsname}% \expandafter\endgroup\next} \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. \def\node{\ENVcheck\parsearg\nodezzz} \def\nodezzz#1{\nodexxx #1,\finishnodeparse} \def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), namely NAME-title (the corresponding @chapter/etc. name), % NAME-pg (the page number), and NAME-snt (section number and type). % Called from \foonoderef. % % We take care not to expand the title. % % Use \turnoffactive so that punctuation chars such as underscore % and backslash work in node names. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \turnoffactive \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef } \toks0 = \expandafter{\thissection} \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \writexrdef{pg}{\folio}% will be written later, during \shipout }% \fi } % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printednodename{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printednodename{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printednodename{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printednodename{\ignorespaces #1}% \fi% \fi \fi \fi % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifpdf \leavevmode \getfilename{#4}% {\turnoffactive \otherbackslash \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1}% \else \startlink attr{/Border [0 0 0]}% goto name{\pdfmkpgn{#1}}% \fi }% \linkcolor \fi % \ifdim \wd1 > 0pt \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive \otherbackslash % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro. \xrefprintnodename\printednodename % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since not square brackets don't work in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname X#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. % \def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % Make the characters 128-255 be printing characters {% \count 1=128 \def\loop{% \catcode\count 1=\other \advance\count 1 by 1 \ifnum \count 1<256 \loop \fi }% }% % % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. \catcode`\\=\other % % @ is our escape character in .aux files. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 % \openin 1 \jobname.aux \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue \fi % Open the new aux file. TeX will close it automatically at exit. \openout\auxfile=\jobname.aux \endgroup} % Footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % % The start of the footnote looks usually like this: \gdef\startfootins{\insert\footins\bgroup} % % ... but this macro is redefined inside @multitable. % \gdef\dofootnote{% \startfootins % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else \closein 1 % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\bigskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \line\bgroup\hss \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \hss \egroup \bigbreak \fi % space after the image \endgroup} \message{localization,} % and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything % properly. Single argument is the language abbreviation. % It would be nice if we could set up a hyphenation file here. % \def\documentlanguage{\parsearg\dodocumentlanguage} \def\dodocumentlanguage#1{% \tex % read txi-??.tex file in plain TeX. % Read the file if it exists. \openin 1 txi-#1.tex \ifeof1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \let\temp = \relax \else \def\temp{\input txi-#1.tex }% \fi \temp \endgroup } \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} % @documentencoding should change something in TeX eventually, most % likely, but for now just recognize it. \let\documentencoding = \comment % Page size parameters. % \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) % physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{46\baselineskip}{6in}% {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.5 (or so) format. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {\voffset}{.25in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{51\baselineskip}{160mm} {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \def\pagesizes{\parsearg\pagesizesxxx} \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1 \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in ttfont % where it can probably just be output, and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % Set up an active definition for =, but don't enable it most of the time. {\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 outputs one backslash character in current font, % as in \char`\\. \global\chardef\rawbackslashxx=`\\ % \rawbackslash defines an active \ to do \rawbackslashxx. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. {\catcode`\\=\active @gdef@rawbackslash{@let\=@rawbackslashxx} @gdef@otherbackslash{@let\=@realbackslash} } % \realbackslash is an actual character `\' with catcode other. {\catcode`\\=\other @gdef@realbackslash{\}} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{% @let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix } % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. (Thus, \ is not expandable when this is in % effect.) % @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} % 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. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % 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 @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Set initial fonts. @textfonts @rm @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore autoconf2.59-2.59+dfsg/doc/make-stds.texi0000644000175000017500000011405407663164304017406 0ustar taffittaffit@comment This file is included by both standards.texi and make.texinfo. @comment It was broken out of standards.texi on 1/6/93 by roland. @node Makefile Conventions @chapter Makefile Conventions @comment standards.texi does not print an index, but make.texinfo does. @cindex makefile, conventions for @cindex conventions for makefiles @cindex standards for makefiles @c Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free @c Software Foundation, Inc. @c Permission is granted to copy, distribute and/or modify this document @c under the terms of the GNU Free Documentation License, Version 1.1 @c or any later version published by the Free Software Foundation; @c with no Invariant Sections, with no @c Front-Cover Texts, and with no Back-Cover Texts. @c A copy of the license is included in the section entitled ``GNU @c Free Documentation License''. This @ifinfo node @end ifinfo @iftex @ifset CODESTD section @end ifset @ifclear CODESTD chapter @end ifclear @end iftex describes conventions for writing the Makefiles for GNU programs. Using Automake will help you write a Makefile that follows these conventions. @menu * Makefile Basics:: General Conventions for Makefiles * Utilities in Makefiles:: Utilities in Makefiles * Command Variables:: Variables for Specifying Commands * Directory Variables:: Variables for Installation Directories * Standard Targets:: Standard Targets for Users * Install Command Categories:: Three categories of commands in the `install' rule: normal, pre-install and post-install. @end menu @node Makefile Basics @section General Conventions for Makefiles Every Makefile should contain this line: @example SHELL = /bin/sh @end example @noindent to avoid trouble on systems where the @code{SHELL} variable might be inherited from the environment. (This is never a problem with GNU @code{make}.) Different @code{make} programs have incompatible suffix lists and implicit rules, and this sometimes creates confusion or misbehavior. So it is a good idea to set the suffix list explicitly using only the suffixes you need in the particular Makefile, like this: @example .SUFFIXES: .SUFFIXES: .c .o @end example @noindent The first line clears out the suffix list, the second introduces all suffixes which may be subject to implicit rules in this Makefile. Don't assume that @file{.} is in the path for command execution. When you need to run programs that are a part of your package during the make, please make sure that it uses @file{./} if the program is built as part of the make or @file{$(srcdir)/} if the file is an unchanging part of the source code. Without one of these prefixes, the current search path is used. The distinction between @file{./} (the @dfn{build directory}) and @file{$(srcdir)/} (the @dfn{source directory}) is important because users can build in a separate directory using the @samp{--srcdir} option to @file{configure}. A rule of the form: @smallexample foo.1 : foo.man sedscript sed -e sedscript foo.man > foo.1 @end smallexample @noindent will fail when the build directory is not the source directory, because @file{foo.man} and @file{sedscript} are in the source directory. When using GNU @code{make}, relying on @samp{VPATH} to find the source file will work in the case where there is a single dependency file, since the @code{make} automatic variable @samp{$<} will represent the source file wherever it is. (Many versions of @code{make} set @samp{$<} only in implicit rules.) A Makefile target like @smallexample foo.o : bar.c $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o @end smallexample @noindent should instead be written as @smallexample foo.o : bar.c $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@@ @end smallexample @noindent in order to allow @samp{VPATH} to work correctly. When the target has multiple dependencies, using an explicit @samp{$(srcdir)} is the easiest way to make the rule work well. For example, the target above for @file{foo.1} is best written as: @smallexample foo.1 : foo.man sedscript sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@@ @end smallexample GNU distributions usually contain some files which are not source files---for example, Info files, and the output from Autoconf, Automake, Bison or Flex. Since these files normally appear in the source directory, they should always appear in the source directory, not in the build directory. So Makefile rules to update them should put the updated files in the source directory. However, if a file does not appear in the distribution, then the Makefile should not put it in the source directory, because building a program in ordinary circumstances should not modify the source directory in any way. Try to make the build and installation targets, at least (and all their subtargets) work correctly with a parallel @code{make}. @node Utilities in Makefiles @section Utilities in Makefiles Write the Makefile commands (and any shell scripts, such as @code{configure}) to run in @code{sh}, not in @code{csh}. Don't use any special features of @code{ksh} or @code{bash}. The @code{configure} script and the Makefile rules for building and installation should not use any utilities directly except these: @c dd find @c gunzip gzip md5sum @c mkfifo mknod tee uname @example cat cmp cp diff echo egrep expr false grep install-info ln ls mkdir mv pwd rm rmdir sed sleep sort tar test touch true @end example The compression program @code{gzip} can be used in the @code{dist} rule. Stick to the generally supported options for these programs. For example, don't use @samp{mkdir -p}, convenient as it may be, because most systems don't support it. It is a good idea to avoid creating symbolic links in makefiles, since a few systems don't support them. The Makefile rules for building and installation can also use compilers and related programs, but should do so via @code{make} variables so that the user can substitute alternatives. Here are some of the programs we mean: @example ar bison cc flex install ld ldconfig lex make makeinfo ranlib texi2dvi yacc @end example Use the following @code{make} variables to run those programs: @example $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LDCONFIG) $(LEX) $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC) @end example When you use @code{ranlib} or @code{ldconfig}, you should make sure nothing bad happens if the system does not have the program in question. Arrange to ignore an error from that command, and print a message before the command to tell the user that failure of this command does not mean a problem. (The Autoconf @samp{AC_PROG_RANLIB} macro can help with this.) If you use symbolic links, you should implement a fallback for systems that don't have symbolic links. Additional utilities that can be used via Make variables are: @example chgrp chmod chown mknod @end example It is ok to use other utilities in Makefile portions (or scripts) intended only for particular systems where you know those utilities exist. @node Command Variables @section Variables for Specifying Commands Makefiles should provide variables for overriding certain commands, options, and so on. In particular, you should run most utility programs via variables. Thus, if you use Bison, have a variable named @code{BISON} whose default value is set with @samp{BISON = bison}, and refer to it with @code{$(BISON)} whenever you need to use Bison. File management utilities such as @code{ln}, @code{rm}, @code{mv}, and so on, need not be referred to through variables in this way, since users don't need to replace them with other programs. Each program-name variable should come with an options variable that is used to supply options to the program. Append @samp{FLAGS} to the program-name variable name to get the options variable name---for example, @code{BISONFLAGS}. (The names @code{CFLAGS} for the C compiler, @code{YFLAGS} for yacc, and @code{LFLAGS} for lex, are exceptions to this rule, but we keep them because they are standard.) Use @code{CPPFLAGS} in any compilation command that runs the preprocessor, and use @code{LDFLAGS} in any compilation command that does linking as well as in any direct use of @code{ld}. If there are C compiler options that @emph{must} be used for proper compilation of certain files, do not include them in @code{CFLAGS}. Users expect to be able to specify @code{CFLAGS} freely themselves. Instead, arrange to pass the necessary options to the C compiler independently of @code{CFLAGS}, by writing them explicitly in the compilation commands or by defining an implicit rule, like this: @smallexample CFLAGS = -g ALL_CFLAGS = -I. $(CFLAGS) .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< @end smallexample Do include the @samp{-g} option in @code{CFLAGS}, because that is not @emph{required} for proper compilation. You can consider it a default that is only recommended. If the package is set up so that it is compiled with GCC by default, then you might as well include @samp{-O} in the default value of @code{CFLAGS} as well. Put @code{CFLAGS} last in the compilation command, after other variables containing compiler options, so the user can use @code{CFLAGS} to override the others. @code{CFLAGS} should be used in every invocation of the C compiler, both those which do compilation and those which do linking. Every Makefile should define the variable @code{INSTALL}, which is the basic command for installing a file into the system. Every Makefile should also define the variables @code{INSTALL_PROGRAM} and @code{INSTALL_DATA}. (The default for @code{INSTALL_PROGRAM} should be @code{$(INSTALL)}; the default for @code{INSTALL_DATA} should be @code{$@{INSTALL@} -m 644}.) Then it should use those variables as the commands for actual installation, for executables and nonexecutables respectively. Use these variables as follows: @example $(INSTALL_PROGRAM) foo $(bindir)/foo $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a @end example Optionally, you may prepend the value of @code{DESTDIR} to the target filename. Doing this allows the installer to create a snapshot of the installation to be copied onto the real target filesystem later. Do not set the value of @code{DESTDIR} in your Makefile, and do not include it in any installed files. With support for @code{DESTDIR}, the above examples become: @example $(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo $(INSTALL_DATA) libfoo.a $(DESTDIR)$(libdir)/libfoo.a @end example @noindent Always use a file name, not a directory name, as the second argument of the installation commands. Use a separate command for each file to be installed. @node Directory Variables @section Variables for Installation Directories Installation directories should always be named by variables, so it is easy to install in a nonstandard place. The standard names for these variables are described below. They are based on a standard filesystem layout; variants of it are used in SVR4, 4.4BSD, GNU/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, and nothing should be directly installed into these two directories. @table @code @item prefix @vindex 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}. When building the complete GNU system, the prefix will be empty and @file{/usr} will be a symbolic link to @file{/}. (If you are using Autoconf, write it as @samp{@@prefix@@}.) Running @samp{make install} with a different value of @code{prefix} from the one used to build the program should @emph{not} recompile the program. @item exec_prefix @vindex exec_prefix A prefix used in constructing the default values of some of the variables listed below. The default value of @code{exec_prefix} should be @code{$(prefix)}. (If you are using Autoconf, write it as @samp{@@exec_prefix@@}.) Generally, @code{$(exec_prefix)} is used for directories that contain machine-specific files (such as executables and subroutine libraries), while @code{$(prefix)} is used directly for other directories. Running @samp{make install} with a different value of @code{exec_prefix} from the one used to build the program should @emph{not} recompile the program. @end table Executable programs are installed in one of the following directories. @table @code @item bindir @vindex bindir The directory for installing executable programs that users can run. This should normally be @file{/usr/local/bin}, but write it as @file{$(exec_prefix)/bin}. (If you are using Autoconf, write it as @samp{@@bindir@@}.) @item sbindir @vindex sbindir The directory for installing executable programs that can be run from the shell, but are only generally useful to system administrators. This should normally be @file{/usr/local/sbin}, but write it as @file{$(exec_prefix)/sbin}. (If you are using Autoconf, write it as @samp{@@sbindir@@}.) @item libexecdir @vindex libexecdir @comment This paragraph adjusted to avoid overfull hbox --roland 5jul94 The directory for installing executable programs to be run by other programs rather than by users. This directory should normally be @file{/usr/local/libexec}, but write it as @file{$(exec_prefix)/libexec}. (If you are using Autoconf, write it as @samp{@@libexecdir@@}.) @end table Data files used by the program during its execution are divided into categories in two ways. @itemize @bullet @item Some files are normally modified by programs; others are never normally modified (though users may edit some of these). @item Some files are architecture-independent and can be shared by all machines at a site; some are architecture-dependent and can be shared only by machines of the same kind and operating system; others may never be shared between two machines. @end itemize This makes for six different possibilities. However, we want to discourage the use of architecture-dependent files, aside from object files and libraries. It is much cleaner to make other data files architecture-independent, and it is generally not hard. Here are the variables Makefiles should use to specify directories to put these various kinds of files in: @table @samp @item datarootdir The root of the directory tree for read-only architecture-independent data files. This should normally be @file{/usr/local/share}, but write it as @file{$(prefix)/share}. @samp{datadir}'s default value is based on this variable; so are @samp{infodir}, @samp{mandir}, and others. @item datadir The directory for installing ideosyncratic read-only architecture-independent data files for this program. This is usually the same place as @samp{datarootdir}, but we use the two separate variables so that you can move these ideosyncratic files without altering the location for Info files, man pages, etc. The default definition of @samp{datadir} should be @file{$(datarootdir)}. (If you are using Autoconf, write it as @samp{@@datadir@@}.) @item sysconfdir The directory for installing read-only data files that pertain to a single machine--that is to say, files for configuring a host. Mailer and network configuration files, @file{/etc/passwd}, and so forth belong here. All the files in this directory should be ordinary ASCII text files. This directory should normally be @file{/usr/local/etc}, but write it as @file{$(prefix)/etc}. (If you are using Autoconf, write it as @samp{@@sysconfdir@@}.) Do not install executables here in this directory (they probably belong in @file{$(libexecdir)} or @file{$(sbindir)}). Also do not install files that are modified in the normal course of their use (programs whose purpose is to change the configuration of the system excluded). Those probably belong in @file{$(localstatedir)}. @item sharedstatedir The directory for installing architecture-independent data files which the programs modify while they run. This should normally be @file{/usr/local/com}, but write it as @file{$(prefix)/com}. (If you are using Autoconf, write it as @samp{@@sharedstatedir@@}.) @item localstatedir The directory for installing data files which the programs modify while they run, and that pertain to one specific machine. Users should never need to modify files in this directory to configure the package's operation; put such configuration information in separate files that go in @file{$(datadir)} or @file{$(sysconfdir)}. @file{$(localstatedir)} should normally be @file{/usr/local/var}, but write it as @file{$(prefix)/var}. (If you are using Autoconf, write it as @samp{@@localstatedir@@}.) @end table These variables specify the directory for installing certain specific types of files, if your program has them. Every GNU package should have Info files, so every program needs @samp{infodir}, but not all need @samp{libdir} or @samp{lispdir}. @table @samp @item includedir @c rewritten to avoid overfull hbox --roland The directory for installing header files to be included by user programs with the C @samp{#include} preprocessor directive. This should normally be @file{/usr/local/include}, but write it as @file{$(prefix)/include}. (If you are using Autoconf, write it as @samp{@@includedir@@}.) Most compilers other than GCC do not look for header files in directory @file{/usr/local/include}. So installing the header files this way is only useful with GCC. Sometimes this is not a problem because some libraries are only really intended to work with GCC. But some libraries are intended to work with other compilers. They should install their header files in two places, one specified by @code{includedir} and one specified by @code{oldincludedir}. @item oldincludedir The directory for installing @samp{#include} header files for use with compilers other than GCC. This should normally be @file{/usr/include}. (If you are using Autoconf, you can write it as @samp{@@oldincludedir@@}.) The Makefile commands should check whether the value of @code{oldincludedir} is empty. If it is, they should not try to use it; they should cancel the second installation of the header files. A package should not replace an existing header in this directory unless the header came from the same package. Thus, if your Foo package provides a header file @file{foo.h}, then it should install the header file in the @code{oldincludedir} directory if either (1) there is no @file{foo.h} there or (2) the @file{foo.h} that exists came from the Foo package. To tell whether @file{foo.h} came from the Foo package, put a magic string in the file---part of a comment---and @code{grep} for that string. @item infodir The directory for installing the Info files for this package. By default, it should be @file{/usr/local/share/info}, but it should be written as @file{$(datarootdir)/info}. (If you are using Autoconf, write it as @samp{@@infodir@@}.) @item libdir The directory for object files and libraries of object code. Do not install executables here, they probably ought to go in @file{$(libexecdir)} instead. The value of @code{libdir} should normally be @file{/usr/local/lib}, but write it as @file{$(exec_prefix)/lib}. (If you are using Autoconf, write it as @samp{@@libdir@@}.) @item lispdir The directory for installing any Emacs Lisp files in this package. By default, it should be @file{/usr/local/share/emacs/site-lisp}, but it should be written as @file{$(datarootdir)/emacs/site-lisp}. If you are using Autoconf, write the default as @samp{@@lispdir@@}. In order to make @samp{@@lispdir@@} work, you need the following lines in your @file{configure.in} file: @example lispdir='$@{datarootdir@}/emacs/site-lisp' AC_SUBST(lispdir) @end example @item localedir The directory for installing locale-specific message catalogs for this package. By default, it should be @file{/usr/local/share/locale}, but it should be written as @file{$(datarootdir)/locale}. (If you are using Autoconf, write it as @samp{@@localedir@@}.) @end table Unix-style man pages are installed in one of the following: @table @samp @item mandir The top-level directory for installing the man pages (if any) for this package. It will normally be @file{/usr/local/share/man}, but you should write it as @file{$(datarootdir)/man}. (If you are using Autoconf, write it as @samp{@@mandir@@}.) @item man1dir The directory for installing section 1 man pages. Write it as @file{$(mandir)/man1}. @item man2dir The directory for installing section 2 man pages. Write it as @file{$(mandir)/man2} @item @dots{} @strong{Don't make the primary documentation for any GNU software be a man page. Write a manual in Texinfo instead. Man pages are just for the sake of people running GNU software on Unix, which is a secondary application only.} @item manext The file name extension for the installed man page. This should contain a period followed by the appropriate digit; it should normally be @samp{.1}. @item man1ext The file name extension for installed section 1 man pages. @item man2ext The file name extension for installed section 2 man pages. @item @dots{} Use these names instead of @samp{manext} if the package needs to install man pages in more than one section of the manual. @end table And finally, you should set the following variable: @table @samp @item srcdir The directory for the sources being compiled. The value of this variable is normally inserted by the @code{configure} shell script. (If you are using Autconf, use @samp{srcdir = @@srcdir@@}.) @end table For example: @smallexample @c I have changed some of the comments here slightly to fix an overfull @c hbox, so the make manual can format correctly. --roland # Common prefix for installation directories. # NOTE: This directory must exist when you start the install. prefix = /usr/local datarootdir = $(prefix)/share datadir = $(datarootdir) exec_prefix = $(prefix) # Where to put the executable for the command `gcc'. bindir = $(exec_prefix)/bin # Where to put the directories used by the compiler. libexecdir = $(exec_prefix)/libexec # Where to put the Info files. infodir = $(datarootdir)/info @end smallexample If your program installs a large number of files into one of the standard user-specified directories, it might be useful to group them into a subdirectory particular to that program. If you do this, you should write the @code{install} rule to create these subdirectories. Do not expect the user to include the subdirectory name in the value of any of the variables listed above. The idea of having a uniform set of variable names for installation directories is to enable the user to specify the exact same values for several different GNU packages. In order for this to be useful, all the packages must be designed so that they will work sensibly when the user does so. @node Standard Targets @section Standard Targets for Users All GNU programs should have the following targets in their Makefiles: @table @samp @item all Compile the entire program. This should be the default target. This target need not rebuild any documentation files; Info files should normally be included in the distribution, and DVI files should be made only when explicitly asked for. By default, the Make rules should compile and link with @samp{-g}, so that executable programs have debugging symbols. Users who don't mind being helpless can strip the executables later if they wish. @item install Compile the program and copy the executables, libraries, and so on to the file names where they should reside for actual use. If there is a simple test to verify that a program is properly installed, this target should run that test. Do not strip executables when installing them. Devil-may-care users can use the @code{install-strip} target to do that. 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 @code{exec_prefix}, as well as all subdirectories that are needed. One way to do this is by means of an @code{installdirs} target as described below. Use @samp{-} before any command for installing a man page, so that @code{make} will ignore any errors. This is in case there are systems that don't have the Unix man page documentation system installed. The way to install Info files is to copy them into @file{$(infodir)} with @code{$(INSTALL_DATA)} (@pxref{Command Variables}), and then run the @code{install-info} program if it is present. @code{install-info} is a program that edits the Info @file{dir} file to add or update the menu entry for the given Info file; it is part of the Texinfo package. Here is a sample rule to install an Info file: @comment This example has been carefully formatted for the Make manual. @comment Please do not reformat it without talking to roland@gnu.ai.mit.edu. @smallexample $(DESTDIR)$(infodir)/foo.info: foo.info $(POST_INSTALL) # There may be a newer info file in . than in srcdir. -if test -f foo.info; then d=.; \ else d=$(srcdir); fi; \ $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@@; \ # Run install-info only if it exists. # Use `if' instead of just prepending `-' to the # line so we notice real errors from install-info. # We use `$(SHELL) -c' because some shells do not # fail gracefully when there is an unknown command. if $(SHELL) -c 'install-info --version' \ >/dev/null 2>&1; then \ install-info --dir-file=$(DESTDIR)$(infodir)/dir \ $(DESTDIR)$(infodir)/foo.info; \ else true; fi @end smallexample When writing the @code{install} target, you must classify all the commands into three categories: normal ones, @dfn{pre-installation} commands and @dfn{post-installation} commands. @xref{Install Command Categories}. @item uninstall Delete all the installed files---the copies that the @samp{install} target creates. This rule should not modify the directories where compilation is done, only the directories where files are installed. The uninstallation commands are divided into three categories, just like the installation commands. @xref{Install Command Categories}. @item install-strip Like @code{install}, but strip the executable files while installing them. In simple cases, this target can use the @code{install} target in a simple way: @smallexample install-strip: $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ install @end smallexample But if the package installs scripts as well as real executables, the @code{install-strip} target can't just refer to the @code{install} target; it has to strip the executables but not the scripts. @code{install-strip} should not strip the executables in the build directory which are being copied for installation. It should only strip the copies that are installed. Normally we do not recommend stripping an executable unless you are sure the program has no bugs. However, it can be reasonable to install a stripped executable for actual execution while saving the unstripped executable elsewhere in case there is a bug. @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 Delete all files from the current directory that are normally created by building the program. Don't delete the files that record the configuration. Also preserve files that could be made by building, but normally aren't because the distribution comes with them. Delete @file{.dvi} files here if they are not part of the distribution. @item distclean Delete all files from the current directory that are created by configuring or building the program. If you have unpacked the source and built the program without creating any other files, @samp{make distclean} should leave only the files that were in the distribution. @item mostlyclean Like @samp{clean}, but may refrain from deleting a few files that people normally don't want to recompile. For example, the @samp{mostlyclean} target for GCC does not delete @file{libgcc.a}, because recompiling it is rarely necessary and takes a lot of time. @item 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 running the command @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} target 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 the special @code{maintainer-clean} target should start with these two: @smallexample @@echo 'This command is intended for maintainers to use; it' @@echo 'deletes files that may need special tools to rebuild.' @end smallexample @item TAGS Update a tags table for this program. @c ADR: how? @item info Generate any Info files needed. The best way to write the rules is as follows: @smallexample info: foo.info foo.info: foo.texi chap1.texi chap2.texi $(MAKEINFO) $(srcdir)/foo.texi @end smallexample @noindent You must define the variable @code{MAKEINFO} in the Makefile. It should run the @code{makeinfo} program, which is part of the Texinfo distribution. Normally a GNU distribution comes with Info files, and that means the Info files are present in the source directory. Therefore, the Make rule for an info file should update it in the source directory. When users build the package, ordinarily Make will not update the Info files because they will already be up to date. @item dvi Generate DVI files for all Texinfo documentation. For example: @smallexample dvi: foo.dvi foo.dvi: foo.texi chap1.texi chap2.texi $(TEXI2DVI) $(srcdir)/foo.texi @end smallexample @noindent You must define the variable @code{TEXI2DVI} in the Makefile. It should run the program @code{texi2dvi}, which is part of the Texinfo distribution.@footnote{@code{texi2dvi} uses @TeX{} to do the real work of formatting. @TeX{} is not distributed with Texinfo.} Alternatively, write just the dependencies, and allow GNU @code{make} to provide the command. @item dist Create a distribution tar file for this program. The tar file should be set up so that the file names in the tar file start with a subdirectory name which is the name of the package it is a distribution for. This name can include the version number. For example, the distribution tar file of GCC version 1.40 unpacks into a subdirectory named @file{gcc-1.40}. The easiest way to do this is to create a subdirectory appropriately named, use @code{ln} or @code{cp} to install the proper files in it, and then @code{tar} that subdirectory. Compress the tar file with @code{gzip}. For example, the actual distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}. The @code{dist} target should explicitly depend on all non-source files that are in the distribution, to make sure they are up to date in the distribution. @ifset CODESTD @xref{Releases, , Making Releases}. @end ifset @ifclear CODESTD @xref{Releases, , Making Releases, standards, GNU Coding Standards}. @end ifclear @item check Perform self-tests (if any). The user must build the program before running the tests, but need not install the program; you should write the self-tests so that they work when the program is built but not installed. @end table The following targets are suggested as conventional names, for programs in which they are useful. @table @code @item installcheck Perform installation tests (if any). The user must build and install the program before running the tests. You should not assume that @file{$(bindir)} is in the search path. @item installdirs It's useful to add a target named @samp{installdirs} to create the directories where files are installed, and their parent directories. There is a script called @file{mkinstalldirs} which is convenient for this; you can find it in the Texinfo package. @c It's in /gd/gnu/lib/mkinstalldirs. You can use a rule like this: @comment This has been carefully formatted to look decent in the Make manual. @comment Please be sure not to make it extend any further to the right.--roland @smallexample # Make sure all installation directories (e.g. $(bindir)) # actually exist by making them if necessary. installdirs: mkinstalldirs $(srcdir)/mkinstalldirs $(bindir) $(datadir) \ $(libdir) $(infodir) \ $(mandir) @end smallexample @noindent or, if you wish to support @env{DESTDIR}, @smallexample # Make sure all installation directories (e.g. $(bindir)) # actually exist by making them if necessary. installdirs: mkinstalldirs $(srcdir)/mkinstalldirs \ $(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \ $(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \ $(DESTDIR)$(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 Install Command Categories @section Install Command Categories @cindex pre-installation commands @cindex post-installation commands When writing the @code{install} target, you must classify all the commands into three categories: normal ones, @dfn{pre-installation} commands and @dfn{post-installation} commands. Normal commands move files into their proper places, and set their modes. They may not alter any files except the ones that come entirely from the package they belong to. Pre-installation and post-installation commands may alter other files; in particular, they can edit global configuration files or data bases. Pre-installation commands are typically executed before the normal commands, and post-installation commands are typically run after the normal commands. The most common use for a post-installation command is to run @code{install-info}. This cannot be done with a normal command, since it alters a file (the Info directory) which does not come entirely and solely from the package being installed. It is a post-installation command because it needs to be done after the normal command which installs the package's Info files. Most programs don't need any pre-installation commands, but we have the feature just in case it is needed. To classify the commands in the @code{install} rule into these three categories, insert @dfn{category lines} among them. A category line specifies the category for the commands that follow. A category line consists of a tab and a reference to a special Make variable, plus an optional comment at the end. There are three variables you can use, one for each category; the variable name specifies the category. Category lines are no-ops in ordinary execution because these three Make variables are normally undefined (and you @emph{should not} define them in the makefile). Here are the three possible category lines, each with a comment that explains what it means: @smallexample $(PRE_INSTALL) # @r{Pre-install commands follow.} $(POST_INSTALL) # @r{Post-install commands follow.} $(NORMAL_INSTALL) # @r{Normal commands follow.} @end smallexample If you don't use a category line at the beginning of the @code{install} rule, all the commands are classified as normal until the first category line. If you don't use any category lines, all the commands are classified as normal. These are the category lines for @code{uninstall}: @smallexample $(PRE_UNINSTALL) # @r{Pre-uninstall commands follow.} $(POST_UNINSTALL) # @r{Post-uninstall commands follow.} $(NORMAL_UNINSTALL) # @r{Normal commands follow.} @end smallexample Typically, a pre-uninstall command would be used for deleting entries from the Info directory. If the @code{install} or @code{uninstall} target has any dependencies which act as subroutines of installation, then you should start @emph{each} dependency's commands with a category line, and start the main target's commands with a category line also. This way, you can ensure that each command is placed in the right category regardless of which of the dependencies actually run. Pre-installation and post-installation commands should not run any programs except for these: @example [ basename bash cat chgrp chmod chown cmp cp dd diff echo egrep expand expr false fgrep find getopt grep gunzip gzip hostname install install-info kill ldconfig ln ls md5sum mkdir mkfifo mknod mv printenv pwd rm rmdir sed sort tee test touch true uname xargs yes @end example @cindex binary packages The reason for distinguishing the commands in this way is for the sake of making binary packages. Typically a binary package contains all the executables and other files that need to be installed, and has its own method of installing them---so it does not need to run the normal installation commands. But installing the binary package does need to execute the pre-installation and post-installation commands. Programs to build binary packages work by extracting the pre-installation and post-installation commands. Here is one way of extracting the pre-installation commands: @smallexample make -n install -o all \ PRE_INSTALL=pre-install \ POST_INSTALL=post-install \ NORMAL_INSTALL=normal-install \ | gawk -f pre-install.awk @end smallexample @noindent where the file @file{pre-install.awk} could contain this: @smallexample $0 ~ /^\t[ \t]*(normal_install|post_install)[ \t]*$/ @{on = 0@} on @{print $0@} $0 ~ /^\t[ \t]*pre_install[ \t]*$/ @{on = 1@} @end smallexample The resulting file of pre-installation commands is executed as a shell script as part of installing the binary package. autoconf2.59-2.59+dfsg/doc/install.texi0000644000175000017500000002416607532634026017166 0ustar taffittaffit@c This file is included by autoconf.texi and is used to produce @c the INSTALL file. @ifclear autoconf Copyright @copyright{} 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @end ifclear @node Basic Installation @section Basic Installation These are generic installation instructions. The @command{configure} shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a @file{Makefile} in each directory of the package. It may also create one or more @file{.h} files containing system-dependent definitions. Finally, it creates a shell script @file{config.status} that you can run in the future to recreate the current configuration, and a file @file{config.log} containing compiler output (useful mainly for debugging @command{configure}). It can also use an optional file (typically called @file{config.cache} and enabled with @option{--cache-file=config.cache} or simply @option{-C}) that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how @command{configure} could check whether to do them, and mail diffs or instructions to the address given in the @file{README} so they can be considered for the next release. If you are using the cache, and at some point @file{config.cache} contains results you don't want to keep, you may remove or edit it. The file @file{configure.ac} (or @file{configure.in}) is used to create @file{configure} by a program called @code{autoconf}. You only need @file{configure.ac} if you want to change it or regenerate @file{configure} using a newer version of @code{autoconf}. @noindent The simplest way to compile this package is: @enumerate @item @code{cd} to the directory containing the package's source code and type @samp{./configure} to configure the package for your system. If you're using @code{csh} on an old version of System V, you might need to type @samp{sh ./configure} instead to prevent @code{csh} from trying to execute @command{configure} itself. Running @command{configure} takes awhile. While running, it prints some messages telling which features it is checking for. @item Type @samp{make} to compile the package. @item Optionally, type @samp{make check} to run any self-tests that come with the package. @item Type @samp{make install} to install the programs and any data files and documentation. @item You can remove the program binaries and object files from the source code directory by typing @samp{make clean}. To also remove the files that @command{configure} created (so you can compile the package for a different 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 @section Compilers and Options Some systems require unusual options for compilation or linking that the @command{configure} script does not know about. Run @samp{./configure --help} for details on some of the pertinent environment variables. You can give @command{configure} initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: @example ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix @end example @xref{Defining Variables}, for more details. @node Multiple Architectures @section Compiling For Multiple Architectures 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 @command{make} that supports the @code{VPATH} variable, such as GNU @command{make}. @command{cd} to the directory where you want the object files and executables to go and run the @command{configure} script. @command{configure} automatically checks for the source code in the directory that @command{configure} is in and in @file{..}. If you have to use a @command{make} that does not support 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 By default, @samp{make install} will install the package's files in @file{/usr/local/bin}, @file{/usr/local/man}, etc. You can specify an installation prefix other than @file{/usr/local} by giving @command{configure} the option @option{--prefix=@var{path}}. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give @command{configure} the option @option{--exec-prefix=@var{path}}, the package will use @var{path} as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like @option{--bindir=@var{path}} to specify different values for particular kinds of files. Run @samp{configure --help} for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving @command{configure} the option @option{--program-prefix=@var{PREFIX}} or @option{--program-suffix=@var{SUFFIX}}. @node Optional Features @section Optional Features Some packages pay attention to @option{--enable-@var{feature}} options to @command{configure}, where @var{feature} indicates an optional part of the package. They may also pay attention to @option{--with-@var{package}} options, where @var{package} is something like @samp{gnu-as} or @samp{x} (for the X Window System). The @file{README} should mention any @option{--enable-} and @option{--with-} options that the package recognizes. For packages that use the X Window System, @command{configure} can usually find the X include and library files automatically, but if it doesn't, you can use the @command{configure} options @option{--x-includes=@var{dir}} and @option{--x-libraries=@var{dir}} to specify their locations. @node System Type @section Specifying the System Type There may be some features @command{configure} cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the @emph{same} architectures, @command{configure} can figure that out, but if it prints a message saying it cannot guess the machine type, give it the @option{--build=@var{type}} option. @var{type} can either be a short name for the system type, such as @samp{sun4}, or a canonical name which has the form: @example @var{cpu}-@var{company}-@var{system} @end example @noindent where @var{system} can have one of these forms: @example @var{os} @var{kernel}-@var{os} @end example See the file @file{config.sub} for the possible values of each field. If @file{config.sub} isn't included in this package, then this package doesn't need to know the machine type. If you are @emph{building} compiler tools for cross-compiling, you should use the @option{--target=@var{type}} option to select the type of system they will produce code for. If you want to @emph{use} a cross compiler, that generates code for a platform different from the build platform, you should specify the @dfn{host} platform (i.e., that on which the generated programs will eventually be run) with @option{--host=@var{type}}. @node Sharing Defaults @section Sharing Defaults If you want to set default values for @command{configure} scripts to share, you can create a site shell script called @file{config.site} that gives default values for variables like @code{CC}, @code{cache_file}, and @code{prefix}. @command{configure} looks for @file{@var{prefix}/share/config.site} if it exists, then @file{@var{prefix}/etc/config.site} if it exists. Or, you can set the @code{CONFIG_SITE} environment variable to the location of the site script. A warning: not all @command{configure} scripts look for a site script. @node Defining Variables @section Defining Variables Variables not defined in a site shell script can be set in the environment passed to @command{configure}. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the @command{configure} command line, using @samp{VAR=value}. For example: @example ./configure CC=/usr/local2/bin/gcc @end example @noindent will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). @node configure Invocation @section @command{configure} Invocation @command{configure} recognizes the following options to control how it operates. @table @option @item --help @itemx -h Print a summary of the options to @command{configure}, and exit. @item --version @itemx -V Print the version of Autoconf used to generate the @command{configure} script, and exit. @item --cache-file=@var{file} @cindex Cache, enabling Enable the cache: use and save the results of the tests in @var{file}, traditionally @file{config.cache}. @var{file} defaults to @file{/dev/null} to disable caching. @item --config-cache @itemx -C Alias for @option{--cache-file=config.cache}. @item --quiet @itemx --silent @itemx -q Do not print messages saying which checks are being made. To suppress all normal output, redirect it to @file{/dev/null} (any error messages will still be shown). @item --srcdir=@var{dir} Look for the package's source code in directory @var{dir}. Usually @command{configure} can determine that directory automatically. @end table @noindent @command{configure} also accepts some other, not widely useful, options. Run @samp{configure --help} for more details. autoconf2.59-2.59+dfsg/doc/version.texi0000644000175000017500000000014207752412563017175 0ustar taffittaffit@set UPDATED 5 November 2003 @set UPDATED-MONTH November 2003 @set EDITION 2.59 @set VERSION 2.59 autoconf2.59-2.59+dfsg/COPYING0000644000175000017500000004311007752405543015105 0ustar taffittaffit GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. autoconf2.59-2.59+dfsg/tests/0000755000175000017500000000000007752722357015222 5ustar taffittaffitautoconf2.59-2.59+dfsg/tests/acfortran.at0000644000175000017500000000100107752413034017504 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/fortran macros.]) # Modern macros. AT_CHECK_MACRO([AC_F77_MAIN]) AT_CHECK_MACRO([AC_F77_WRAPPERS]) AT_CHECK_MACRO([AC_FC_MAIN]) AT_CHECK_MACRO([AC_FC_WRAPPERS]) AT_CHECK_MACRO([AC_PROG_F77_C_O]) AT_CHECK_MACRO([AC_PROG_FC_C_O]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_LANG_FORTRAN77]) autoconf2.59-2.59+dfsg/tests/torture.at0000644000175000017500000004150607734533012017246 0ustar taffittaffit# -*- Autotest -*- # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AT_BANNER([[Testing config.status.]]) ## ---------------------------------------- ## ## AC_CONFIG_COMMANDS with empty commands. ## ## ---------------------------------------- ## AT_CHECK_MACRO([AC_CONFIG_COMMANDS with empty commands], [[AC_CONFIG_COMMANDS([foo], [], [:]) ]]) ## -------------------------- ## ## Multiple AC_CONFIG_FILES. ## ## -------------------------- ## AT_SETUP([Multiple AC_CONFIG_FILES]) AT_CONFIGURE_AC([[AC_CONFIG_FILES([foo foo])]]) AT_CHECK_AUTOCONF([], 1, [], [ignore]) AT_CLEANUP ## ------------ ## ## AC_ARG_VAR. ## ## ------------ ## # AT_CHECK_AC_ARG_VAR(FIRST-VALUE, SECOND-VALUE) # ---------------------------------------------- # Check that AC_ARG_VAR caches the latest values, diagnoses # inconsistencies, and arms config.status. m4_define([AT_CHECK_AC_ARG_VAR], [rm -f config.cache # Initial value. m4_ifval([$1], [precious='$1'; export precious], [unset precious]) AT_CHECK_CONFIGURE([--config-cache -q]) AT_CHECK([cat file], [], [`$1' ]) # Testing --recheck: 1. have the environment `forget' about PRECIOUS. unset precious # 2. Rerun config.status to recreate `file'. AT_CHECK([./config.status --recheck], [], [ignore]) AT_CHECK([./config.status], [], [ignore]) # 3. Check that file contains the old value of PRECIOUS. AT_CHECK([cat file], [], [`$1' ]) # Second value: we should issue an error here: the value # has changed! m4_ifval([$2], [precious='$2'; export precious], [unset precious]) AT_CHECK_CONFIGURE([--config-cache], [1], [], [ignore]) ])# AT_CHECK_AC_ARG_VAR AT_SETUP([AC_ARG_VAR]) # We don't want to run this test if this shell doesn't support # `unset'. AT_CHECK([ if (FOO=FOO; unset FOO) >/dev/null 2>&1; then exit 0 else exit 77 fi ]) AT_DATA([configure.ac], [[AC_INIT AC_ARG_VAR([precious], [this variable costs a lot]) echo "precious:$precious" AC_OUTPUT(file) ]]) AT_DATA([file.in], [[`@precious@' ]]) AT_CHECK_AUTOCONF # Set a precious variable AT_CHECK_AC_ARG_VAR([], [apple of my eye]) # Unset a precious variable AT_CHECK_AC_ARG_VAR([apple of my eye], []) # Change a precious variable AT_CHECK_AC_ARG_VAR([apple of my eye], [orange of my eye]) AT_CLEANUP ## ---------------------------------------------- ## ## AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS. ## ## ---------------------------------------------- ## AT_SETUP([AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS]) AT_DATA([configure.ac], [[AC_INIT rm -rf header var-header file var-file link var-link command var-command echo 'OK' >input # Be sure to also stress the associated INIT-CMDS. case $what_to_test in header) AC_CONFIG_HEADERS(header:input);; var-header) AC_CONFIG_HEADERS(var-header:$header_in, [], [header_in=input]);; file) AC_CONFIG_FILES(file:input);; var-file) AC_CONFIG_FILES(var-file:$file_in, [], [file_in=input]);; command) AC_CONFIG_COMMANDS(command:input, [cp input command]);; var-command) AC_CONFIG_COMMANDS(var-command:$command_in, [cp $command_in var-command], [command_in=input]);; link) AC_CONFIG_LINKS(link:input);; var-link) AC_CONFIG_LINKS(var-link:$link_in, [], [link_in=input]);; esac AC_OUTPUT ]]) AT_CHECK_AUTOCONF # AT_CHECK_CONFIG_CREATION(THING = (header | link | file | command)) # ------------------------------------------------------------------ # Check that THING and var-THING (which uses variables in AC_CONFIG_THING) # are properly created, with the right content. # Use `grep OK' instead of a simple `cat' to avoid banners such as in # AC_CONFIG_HEADERS. m4_define([AT_CHECK_CONFIG_CREATION], [AT_CHECK_CONFIGURE([what_to_test=$1]) AT_CHECK([ls header var-header file var-file command var-command link var-link 2>/dev/null], [ignore], [$1 ]) AT_CHECK([grep OK $1], [], [OK ]) AT_CHECK_CONFIGURE([what_to_test=var-$1 --no-create]) # config.status might be stupidly expecting data on stdin, if it's # really broken... AT_CHECK([./config.status var-$1 /dev/null], [ignore], [var-$1 ]) AT_CHECK([grep OK var-$1], [], [OK ]) ])# AT_CHECK_CONFIG_CREATION # Create a file AT_CHECK_CONFIG_CREATION(file) # Create a header AT_CHECK_CONFIG_CREATION(header) # Execute a command AT_CHECK_CONFIG_CREATION(command) # Create a link AT_CHECK_CONFIG_CREATION(link) AT_CLEANUP ## ------------------- ## ## Missing templates. ## ## ------------------- ## # Check that config.status detects missing input files AT_SETUP([Missing templates]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_FILES([nonexistent]) AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], [1], [], [[config.status: error: cannot find input file: nonexistent.in ]]) # Make sure that the output file doesn't exist AT_CHECK([test -f nonexistent], 1) AT_CLEANUP ## ---------------------- ## ## configure invocation. ## ## ---------------------- ## # Check that `configure' and `config.status' honor their interface. # # We run `./configure one=val1 --enable-two=val2 --with-three=val3' # and verify that (i) `configure' correctly receives the arguments and # (ii) correctly passes them to `config.status', which we check by # running `config.status --recheck'. AT_SETUP([configure invocation]) AT_DATA([configure.ac], [[AC_INIT echo "result=$one$enable_two$with_three" AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([one=one --enable-two=two --with-three=three | sed -n -e 's/^result=//p'], 0, [onetwothree ]) AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0, [onetwothree ]) AT_CHECK_CONFIGURE([one="\"'$ " --enable-two="\" ' $" --with-three=" \"'$"| sed -n -e 's/^result=//p'], 0, ["'$ " ' $ "'$ ]) AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0, ["'$ " ' $ "'$ ]) AT_CLEANUP ## -------------------------------------------- ## ## Check that `#define' templates are honored. ## ## -------------------------------------------- ## # Use various forms of `#define' templates, and make sure there are no # problems when a symbol is prefix of another. AT_SETUP([#define header templates]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) # I18n of dummy variables: their French translations. AC_DEFINE(foo, toto) AC_DEFINE(bar, tata) AC_DEFINE(baz, titi) AC_DEFINE(fubar, tutu) # Symbols which are prefixes of another. AC_DEFINE(a, A) AC_DEFINE(aaa, AAA) AC_DEFINE(aa, AA) AC_CONFIG_FILES(defs) # Things included in confdefs.h, but which make no sense in # config.h, nor in $DEFS. cat <<\EOF >>confdefs.h /* Hi Mum! Look, I am doing C++! */ #ifdef __cplusplus void exit (int status); #endif EOF # In addition of config.h output a full DEFS AC_OUTPUT_MAKE_DEFS DEFS_SAVED=$DEFS AC_SUBST(DEFS_SAVED) AC_OUTPUT ]]) AT_DATA([defs.in], [[@DEFS_SAVED@ ]]) AT_DATA([config.hin], [[#define foo 0 # define bar bar # define baz "Archimedes was sinking in his baz" # define fubar tutu #define a B #define aa BB #define aaa BBB #undef a #undef aa #undef aaa ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_DATA([expout], [[/* config.h. Generated by configure. */ #define foo toto # define bar tata # define baz titi # define fubar tutu #define a A #define aa AA #define aaa AAA #define a A #define aa AA #define aaa AAA ]]) AT_CHECK([cat config.h], 0, expout) # Check the value of DEFS. AT_DATA([expout], [[-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -Dfoo=toto -Dbar=tata -Dbaz=titi -Dfubar=tutu -Da=A -Daaa=AAA -Daa=AA ]]) # Because we strip trailing spaces in `testsuite' we can't leave one in # expout, hence nuke the one left by AC_OUTPUT_MAKE_DEFS. AT_CHECK([sed -e 's/ $//' defs], 0, expout) AT_CLEANUP ## ------------------------- ## ## Torturing config.status. ## ## ------------------------- ## ## Require 100 AC_DEFINE and AC_SUBST with a significantly big value. ## This is mostly to check that Autoconf produces portable sed scripts ## in config.status. sed is used to skip the first two lines ## `Generated by...'. # We use m4_for many times. m4_pattern_allow([^m4_for$]) AT_SETUP([Torturing config.status]) dnl The value used as a big value for AC_DEFINE. dnl Don't use sh active chars here, below it is also used in a sh dnl assignment. m4_define([AT_BIG_VALUE], [This value should be long enough to torture the various limits of sed and other tools used by Autoconf.]) m4_define([AT_DESCRIPTION], [Define to a long string if your `Autoconf' works properly.]) # AT_DUMMY_VAR(NUMBER) # -------------------- # Build a name used for AC_SUBST and AC_DEFINE. Put ac_ in it # so that the check for user name space invasion does not complain # of the new variables defined. # # Note that you should not use the name ac_dummy, because it will be # turned into ac_uummy during the construction of config.status. Yes, # this is admittedly a bug, but it would be too hard to fix this. # There is really no point in AC_DEFINE a var named ac_d.*. m4_pattern_allow([^m4_bpatsubst$]) m4_define([AT_DUMMY_VAR], [ac_Dummy_[]m4_bpatsubst([000$1], [.*\(...\)$], [\1])]) AT_DATA([dummy.in], [m4_for([AT_Count], 1, 100, 1, [@AT_DUMMY_VAR(AT_Count)@ ])]) # ------------ # # configure.ac # # ------------ # m4_pattern_allow([^m4_(define|defun)$]) AT_DATA([configure.ac], dnl The following lines transfer AT_DUMMY_VAR, AT_DESCRIPTION, and dnl AT_BIG_VALUE into the configure.ac as AC_DUMMY_VAR etc. [[m4_define([AC_DUMMY_VAR],] m4_dquote(m4_defn([AT_DUMMY_VAR]))[)]] [[m4_define([AC_DESCRIPTION],] m4_dquote(m4_defn([AT_DESCRIPTION]))[)]] [[m4_define([AC_BIG_VALUE],] m4_dquote(m4_defn([AT_BIG_VALUE]))[)]] [[# AC_DEFUBST(NAME) # ---------------- # Related VALUE to NAME both with AC_SUBST and AC_DEFINE. This is # used in the torture tests. m4_defun([AC_DEFUBST], [AC_DUMMY_VAR($1)="AC_BIG_VALUE" AC_DEFINE_UNQUOTED(AC_DUMMY_VAR($1), "$AC_DUMMY_VAR($1)", AC_DESCRIPTION) AC_SUBST(AC_DUMMY_VAR($1))]) AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) AC_CONFIG_FILES(dummy) m4_for(AC_Count, 1, 100, 1, [AC_DEFUBST(AC_Count)]) AC_OUTPUT ]])# configure.ac AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE # Checking that AC_DEFINE worked properly. AT_DATA([expout], [/* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "" /* Define to the version of this package. */ #define PACKAGE_VERSION "" m4_for(AT_Count, 1, 100, 1, [ /* AT_DESCRIPTION */ [#define] AT_DUMMY_VAR(AT_Count) "AT_BIG_VALUE" ])]) AT_CHECK([sed -n '4,$ p' config.h], 0, expout) # Checking that AC_SUBST worked properly. AT_DATA([expout], [m4_for(AT_Count, 1, 100, 1, [AT_BIG_VALUE ])]) AT_CLEANUP ## -------- ## ## srcdir. ## ## -------- ## AT_SETUP([srcdir]) rm -rf at-dir mkdir at-dir : >at-dir/bar.in : >foo.in AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_FILES([foo at-dir/bar]) AC_CONFIG_COMMANDS([report], [test -f $srcdir/configure.ac || AC_MSG_ERROR([cannot find $srcdir/configure.ac])], [srcdir=$srcdir]) AC_OUTPUT rm -rf foo at-dir/bar ]]) AT_CHECK_AUTOCONF # In place. AT_CHECK([./configure], [], [ignore]) # Relative path. AT_CHECK([cd at-dir && ../configure], [], [ignore]) # Absolute path. at_here=`pwd` AT_CHECK([cd at-dir && $at_here/configure], [], [ignore]) AT_CLEANUP ## ----------------- ## ## Signal handling. ## ## ----------------- ## AT_SETUP([Signal handling]) AT_DATA([configure.ac], [[AC_INIT kill -2 $$ exit 77 ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], 1, ignore, ignore) AT_CLEANUP ## ---------------------------- ## ## Configuring subdirectories. ## ## ---------------------------- ## # . # |-- builddir # | |-- config.log # | |-- config.status # | `-- inner # | |-- config.log # | |-- config.status # | `-- innermost # | `-- config # |-- configure # |-- configure.ac # |-- inner # | |-- configure # | |-- configure.ac # | `-- innermost # | `-- config.in # `-- install-sh # AT_SETUP([Configuring subdirectories]) AT_KEYWORDS(autoreconf) # We use aclocal (via autoreconf). AT_CHECK([aclocal --version || exit 77], [], [stdout], [ignore]) # It should understand configure.ac. AT_CHECK([[grep '1.[01234]' stdout && exit 77]], [1], [ignore]) # The contents of `inner/', and `inner/innermost/'. AS_MKDIR_P([inner/innermost]) # We have to use configure.in, not configure.ac, if we still want to # be compatible with Automake 1.4: aclocal (run by autoreconf) would # die because it can't find configure.in. AT_DATA([inner/configure.in], [[AC_INIT(GNU Inner, 1.0) AC_CONFIG_SRCDIR([innermost/config.in]) AC_ARG_VAR([INNER], [an inner variable]) AC_SUBST([INNER]) if test "x$INNER" = x; then INNER=inner fi AC_CONFIG_FILES([innermost/config]) AC_OUTPUT ]]) AT_DATA([inner/innermost/config.in], [INNER=@INNER@ srcdir=@srcdir@ top_srcdir=@top_srcdir@ prefix=@prefix@ ]) # The contents of `.' AT_DATA([install-sh], []) # nonexistent is allowed not to exist. AT_DATA([configure.in], [[AC_INIT(GNU Outer, 1.0) AC_ARG_VAR([OUTER], [an outer variable]) if false; then AC_CONFIG_SUBDIRS([nonexistent]) fi AC_CONFIG_SUBDIRS([inner]) AC_OUTPUT ]]) # If there are improperly quoted AC_DEFUN installed in share/aclocal, # they trigger warnings from aclocal 1.8, so ignore stderr. AT_CHECK([autoreconf], [], [], [ignore]) AT_CHECK([test -f inner/configure]) # Running the outer configure recursively should provide the innermost # help strings. AT_CHECK([./configure --help=recursive | grep INNER], 0, [ignore]) # Running the outer configure should trigger the inner. AT_CHECK_CONFIGURE AT_CHECK([cat inner/innermost/config], 0, [INNER=inner srcdir=. top_srcdir=.. prefix=/usr/local ]) # The same, but from a builddir. AS_MKDIR_P([builddir]) AT_CHECK([cd builddir && ../configure], 0, [ignore]) AT_CHECK([cat builddir/inner/innermost/config], 0, [INNER=inner srcdir=../../../inner/innermost top_srcdir=../../../inner prefix=/usr/local ]) # Make sure precious variables and command line options are properly # passed, even when there are duplicates. Run another directory so # that if the user has set config.site to have a config.cache, then # the two runs don't have colliding caches. AS_MKDIR_P([builddir2]) AT_CHECK([cd builddir2 && ../configure --prefix /bad --prefix /good INNER=bad INNER=good], 0, [ignore]) AT_CHECK([cat builddir2/inner/innermost/config], 0, [INNER=good srcdir=../../../inner/innermost top_srcdir=../../../inner prefix=/good ]) AT_CLEANUP ## -------------- ## ## Deep Package. ## ## -------------- ## AT_SETUP([Deep Package]) AT_KEYWORDS(autoreconf) # We use aclocal (via autoreconf). AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) # The contents of `.' AT_DATA([install-sh], []) AT_DATA([configure.in], [[AC_INIT(GNU Outer, 1.0) AC_ARG_VAR([OUTER], [an outer variable]) AC_CONFIG_SUBDIRS([inner]) AC_OUTPUT ]]) # The contents of `inner/', and `inner/innermost/'. AS_MKDIR_P([inner/innermost]) AT_DATA([inner/configure.ac], [[AC_INIT(GNU Inner, 1.0) AC_ARG_VAR([INNER], [an inner variable]) AC_CONFIG_SUBDIRS(innermost) AC_OUTPUT ]]) AT_DATA([inner/innermost/configure.ac], [[AC_INIT(GNU Innermost, 1.0) AC_ARG_VAR([INNERMOST], [an innermost variable]) AC_CONFIG_HEADERS(config.h:config.hin) AC_DEFINE_UNQUOTED([INNERMOST], [$INNERMOST], [an innermost variable]) AC_OUTPUT ]]) AT_CHECK([autoreconf -Wall -v], [0], [ignore], [ignore]) AT_CHECK([test -f inner/configure]) AT_CHECK([test -f inner/innermost/configure]) AT_CHECK([test -f inner/innermost/config.hin]) # Running the outer configure recursively should provide the innermost # help strings. AT_CHECK([./configure --help=recursive | grep " INNER "], 0, [ignore]) AT_CHECK([./configure --help=recursive | grep " INNERMOST "], 0, [ignore]) # Running the outer configure should trigger the inner. AT_CHECK_CONFIGURE([INNERMOST=tsomrenni]) AT_CHECK([grep INNERMOST inner/innermost/config.h], 0, [[#define INNERMOST tsomrenni ]]) # The same, but from a builddir. AS_MKDIR_P([builddir]) AT_CHECK([cd builddir && ../configure INNERMOST=build/tsomrenni], 0, [ignore]) AT_CHECK([grep INNERMOST builddir/inner/innermost/config.h], 0, [[#define INNERMOST build/tsomrenni ]]) AT_CLEANUP autoconf2.59-2.59+dfsg/tests/mktests.sh0000755000175000017500000001614107751713546017255 0ustar taffittaffit#! /bin/sh # Build some of the Autoconf test files. # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # If we fail, clean up, but touch the output files. We probably failed # because we used some non portable tool, but we just don't care: this # shell script is a maintainer tool, and we do expect good tools. as_me=`echo "$0" | sed 's,.*[\\/],,'` trap 'echo "'"$as_me"': failed. To proceed run make check." >&2 rm -f acdefuns audefuns requires *.tat for file in "$@" do touch `echo "$file" | sed "s,.*[\\/],,;s/\..*/.at/"` done trap 0 exit 1' \ 0 1 2 15 # If ever something goes wrong, fail, so that the trap be launched. set -e # We need arguments. test $# != 0 # We need these arguments. src="$@" # Set locale to C so that `sort' behaves in a uniform way. export LANGUAGE; LANGUAGE=C export LANG; LANG=C export LC_ALL; LC_ALL=C # requires # -------- # Get the list of macros that are required: there is little interest # in testing them since they will be run but the guy who requires # them. cat $src | sed -n 's/dnl.*//;s/.*AC_REQUIRE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' | sort | uniq >requires # exclude_list # ------------ # Macros which must not be checked at all (not by ac-macros.at, nor # au-macros.at). # The trailing new line is meant. # # - ac_cv_prog_gcc, gxx, g77 # Not macros, just mapping from old variable name to a new one. exclude_list='^ac_cv_prog_(gcc|gxx|g77)$ ' # ac_exclude_list # --------------- # The test `ac-macros.at' tries to run all the macros of Autoconf to check # for syntax problems, etc. Not all the macros can be run without argument, # and some are already tested elsewhere. EGREP_EXCLUDE must filter out # the macros we don't want to test in ac-macros.at. # # - AC_CANONICALIZE, AC_PREFIX_PROGRAM, AC_PREREQ # Need an argument. # # - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type # Performed in the semantics tests. # # - AC_CONFIG # They fail when the source does not exist. # # - AC_FUNC_GETLOADAVG, AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU # Require a file that is not shipped with Autoconf. But it should. # # - AC_INIT # AC_INIT includes all the AC_INIT macros. Note that there is an # infinite m4 recursion if AC_INIT it used twice. # # - AC_LANG* # Heavily used by other macros. # # - AC_PATH_PROGS?, AC_F77_FUNC, AC_FC_FUNC, AC_FC_SRCEXT # They produce `= val' because $1, the variable used to store the result, # is empty. # # - AC_FC_FREEFORM # Requires the current language to be Fortran, not C. # # - AC_TRY, AC_.*_IFELSE, AC_RUN_LOG. # Used in many places. # # - _AC_ # Internal macros are used elsewhere. # # - AC_OUTPUT # Already tested by `AT_CHECK_MACRO'. # # - AC_FD_CC # Is a number. # # - AC_PROG_CC, AC_C_(CONST|INLINE|VOLATILE), AC_PATH_XTRA # Checked in semantics. # # - AC_CYGWIN, AC_CYGWIN32, AC_EMXOS2, AC_MING32, AC_EXEEXT, AC_OBJEXT # AU defined to nothing. # # - AC_PATH_XTRA # Checked in semantics. # # - AC_SYS_RESTARTABLE_SYSCALLS, AC_FUNC_WAIT3 # Obsolete, checked in semantics. # ac_exclude_list='^AC_ARG_VAR$ ^AC_CANONICALIZE|AC_PREFIX_PROGRAM|AC_PREREQ$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TOOL|TYPE)S?$ ^AC_CONFIG ^AC_(F77|FC)_FUNC$ ^AC_FC_(FUNC|FREEFORM|SRCEXT)$ ^AC_FD_CC$ ^AC_FUNC_(GETLOADAVG|FNMATCH_GNU|WAIT3)$ ^AC_INIT ^AC_LANG ^AC_LINKER_OPTION$ ^AC_LINK_FILES$ ^AC_LIST_MEMBER_OF$ ^AC_OUTPUT$ ^AC_PATH_(TOOL|PROG)S?$ ^AC_REPLACE_(FNMATCH|FUNCS)$ ^AC_SEARCH_LIBS$ ^(AC_TRY.*|AC_RUN_LOG)$ ^AC_.*_IFELSE$ ^(AC_(PROG_CC|C_CONST|C_INLINE|C_RESTRICT|C_VOLATILE))$ ^AC_(CYGWIN|CYGWIN32|EMXOS2|MING32|EXEEXT|OBJEXT)$ ^AC_PATH_XTRA$ ^AC_SYS_RESTARTABLE_SYSCALLS$ _AC_' # ac_exclude_egrep # ---------------- # Build a single extended regular expression out of filter_macros_list. ac_exclude_egrep=$exclude_list$ac_exclude_list # au_exclude_list # --------------- # AC_LANG_RESTORE # cannot be used alone. # AC_LINK_FILES, AC_PREREQ # need arguments and are tested elsewhere. # AC_INIT and AC_OUTPUT # are already in `configure.ac'. # AC_C_CROSS and AC_PROG_CC_STDC # are empty. # AC_CYGWIN, AC_MINGW32, AC_EMXOS2 # are using AC_REQUIRE. au_exclude_list='^AC_LANG_RESTORE$ ^AC_LINK_FILES|AC_PREREQ$ ^AC_(INIT|OUTPUT)$ ^AC_C_CROSS|AC_PROG_CC_STDC$ ^AC_(CYGWIN|MINGW32|EMXOS2)$' # au_exclude_egrep # ---------------- # Build a single extended regular expression out of filter_macros_list. au_exclude_egrep=$exclude_list$au_exclude_list # egrep # ----- if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then egrep='grep -E' else egrep='egrep' fi ## ------------------------- ## ## Creating the test files. ## ## ------------------------- ## for file in $src do base=`echo "$file" | sed 's,.*[\\/],,;s/\..*//'` # Get the list of macros which are defined in Autoconf level. # Get rid of the macros we are not interested in. cat $file | sed -n -e 's/^AC_DEFUN(\[*\([a-zA-Z0-9_]*\).*$/\1/p' \ -e 's/^AC_DEFUN_ONCE(\[*\([a-zA-Z0-9_]*\).*$/\1/p' | sort | uniq | # Watch out we are `set -e': don't fail. ($egrep -v "$ac_exclude_egrep" || true) >acdefuns # Get the list of macros which are defined in Autoupdate level. cat $file | sed -n 's/^AU_DEFUN(\[*\([a-zA-Z][a-zA-Z0-9_]*\).*$/\1/p' | sort | uniq | ($egrep -v "$au_exclude_egrep" || true) > audefuns # Filter out required macros. { sed 's/^ *//' </dev/null 2>&1; then :; else echo "AT_CHECK_MACRO([$macro])" fi done echo echo "# Obsolete macros." for macro in `cat audefuns`; do if grep "$macro" requires >/dev/null 2>&1; then :; else echo "AT_CHECK_AU_MACRO([$macro])" fi done } >ac$base.tat # In one atomic step so that if something above fails, the trap # preserves the old version of the file. If there is nothing to # check, output /rien du tout/[1]. if grep AT_CHECK ac$base.tat >/dev/null 2>&1; then mv -f ac$base.tat ac$base.at # Help people not to update these files by hand. chmod a-w ac$base.at else rm -f ac$base.tat ac$base.at touch ac$base.at fi done rm -f acdefuns audefuns requires trap 0 exit 0 # [1] En franc,ais dans le texte. autoconf2.59-2.59+dfsg/tests/local.at0000644000175000017500000002525307723142652016641 0ustar taffittaffit# M4 macros used in building Autoconf test suites. -*- Autotest -*- # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # We need a very up to date version of Autotest. m4_version_prereq([2.57]) # Used in many tests. m4_pattern_allow([^AS_EXIT$]) m4_pattern_allow([^m4_(define|shift)$]) AT_TESTED([autom4te autoconf autoheader autoupdate autoreconf ifnames]) ## ------------------ ## ## Testing autom4te. ## ## ------------------ ## # AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ----------------------------------------------------------- # If stderr is specified, normalize the observed stderr. E.g. (GNU M4 1.5): # # /usr/local/bin/m4: script.4s: 1: Cannot open foo: No such file or directory # autom4te: /usr/local/bin/m4 failed with exit status: 1 # # or (using gm4 as GNU M4 1.4): # # script.4s:1: /usr/local/bin/gm4: Cannot open foo: No such file or directory # autom4te: /usr/local/bin/m4 failed with exit status: 1 # # becomes # # m4: script.4s: 1: Cannot open foo: No such file or directory # autom4te: m4 failed with exit status: 1 # # We use the following sed patterns: # # (file): (line): (m4): # or (m4): (file): (line): # to m4: (file): (line): # # and # autom4te: [^ ]m4 # to autom4te: m4 m4_define([AT_CHECK_AUTOM4TE], [AT_CHECK([autom4te $1], [$2], [$3], m4_ifval([$4], [stderr])) m4_ifval([$4], [AT_CHECK([[sed -e 's,^\([^:]*\): *\([0-9][0-9]*\): *[^:]*m4: ,m4: \1: \2: ,' \ -e 's,^[^:]*m4: *\([^:]*\): *\([0-9][0-9]*\): ,m4: \1: \2: ,' \ -e 's/^autom4te: [^ ]*m4 /autom4te: m4 /' \ -e 's/^autom4te: [^ ]*m4.exe /autom4te: m4 /' \ -e 's/ (E[A-Z]*)$//' \ stderr]], [0],[$4])]) ]) ## ----------------- ## ## Testing M4sugar. ## ## ----------------- ## # AT_DATA_M4SUGAR(FILENAME, CONTENTS) # ----------------------------------- # Escape the invalid tokens with @&t@. m4_define([AT_DATA_M4SUGAR], [AT_DATA([$1], [m4_bpatsubsts([$2], [@&t@], [@&@&t@t@], [\(m4\)_], [\1@&t@_], [dnl], [d@&t@nl])])]) # AT_CHECK_M4SUGAR(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ---------------------------------------------------------- m4_define([AT_CHECK_M4SUGAR], [AT_CHECK_AUTOM4TE([--language=m4sugar script.4s -o script $1], [$2], [$3], [$4])]) ## -------------- ## ## Testing M4sh. ## ## -------------- ## # AT_DATA_M4SH(FILENAME, CONTENTS) # -------------------------------- # Escape the invalid tokens with @&t@. m4_define([AT_DATA_M4SH], [AT_DATA([$1], [m4_bpatsubsts([$2], [@&t@], [@&@&t@t@], [\(m4\|AS\)_], [\1@&t@_], [dnl], [d@&t@nl])])]) # AT_CHECK_M4SH(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ------------------------------------------------------- m4_define([AT_CHECK_M4SH], [AT_CHECK_AUTOM4TE([--language=m4sh script.as -o script $1], [$2], [$3], [$4])]) ## ------------------ ## ## Testing Autoconf. ## ## ------------------ ## # AT_DATA_AUTOCONF(FILENAME, CONTENTS) # ------------------------------------ # Escape the invalid tokens with @&t@. m4_define([AT_DATA_AUTOCONF], [AT_DATA([$1], [m4_bpatsubsts([$2], [@&t@], [@&@&t@t@], [\(m4\|AS\|AC\)_], [\1@&t@_], [dnl], [d@&t@nl])])]) # AT_CONFIGURE_AC(BODY) # --------------------- # Create a full configure.ac running BODY, with a config header set up, # AC_OUTPUT, and environment checking hooks. # # Here are the exceptions to AC_STATE_SAVE: # # - ^ac_ # Autoconf's shell name space. # - prefix and exec_prefix # are kept undefined (NONE) until AC_OUTPUT which then sets them to # `/usr/local' and `${prefix}' for make. # - CONFIG_STATUS and DEFS # Set by AC_OUTPUT. # - F77_DUMMY_MAIN # Set by AC_F77_DUMMY_MAIN. # - ALLOCA|NEED_SETGID|KMEM_GROUP # AC_FUNCs from acspecific. # - AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC # AC_PROGs from acspecific # - _|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS # Some variables some shells use and change. # `.[*#?].' catches `$#' etc. which are displayed like this: # | '!'=18186 # | '#'=0 # | '$'=6908 # - POW_LIB # From acfunctions.m4. # m4_define([AT_CONFIGURE_AC], [AT_DATA_AUTOCONF([aclocal.m4], [[ # AC_STATE_SAVE(FILE) # ------------------ # Save the environment, except for those variables we are allowed to touch. # This is to check no test touches the user name space. # FIXME: There are surely better ways. Explore for instance if # we can ask help from AC_SUBST. We have the right to touch what # is AC_SUBST'ed. # # Perhaps grep -E is not supported, or perhaps it chokes on such a big regex. # In this case just don't pay attention to the env. It would be great # to keep the error message but we can't: that would break AT_CHECK. m4_defun([AC_STATE_SAVE], [(set) 2>&1 | grep -E -v -e 'm4_join([|], [^a[cs]_], [^((exec_)?prefix|DEFS|CONFIG_STATUS)=], [^(CC|CFLAGS|CPP|GCC|CXX|CXXFLAGS|CXXCPP|GXX|F77|FFLAGS|FLIBS|G77)=], [^(LIBS|LIB@&t@OBJS|LDFLAGS)=], [^INSTALL(_(DATA|PROGRAM|SCRIPT))?=], [^(CYGWIN|ISC|MINGW32|MINIX|EMXOS2|XENIX|EXEEXT|OBJEXT)=], [^(X_(CFLAGS|(EXTRA_|PRE_)?LIBS)|x_(includes|libraries)|(have|no)_x)=], [^(host|build|target)(_(alias|cpu|vendor|os))?=], [^(cross_compiling)=], [^(interpval|PATH_SEPARATOR)=], [^(F77_DUMMY_MAIN|f77_(case|underscore))=], [^(ALLOCA|GETLOADAVG_LIBS|KMEM_GROUP|NEED_SETGID|POW_LIB)=], [^(AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|RANLIB|SET_MAKE|YACC)=], [^(_|@|.[*#?].|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS)=])' 2>/dev/null | # There maybe variables spread on several lines, eg IFS, remove the dead # lines. grep '^m4_defn([m4_re_word])=' >state-env.$][1 test $? = 0 || rm -f state-env.$][1 ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort >state-ls.$][1 ])# AC_STATE_SAVE ]]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_AUX_DIR($top_srcdir/config) AC_CONFIG_HEADER(config.h:config.hin) AC_STATE_SAVE(before)] $1 [AC_OUTPUT AC_STATE_SAVE(after) ]]) ])# AT_CONFIGURE_AC # AT_CHECK_AUTOCONF(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ---------------------------------------------------------- m4_define([AT_CHECK_AUTOCONF], [AT_CHECK([autoconf $1], [$2], [$3], [$4])]) # AT_CHECK_AUTOHEADER(ARGS, [EXIT-STATUS = 0], STDOUT, STDERR) # ------------------------------------------------------------ m4_define([AT_CHECK_AUTOHEADER], [AT_CHECK([autoheader $1], [$2], [$3], [$4]) ]) # AT_CHECK_CONFIGURE(END-COMMAND, # [EXIT-STATUS = 0], # [STDOUT = IGNORE], STDERR) # -------------------------------------------- # `abs_top_srcdir' is needed so that `./configure' finds install-sh. # Using --srcdir is more expensive. m4_define([AT_CHECK_CONFIGURE], [AT_CHECK([top_srcdir=$abs_top_srcdir ./configure $1], [$2], m4_default([$3], [ignore]), [$4], [{ echo "$srcdir/AT_LINE: config.log"; sed 's/^/> /' config.log; } >>$at_group_log ])]) # AT_CHECK_ENV # ------------ # Check that the full configure run remained in its variable name space, # and cleaned up tmp files. # Some tests might exit prematurely when they find a problem, in # which case `env-after' is probably missing. Don't check it then. m4_define([AT_CHECK_ENV], [test -f state-ls.before || AS_ERROR([state-ls.before not present]) if test -f state-env.before && test -f state-env.after; then mv -f state-env.before expout AT_CHECK([cat state-env.after], 0, expout) fi if test -f state-ls.after; then mv -f state-ls.before expout AT_CHECK([cat state-ls.after], 0, expout) fi ]) # AT_CHECK_DEFINES(CONTENT) # ------------------------- # Verify that config.h, once stripped, is CONTENT. # Stripping consists of keeping CPP lines (i.e. containing a hash), # but those of automatically checked features (STDC_HEADERS etc.) # and symbols (PACKAGE_...). # AT_CHECK_HEADER is a better name, but too close from AC_CHECK_HEADER. m4_define([AT_CHECK_DEFINES], [AT_CHECK([[sed '/#/!d /INTTYPES/d /MEMORY/d /PACKAGE_/d /STDC_HEADERS/d /STDINT/d /STDLIB/d /STRING/d /SYS_STAT/d /SYS_TYPES/d /UNISTD/d' config.h]],, [$1])]) # AT_CHECK_AUTOUPDATE # ------------------- m4_define([AT_CHECK_AUTOUPDATE], [AT_CHECK([autoupdate $1], [$2], [$3], [$4]) ]) # _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS) # -------------------------------------- # Create a minimalist configure.ac running the macro named # NAME-OF-THE-MACRO, check that autoconf runs on that script, # and that the shell runs correctly the configure. m4_define([_AT_CHECK_AC_MACRO], [AT_CONFIGURE_AC([$1]) $2 AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV ])# _AT_CHECK_AC_MACRO # AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], # [AUTOCONF-FLAGS = -W obsolete]) # ----------------------------------------------------- # Create a minimalist configure.ac running the macro named # NAME-OF-THE-MACRO, check that autoconf runs on that script, # and that the shell runs correctly the configure. # # New macros are not expected to depend upon obsolete macros. m4_define([AT_CHECK_MACRO], [AT_SETUP([$1]) AT_CONFIGURE_AC([m4_default([$2], [$1])]) AT_CHECK_AUTOCONF([m4_default([$4], [-W obsolete])]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV $3 AT_CLEANUP()dnl ])# AT_CHECK_MACRO # AT_CHECK_AU_MACRO(MACRO) # ------------------------ # Create a minimalist configure.ac running the macro named # NAME-OF-THE-MACRO, autoupdate this script, check that autoconf runs # on that script, and that the shell runs correctly the configure. # # Updated configure.ac shall not depend upon obsolete macros, which votes # in favor of `-W obsolete', but since many of these macros leave a message # to be removed by the user once her code is adjusted, let's not check. # # Remove config.hin to avoid `autoheader: config.hin is unchanged'. m4_define([AT_CHECK_AU_MACRO], [AT_SETUP([$1]) AT_KEYWORDS([autoupdate]) AT_CONFIGURE_AC([$1]) AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV rm config.hin AT_CHECK_AUTOUPDATE AT_CHECK_AUTOCONF AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV AT_CLEANUP()dnl ])# AT_CHECK_AU_MACRO ## ----------------------- ## ## Launch the test suite. ## ## ----------------------- ## AT_INIT autoconf2.59-2.59+dfsg/tests/suite.at0000644000175000017500000000423407675551355016706 0ustar taffittaffit# Validation suite for Autoconf -*- Autotest -*- # Copyright (C) 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Run the tests from the lowest level to the highest level, and from # the most selective to the easiest. # The executables. # Even the tests on M4sugar and M4sh use `autoconf', so check it first. m4_include([tools.at]) # M4sugar. m4_include([m4sugar.at]) # M4sh.m4. m4_include([m4sh.at]) # Autoconf base macros. m4_include([base.at]) # Testing config.status # --------------------- # Actually should be named config.status.at but I fear problems with # the name. Does no `checking...' at all, but exercises only code # which following section use too. Hence, run it first. m4_include([torture.at]) # Checking AC_PROG_CC, AC_COMPILE_IFELSE etc. m4_include([compile.at]) # Language support. m4_include([aclang.at]) m4_include([c.at]) m4_include([acc.at]) m4_include([fortran.at]) m4_include([acfortran.at]) # Checking that AC_CHECK_FOO macros work properly. m4_include([semantics.at]) # Blind testing the macros. # Include them as is suggested for a `configure.ac', as looking for # for types requires looking for headers etc. m4_include([acgeneral.at]) m4_include([acstatus.at]) m4_include([acautoheader.at]) m4_include([acautoupdate.at]) m4_include([acspecific.at]) m4_include([acprograms.at]) m4_include([acheaders.at]) m4_include([actypes.at]) m4_include([acfunctions.at]) m4_include([aclibs.at]) # Compatibility with foreign tools. m4_include([foreign.at]) autoconf2.59-2.59+dfsg/tests/Makefile.am0000644000175000017500000001136107675551313017254 0ustar taffittaffit## Process this file with automake to create Makefile.in. -*-Makefile-*- ## Makefile for Autoconf testsuite. ## Copyright (C) 2000, 2001, 2002, 2003 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. # We don't actually distribute the testsuite, since one only # needs m4 to build it, m4 being required anyway to install Autoconf. EXTRA_DIST = $(TESTSUITE_AT) local.at mktests.sh \ atlocal.in package.m4 wrapper.as # Running the uninstalled scripts. check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS) # Import the dependencies on Autotest and M4sh. include ../lib/freeze.mk ## ------------ ## ## package.m4. ## ## ------------ ## $(srcdir)/package.m4: $(top_srcdir)/configure.ac { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/package.m4 ## ---------- ## ## Wrappers. ## ## ---------- ## $(srcdir)/wrapper.in: $(srcdir)/wrapper.as ./autom4te --language=M4sh $(srcdir)/wrapper.as -o $@ ## ------------ ## ## Test suite. ## ## ------------ ## TESTSUITE_GENERATED_AT = \ aclang.at acc.at acfortran.at \ acgeneral.at acstatus.at \ acautoheader.at acautoupdate.at \ acspecific.at acfunctions.at acheaders.at actypes.at \ aclibs.at acprograms.at TESTSUITE_HAND_AT = \ suite.at \ m4sugar.at m4sh.at \ base.at tools.at torture.at \ compile.at c.at fortran.at \ semantics.at \ foreign.at TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT) TESTSUITE = ./testsuite # Run the non installed autom4te. # Don't use AUTOM4TE since `make alpha' makes it unavailable although # we are allowed to use it (since we ship it). AUTOTEST = ./autom4te --language=autotest $(TESTSUITE): $(srcdir)/package.m4 \ local.at \ $(TESTSUITE_AT) \ $(autotest_m4f_dependencies) $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp mv $@.tmp $@ atconfig: $(top_builddir)/config.status cd $(top_builddir) && ./config.status tests/$@ clean-local: test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean rm -f *.tmp rm -rf autom4te.cache check-local: atconfig atlocal $(TESTSUITE) $(SHELL) $(TESTSUITE) # Run the test suite on the *installed* tree. installcheck-local: $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin ## ------------------ ## ## Maintainer rules. ## ## ------------------ ## MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE_GENERATED_AT) ## Producing the test files. # The files which contains macro we check for syntax. Don't use $(top_srcdir) # here since below we explicitly `cd' to $srcdir. As for the dependencies, # thanks God for VPATH. Hm... autoconfdir = $(top_srcdir)/lib/autoconf AUTOCONF_FILES = $(autoconfdir)/general.m4 \ $(autoconfdir)/status.m4 \ $(autoconfdir)/autoheader.m4 \ $(autoconfdir)/autoupdate.m4 \ $(autoconfdir)/specific.m4 \ $(autoconfdir)/functions.m4 \ $(autoconfdir)/lang.m4 \ $(autoconfdir)/c.m4 \ $(autoconfdir)/fortran.m4 \ $(autoconfdir)/headers.m4 \ $(autoconfdir)/libs.m4 \ $(autoconfdir)/types.m4 \ $(autoconfdir)/programs.m4 $(TESTSUITE_GENERATED_AT): mktests.sh $(AUTOCONF_FILES) cd $(srcdir) && ./mktests.sh $(AUTOCONF_FILES) ## maintainer-check ## maintainer-check: maintainer-check-posix maintainer-check-c++ # The hairy heredoc is more robust than using echo. CLEANFILES = expr expr: echo '#! $(SHELL)' >expr echo 'result=`@EXPR@ "$$@"`' >>expr echo 'estatus=$$?' >>expr echo 'cat <>expr echo '$${result:-0}' >>expr echo 'EOF' >>expr echo 'exit $$estatus' >>expr chmod +x expr # Try the test suite with more severe environments. maintainer-check-posix: expr POSIXLY_CORRECTLY=yes make check rm expr # Try using G++ as a C compiler. maintainer-check-c++: CC=g++ make check autoconf2.59-2.59+dfsg/tests/acfunctions.at0000644000175000017500000000231107752413034020046 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/functions macros.]) # Modern macros. AT_CHECK_MACRO([AC_FUNC_CHOWN]) AT_CHECK_MACRO([AC_FUNC_CLOSEDIR_VOID]) AT_CHECK_MACRO([AC_FUNC_ERROR_AT_LINE]) AT_CHECK_MACRO([AC_FUNC_FNMATCH]) AT_CHECK_MACRO([AC_FUNC_FORK]) AT_CHECK_MACRO([AC_FUNC_FSEEKO]) AT_CHECK_MACRO([AC_FUNC_GETGROUPS]) AT_CHECK_MACRO([AC_FUNC_GETMNTENT]) AT_CHECK_MACRO([AC_FUNC_GETPGRP]) AT_CHECK_MACRO([AC_FUNC_MALLOC]) AT_CHECK_MACRO([AC_FUNC_MBRTOWC]) AT_CHECK_MACRO([AC_FUNC_MEMCMP]) AT_CHECK_MACRO([AC_FUNC_MKTIME]) AT_CHECK_MACRO([AC_FUNC_MMAP]) AT_CHECK_MACRO([AC_FUNC_OBSTACK]) AT_CHECK_MACRO([AC_FUNC_REALLOC]) AT_CHECK_MACRO([AC_FUNC_SELECT_ARGTYPES]) AT_CHECK_MACRO([AC_FUNC_SETPGRP]) AT_CHECK_MACRO([AC_FUNC_SETVBUF_REVERSED]) AT_CHECK_MACRO([AC_FUNC_STAT]) AT_CHECK_MACRO([AC_FUNC_STRCOLL]) AT_CHECK_MACRO([AC_FUNC_STRERROR_R]) AT_CHECK_MACRO([AC_FUNC_STRFTIME]) AT_CHECK_MACRO([AC_FUNC_STRNLEN]) AT_CHECK_MACRO([AC_FUNC_STRTOD]) AT_CHECK_MACRO([AC_FUNC_UTIME_NULL]) AT_CHECK_MACRO([AC_FUNC_VPRINTF]) # Obsolete macros. autoconf2.59-2.59+dfsg/tests/acspecific.at0000644000175000017500000000137507752413034017634 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/specific macros.]) # Modern macros. AT_CHECK_MACRO([AC_AIX]) AT_CHECK_MACRO([AC_ISC_POSIX]) AT_CHECK_MACRO([AC_MINIX]) AT_CHECK_MACRO([AC_SYS_INTERPRETER]) AT_CHECK_MACRO([AC_SYS_LARGEFILE]) AT_CHECK_MACRO([AC_SYS_LONG_FILE_NAMES]) AT_CHECK_MACRO([AC_SYS_POSIX_TERMIOS]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_ARG_ARRAY]) AT_CHECK_AU_MACRO([AC_DECL_SYS_SIGLIST]) AT_CHECK_AU_MACRO([AC_DYNIX_SEQ]) AT_CHECK_AU_MACRO([AC_HAVE_POUNDBANG]) AT_CHECK_AU_MACRO([AC_IRIX_SUN]) AT_CHECK_AU_MACRO([AC_SCO_INTL]) AT_CHECK_AU_MACRO([AC_XENIX_DIR]) autoconf2.59-2.59+dfsg/tests/atlocal.in0000644000175000017500000000027007374216746017170 0ustar taffittaffit# -*- shell-script -*- # @configure_input@ # Configurable variable values for Autoconf test suite. # Copyright 2000, 2001 Free Software Foundation, Inc. # We need Perl. PERL='@PERL@' autoconf2.59-2.59+dfsg/tests/acheaders.at0000644000175000017500000000105007752413034017450 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/headers macros.]) # Modern macros. AT_CHECK_MACRO([AC_HEADER_MAJOR]) AT_CHECK_MACRO([AC_HEADER_STAT]) AT_CHECK_MACRO([AC_HEADER_STDBOOL]) AT_CHECK_MACRO([AC_HEADER_TIOCGWINSZ]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_DIR_HEADER]) AT_CHECK_AU_MACRO([AC_MEMORY_H]) AT_CHECK_AU_MACRO([AC_UNISTD_H]) AT_CHECK_AU_MACRO([AC_USG]) autoconf2.59-2.59+dfsg/tests/aclibs.at0000644000175000017500000000047307752413034016776 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/libs macros.]) # Modern macros. # Obsolete macros. AT_CHECK_AU_MACRO([AC_HAVE_LIBRARY]) autoconf2.59-2.59+dfsg/tests/m4sugar.at0000644000175000017500000000766207723145265017140 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([M4sugar.]) # Copyright (C) 2000, 2001, 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Order of the tests: # - m4_warn # # - m4_require # uses warn/error code. # # - m4_text_wrap ## --------- ## ## m4_warn. ## ## --------- ## AT_SETUP([[m4@&t@_warn]]) # m4_text_wrap is used to display the help strings. Also, check that # commas are not swallowed. This can easily happen because of # m4-listification. # FIXME: For the time being we use -f to make sure we do issue the # warnings. But maybe autom4te should handle that by itself? AT_DATA_M4SUGAR([script.4s], [[m4_init m4_defun([cross_warning], [m4_warn([cross], [cross])]) m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl m4_warn([obsolete], [obsolete])dnl cross_warning[]dnl m4_warn([syntax], [syntax])dnl ]]) AT_CHECK_M4SUGAR([-o-], 0, [], [script.4s:8: warning: syntax ]) AT_CHECK_M4SUGAR([-o- -Wall -f], 0, [], [script.4s:6: warning: obsolete script.4s:7: warning: cross script.4s:3: cross_warning is expanded from... script.4s:7: the top level script.4s:8: warning: syntax ]) AT_CHECK_M4SUGAR([-o- -Wnone,cross -f], 0, [], [script.4s:7: warning: cross script.4s:3: cross_warning is expanded from... script.4s:7: the top level ]) AT_CHECK_M4SUGAR([-o- -Wnone,cross,error -f], 1, [], [[script.4s:7: warning: cross script.4s:3: cross_warning is expanded from... script.4s:7: the top level ]]) AT_CLEANUP ## ----------------------------------- ## ## m4_require: circular dependencies. ## ## ----------------------------------- ## AT_SETUP([[m4@&t@_require: circular dependencies]]) # m4_text_wrap is used to display the help strings. Also, check that # commas are not swallowed. This can easily happen because of # m4-listification. AT_DATA_M4SUGAR([script.4s], [[m4_defun([foo], [m4_require([bar])]) m4_defun([bar], [m4_require([foo])]) m4_defun([baz], [m4_require([foo])]) m4_init m4_divert_push([0])m4_wrap([m4_divert_pop([0])[]])dnl baz ]]) AT_CHECK_M4SUGAR([], 1, [], [[script.4s:12: error: m4@&t@_require: circular dependency of foo script.4s:12: foo is required by... script.4s:5: bar is expanded from... script.4s:12: bar is required by... script.4s:2: foo is expanded from... script.4s:12: foo is required by... script.4s:8: baz is expanded from... script.4s:12: the top level autom4te: m4 failed with exit status: 1 ]]) AT_CLEANUP ## -------------- ## ## m4_text_wrap. ## ## -------------- ## AT_SETUP([[m4@&t@_text_wrap]]) # m4_text_wrap is used to display the help strings. Also, check that # commas are not swallowed. This can easily happen because of # m4-listification. AT_DATA_M4SUGAR([script.4s], [[m4_divert_push([0])m4_wrap([m4_divert_pop([0])])dnl m4_text_wrap([Short string */], [ ], [/* ], 20) m4_text_wrap([Much longer string */], [ ], [/* ], 20) m4_text_wrap([Short doc.], [ ], [ --short ], 30) m4_text_wrap([Short doc.], [ ], [ --too-wide], 30) m4_text_wrap([Super long documentation.], [ ], [ --too-wide], 30) m4_text_wrap([First, second , third, [,quoted]]) ]]) AT_DATA([expout], [[/* Short string */ /* Much longer string */ --short Short doc. --too-wide Short doc. --too-wide Super long documentation. First, second , third, [,quoted] ]]) AT_CHECK_M4SUGAR([-o-], 0, [expout]) AT_CLEANUP autoconf2.59-2.59+dfsg/tests/Makefile.in0000644000175000017500000003574107752412550017270 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/../lib/freeze.mk $(srcdir)/Makefile.in \ Makefile.am atlocal.in wrapper.in subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = atlocal autoconf autoheader autom4te autoreconf \ autoscan autoupdate ifnames SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ # We don't actually distribute the testsuite, since one only # needs m4 to build it, m4 being required anyway to install Autoconf. EXTRA_DIST = $(TESTSUITE_AT) local.at mktests.sh \ atlocal.in package.m4 wrapper.as # Running the uninstalled scripts. check_SCRIPTS = autoconf autoheader autoreconf autom4te autoscan autoupdate ifnames DISTCLEANFILES = atconfig atlocal $(TESTSUITE) $(check_SCRIPTS) SUFFIXES = .m4 .m4f # Do not use AUTOM4TE here, since Makefile.maint (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. But we _ship_ tests/autom4te, so it doesn't # apply to us. MY_AUTOM4TE = $(top_builddir)/tests/autom4te AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Factor the dependencies between all the frozen files. # Some day we should explain to Automake how to use autom4te to compute # the dependencies... src_libdir = $(top_srcdir)/lib build_libdir = $(top_builddir)/lib m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG) m4sugar_m4f_dependencies = \ $(m4f_dependencies) \ $(src_libdir)/m4sugar/m4sugar.m4 \ $(build_libdir)/m4sugar/version.m4 m4sh_m4f_dependencies = \ $(m4sugar_m4f_dependencies) \ $(src_libdir)/m4sugar/m4sh.m4 autotest_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autotest/autotest.m4 \ $(src_libdir)/autotest/general.m4 autoconf_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autoconf/autoscan.m4 \ $(src_libdir)/autoconf/general.m4 \ $(src_libdir)/autoconf/autoheader.m4 \ $(src_libdir)/autoconf/autoupdate.m4 \ $(src_libdir)/autoconf/autotest.m4 \ $(src_libdir)/autoconf/status.m4 \ $(src_libdir)/autoconf/oldnames.m4 \ $(src_libdir)/autoconf/specific.m4 \ $(src_libdir)/autoconf/lang.m4 \ $(src_libdir)/autoconf/c.m4 \ $(src_libdir)/autoconf/fortran.m4 \ $(src_libdir)/autoconf/functions.m4 \ $(src_libdir)/autoconf/headers.m4 \ $(src_libdir)/autoconf/types.m4 \ $(src_libdir)/autoconf/libs.m4 \ $(src_libdir)/autoconf/programs.m4 \ $(src_libdir)/autoconf/autoconf.m4 ETAGS_FOR_M4 = \ --lang=none \ --regex='/\(m4_define\|define\)(\[\([^]]*\)\]/\2/' ETAGS_FOR_M4SUGAR = \ $(ETAGS_FOR_M4) \ --regex='/m4_defun(\[\([^]]*\)\]/\1/' ETAGS_FOR_AUTOCONF = \ $(ETAGS_FOR_M4SUGAR) \ --regex='/\(A[CU]_DEFUN\|AU_ALIAS\)(\[\([^]]*\)\]/\2/' \ --regex='/AN_\(FUNCTION\|HEADER\|IDENTIFIER\|LIBRARY\|MAKEVAR\|PROGRAM\)(\[\([^]]*\)\]/\2/' TESTSUITE_GENERATED_AT = \ aclang.at acc.at acfortran.at \ acgeneral.at acstatus.at \ acautoheader.at acautoupdate.at \ acspecific.at acfunctions.at acheaders.at actypes.at \ aclibs.at acprograms.at TESTSUITE_HAND_AT = \ suite.at \ m4sugar.at m4sh.at \ base.at tools.at torture.at \ compile.at c.at fortran.at \ semantics.at \ foreign.at TESTSUITE_AT = $(TESTSUITE_GENERATED_AT) $(TESTSUITE_HAND_AT) TESTSUITE = ./testsuite # Run the non installed autom4te. # Don't use AUTOM4TE since `make alpha' makes it unavailable although # we are allowed to use it (since we ship it). AUTOTEST = ./autom4te --language=autotest MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE_GENERATED_AT) # The files which contains macro we check for syntax. Don't use $(top_srcdir) # here since below we explicitly `cd' to $srcdir. As for the dependencies, # thanks God for VPATH. Hm... autoconfdir = $(top_srcdir)/lib/autoconf AUTOCONF_FILES = $(autoconfdir)/general.m4 \ $(autoconfdir)/status.m4 \ $(autoconfdir)/autoheader.m4 \ $(autoconfdir)/autoupdate.m4 \ $(autoconfdir)/specific.m4 \ $(autoconfdir)/functions.m4 \ $(autoconfdir)/lang.m4 \ $(autoconfdir)/c.m4 \ $(autoconfdir)/fortran.m4 \ $(autoconfdir)/headers.m4 \ $(autoconfdir)/libs.m4 \ $(autoconfdir)/types.m4 \ $(autoconfdir)/programs.m4 # The hairy heredoc is more robust than using echo. CLEANFILES = expr all: all-am .SUFFIXES: .SUFFIXES: .m4 .m4f $(srcdir)/Makefile.in: Makefile.am $(srcdir)/../lib/freeze.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh atlocal: $(top_builddir)/config.status atlocal.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ autoconf: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ autoheader: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ autom4te: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ autoreconf: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ autoscan: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ autoupdate: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ifnames: $(top_builddir)/config.status wrapper.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../lib @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: installcheck-local maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am check-local clean clean-generic \ clean-local distclean distclean-generic distdir dvi dvi-am \ html html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installcheck-local installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am $(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg # When processing the file with diversion disabled, there must be no # output but comments and empty lines. # If freezing produces output, something went wrong: a bad `divert', # or an improper paren etc. # It may happen that the output does not end with a end of line, hence # force an end of line when reporting errors. .m4.m4f: $(MY_AUTOM4TE) \ --language=$* \ --freeze \ --output=$@ # For parallel builds. $(build_libdir)/m4sugar/version.m4: cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4 check-forbidden-patterns: if (cd $(srcdir) && \ grep $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ sed "s,^,$*.m4: ," &2; \ echo >&2; \ exit 1; \ else \ rm -f forbidden.log; \ fi # Import the dependencies on Autotest and M4sh. $(srcdir)/package.m4: $(top_srcdir)/configure.ac { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \ } >$(srcdir)/package.m4 $(srcdir)/wrapper.in: $(srcdir)/wrapper.as ./autom4te --language=M4sh $(srcdir)/wrapper.as -o $@ $(TESTSUITE): $(srcdir)/package.m4 \ local.at \ $(TESTSUITE_AT) \ $(autotest_m4f_dependencies) $(AUTOTEST) -I $(srcdir) suite.at -o $@.tmp mv $@.tmp $@ atconfig: $(top_builddir)/config.status cd $(top_builddir) && ./config.status tests/$@ clean-local: test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean rm -f *.tmp rm -rf autom4te.cache check-local: atconfig atlocal $(TESTSUITE) $(SHELL) $(TESTSUITE) # Run the test suite on the *installed* tree. installcheck-local: $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin $(TESTSUITE_GENERATED_AT): mktests.sh $(AUTOCONF_FILES) cd $(srcdir) && ./mktests.sh $(AUTOCONF_FILES) maintainer-check: maintainer-check-posix maintainer-check-c++ expr: echo '#! $(SHELL)' >expr echo 'result=`@EXPR@ "$$@"`' >>expr echo 'estatus=$$?' >>expr echo 'cat <>expr echo '$${result:-0}' >>expr echo 'EOF' >>expr echo 'exit $$estatus' >>expr chmod +x expr # Try the test suite with more severe environments. maintainer-check-posix: expr POSIXLY_CORRECTLY=yes make check rm expr # Try using G++ as a C compiler. maintainer-check-c++: CC=g++ make check # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/tests/wrapper.as0000644000175000017500000000267407734531650017232 0ustar taffittaffit# wrapper.as -- running `$0' as if it were installed. -*- shell-script -*- # @configure_input@ # Copyright (C) 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AS_INIT[]dnl testdir=@abs_top_builddir@/tests AUTOCONF=$testdir/autoconf AUTOHEADER=$testdir/autoheader AUTOM4TE=$testdir/autom4te AUTOM4TE_CFG=@abs_top_builddir@/lib/autom4te.cfg autom4te_perllibdir=@abs_top_srcdir@/lib export AUTOCONF AUTOHEADER AUTOM4TE AUTOM4TE_CFG autom4te_perllibdir case $as_me in ifnames) # Does not have lib files. exec @abs_top_builddir@/bin/$as_me ${1+"$@"} ;; *) # We might need files from the build tree (frozen files), in # addition of src files. exec @abs_top_builddir@/bin/$as_me \ -B @abs_top_builddir@/lib \ -B @abs_top_srcdir@/lib ${1+"$@"} esac exit 1 autoconf2.59-2.59+dfsg/tests/package.m40000644000175000017500000000043707752413034017050 0ustar taffittaffit# Signature of the current package. m4_define([AT_PACKAGE_NAME], [GNU Autoconf]) m4_define([AT_PACKAGE_TARNAME], [autoconf]) m4_define([AT_PACKAGE_VERSION], [2.59]) m4_define([AT_PACKAGE_STRING], [GNU Autoconf 2.59]) m4_define([AT_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org]) autoconf2.59-2.59+dfsg/tests/acautoupdate.at0000644000175000017500000000000007752413034020202 0ustar taffittaffitautoconf2.59-2.59+dfsg/tests/semantics.at0000644000175000017500000003071507663136371017540 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([Semantics.]) # Copyright (C) 2000, 2001, 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. ## -------------------------------- ## ## Members of the AC_CHECK family. ## ## -------------------------------- ## # AC_CHECK_LIB # ------------ # Well, I can't imagine a system where `cos' is neither in libc, nor # in libm. Nor can I imagine a lib more likely to exists than libm. # But there are systems without libm, on which we don't want to have # this test fail, so exit successfully if `cos' is in libc. AT_CHECK_MACRO([AC_CHECK_LIB], [AC_TRY_LINK_FUNC(cos, [AC_MSG_ERROR([`cos' is in `libc'], 77)]) AC_CHECK_LIB(m, cos,, [AC_MSG_ERROR([cannot find `cos' in `libm'])]) # No kidding, using variables was broken in 2.50 :( ac_sin=sin AC_CHECK_LIB(m, $ac_sin,, [AC_MSG_ERROR([cannot find `\$ac_sin' (= `$ac_sin') in `libm'])]) ac_m=m AC_CHECK_LIB($ac_m, acos,, [AC_MSG_ERROR([cannot find `acos' in `\$ac_m' (= `$ac_m')])]) ac_asin=asin AC_CHECK_LIB($ac_m, $ac_asin,, [AC_MSG_ERROR([cannot find `\$ac_asin' (= `$ac_asin') in `\$ac_m' (= `$at_m')])]) # But if the bug is in the caching mechanism, then be sure we # correctly detect failures. AC_CHECK_LIB(m, cossack, [AC_MSG_ERROR([found `cossack' in `libm'])]) # No kidding, using variables was broken in 2.50 :( ac_sinner=sinner AC_CHECK_LIB(m, $ac_sinner, [AC_MSG_ERROR([found `\$ac_sinner' (= `$ac_sinner') in `libm'])]) ac_m=m AC_CHECK_LIB($ac_m, acossack, [AC_MSG_ERROR([found `acossack' in `\$ac_m' (= `$ac_m')])]) ac_asinner=asinner AC_CHECK_LIB($ac_m, $ac_asinner, [AC_MSG_ERROR([found `\$ac_asinner' (= `$ac_asinner') in `\$ac_m' (= `$at_m')])]) ]) # AC_SEARCH_LIBS # -------------- AT_CHECK_MACRO([AC_SEARCH_LIBS], [ AC_SEARCH_LIBS(cos, oser m ust,, [AC_MSG_ERROR([cannot find `cos'])]) case "$ac_cv_search_cos" in -loser|-lust) AC_MSG_ERROR([jeez, $ac_cv_search_cos must be a cool library!]) ;; esac AC_SEARCH_LIBS(printf, oser c ust,, [AC_MSG_ERROR([cannot find `printf'])]) case "$ac_cv_search_printf" in -loser|-lust) AC_MSG_ERROR([jeez, $ac_cv_search_printf must be a cool library!]) ;; -lc) AC_MSG_ERROR([huh, you need to give -lc?]) esac ]) # AC_CHECK_DECLS # -------------- # Check that it performs the correct actions: # Must define NEED_NO_DECL, but not NEED_YES_DECL. AT_CHECK_MACRO([AC_CHECK_DECLS], [[AC_CHECK_DECLS([yes, no],,, [int yes = 1;])]], [AT_CHECK_DEFINES( [#define HAVE_DECL_NO 0 #define HAVE_DECL_YES 1 ])]) # AC_CHECK_FUNCS # -------------- # Check that it performs the correct actions: # Must define HAVE_PRINTF, but not HAVE_AUTOCONF_FTNIRP AT_CHECK_MACRO([AC_CHECK_FUNCS], [AC_CHECK_FUNCS(printf autoconf_ftnirp)], [AT_CHECK_DEFINES( [/* #undef HAVE_AUTOCONF_FTNIRP */ #define HAVE_PRINTF 1 ])]) # AC_REPLACE_FUNCS # ---------------- # Check that it performs the correct actions: autoconf_ftnirp.c must # be compiled, and must define HAVE_PRINTF, but not HAVE_AUTOCONF_FTNIRP # FIXME: Maybe check the traces? AT_SETUP([AC_REPLACE_FUNCS]) AT_DATA([config.in], [@LIBOBJS@ ]) AT_CONFIGURE_AC( [AC_CONFIG_FILES(config.libobjs:config.in) AC_REPLACE_FUNCS(printf autoconf_ftnirp)]) AT_CHECK_AUTOCONF([-W obsolete]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV AT_CHECK_DEFINES( [/* #undef HAVE_AUTOCONF_FTNIRP */ #define HAVE_PRINTF 1 ]) AT_CHECK([sed 's/ */ /g;s/^ //;s/ $//' config.libobjs], [], [autoconf_ftnirp$U.o ]) AT_CLEANUP([config.libobjs]) # AC_CHECK_HEADERS # ---------------- # Check that it performs the correct actions: # Must define HAVE_STDIO_H, but not HAVE_AUTOCONF_IO_H. AT_CHECK_MACRO([AC_CHECK_HEADERS], [AC_CHECK_HEADERS(stdio.h autoconf_io.h)], [AT_CHECK_DEFINES( [/* #undef HAVE_AUTOCONF_IO_H */ #define HAVE_STDIO_H 1 ])]) # AC_CHECK_HEADERS_OLD # -------------------- # Check that it performs the correct actions: # Must not check prerequisites, hence define header2.h AT_SETUP([AC_CHECK_HEADERS_OLD]) AT_DATA([header1.h], [typedef int foo; ]) AT_DATA([header2.h], [typedef foo bar; ]) AT_CONFIGURE_AC( [CPPFLAGS="$CPPFLAGS -I." AC_CHECK_HEADERS(header2.h, [], [], -)]) AT_CHECK_AUTOCONF([-W obsolete]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV AT_CHECK_DEFINES( [#define HAVE_HEADER2_H 1 ]) AT_CLEANUP([header1.h header2.h]) # AC_CHECK_HEADERS_NEW # -------------------- # Check that it performs the correct actions: # Must check prerequisites, hence define header2.h but not header3.h AT_SETUP([AC_CHECK_HEADERS_NEW]) AT_DATA([header1.h], [typedef int foo; ]) AT_DATA([header2.h], [typedef foo bar; ]) AT_DATA([header3.h], [typedef bar wow; ]) AT_CONFIGURE_AC( [CPPFLAGS="$CPPFLAGS -I." AC_CHECK_HEADERS(header2.h header3.h, [], [], [[@%:@include "header1.h"]])]) AT_CHECK_AUTOCONF([-W obsolete]) AT_CHECK_AUTOHEADER AT_CHECK_CONFIGURE AT_CHECK_ENV AT_CHECK_DEFINES( [#define HAVE_HEADER2_H 1 /* #undef HAVE_HEADER3_H */ ]) AT_CLEANUP([header1.h header2.h header3.h]) # AC_CHECK_MEMBERS # ---------------- # Check that it performs the correct actions. # Must define HAVE_STRUCT_YES_S_YES, but not HAVE_STRUCT_YES_S_NO. AT_CHECK_MACRO([AC_CHECK_MEMBERS], [[AC_CHECK_MEMBERS([struct yes_s.yes, struct yes_s.no],,, [struct yes_s { int yes ;} ;])]], [AT_CHECK_DEFINES( [/* #undef HAVE_STRUCT_YES_S_NO */ #define HAVE_STRUCT_YES_S_YES 1 ])]) # AC_CHECK_SIZEOF # --------------- # Not cross-compiling. AT_CHECK_MACRO([AC_CHECK_SIZEOF], [[AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(charchar,, [[#include typedef char charchar[2];]]) AC_CHECK_SIZEOF(charcharchar) ]], [AT_CHECK_DEFINES( [#define SIZEOF_CHAR 1 #define SIZEOF_CHARCHAR 2 #define SIZEOF_CHARCHARCHAR 0 ])]) # AC_CHECK_SIZEOF # --------------- AT_CHECK_MACRO([AC_CHECK_SIZEOF], [[# Exercise the code used when cross-compiling cross_compiling=yes AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(charchar,, [[#include typedef char charchar[2];]]) AC_CHECK_SIZEOF(charcharchar) ]], [AT_CHECK_DEFINES( [#define SIZEOF_CHAR 1 #define SIZEOF_CHARCHAR 2 #define SIZEOF_CHARCHARCHAR 0 ])]) # AC_CHECK_TYPES # -------------- # Check that it performs the correct actions. # Must define HAVE_STRUCT_YES_S, HAVE_INT, but not HAVE_STRUCT_NO_S. # `int' and `struct yes_s' are both checked to test both the compiler # builtin types, and defined types. AT_CHECK_MACRO([AC_CHECK_TYPES], [[AC_CHECK_TYPES([int, struct yes_s, struct no_s],,, [struct yes_s { int yes ;} ;])]], [AT_CHECK_DEFINES( [#define HAVE_INT 1 /* #undef HAVE_STRUCT_NO_S */ #define HAVE_STRUCT_YES_S 1 ])]) # AC_CHECK_TYPES # -------------- # Check that we properly dispatch properly to the old implementation # or to the new one. AT_SETUP([AC_CHECK_TYPES: backward compatibility]) AT_DATA([configure.ac], [[AC_INIT define([_AC_CHECK_TYPE_NEW], [NEW]) define([_AC_CHECK_TYPE_OLD], [OLD]) #(cut-from-here AC_CHECK_TYPE(ptrdiff_t) AC_CHECK_TYPE(ptrdiff_t, int) AC_CHECK_TYPE(quad, long long) AC_CHECK_TYPE(table_42, [int[42]]) # Nice machine! AC_CHECK_TYPE(uint8_t, uint65536_t) AC_CHECK_TYPE(a,b,c,d) #to-here) AC_OUTPUT ]]) AT_CHECK_AUTOCONF AT_CHECK([[sed -e '/^#(cut-from-here/,/^#to-here)/!d' -e '/^#/d' configure]], 0, [NEW OLD OLD OLD OLD NEW ]) AT_CLEANUP # AC_CHECK_FILES # -------------- # FIXME: To really test HAVE_AC_EXISTS2 and HAVE_AC_MISSING2 we need to # open AH_TEMPLATE to `configure.ac', which is not yet the case. AT_CHECK_MACRO([AC_CHECK_FILES], [touch at-exists1 at-exists2 ac_exists2=at-exists2 ac_missing2=at-missing2 AC_CHECK_FILES(at-exists1 at-missing1 $ac_exists2 $ac_missing2) rm at-exists1 at-exists2], [AT_CHECK_DEFINES( [#define HAVE_AT_EXISTS1 1 /* #undef HAVE_AT_MISSING1 */ ])]) ## ------------------------------ ## ## AC_CHECK_PROG & AC_PATH_PROG. ## ## ------------------------------ ## # AT_CHECK_PROGS_PREPARE # ---------------------- # Create a sub directory `path' with 6 subdirs which all 7 contain # an executable `tool'. `6' contains a `better' tool. m4_define([AT_CHECK_PROGS_PREPARE], [mkdir path cat >path/tool <<\EOF #! /bin/sh exit 0 EOF chmod +x path/tool for i in 1 2 3 4 5 6 do mkdir path/$i cp path/tool path/$i done cp path/tool path/6/better]) # -------------------------------- # # AC_CHECK_PROG & AC_CHECK_PROGS. # # -------------------------------- # AT_SETUP([AC_CHECK_PROG & AC_CHECK_PROGS]) AT_CHECK_PROGS_PREPARE AT_DATA([configure.ac], [[AC_INIT pwd=`pwd` p="1${PATH_SEPARATOR}2${PATH_SEPARATOR}3${PATH_SEPARATOR}4${PATH_SEPARATOR}5${PATH_SEPARATOR}6" path=`echo $p | sed -e 's,\([[0-9]]\),'"$pwd"'/path/\1,g'` fail=false AC_CHECK_PROG(TOOL1, tool, found, not-found, $path) test "$TOOL1" = found || fail=: # Yes, the semantics of this macro is weird. AC_CHECK_PROG(TOOL2, tool,, not-found, $path) test "$TOOL2" = not-found || fail=: AC_CHECK_PROG(TOOL3, tool, tool, not-found, $path, $pwd/path/1/tool) test "$TOOL3" = $pwd/path/2/tool || fail=: AC_CHECK_PROG(TOOL4, better, better, not-found, $path, $pwd/path/1/tool) test "$TOOL4" = better || fail=: # When a tool is not found, and no value is given for not-found, # the variable is left empty. AC_CHECK_PROGS(TOOL5, missing,, $path) test -z "$TOOL5" || fail=: AC_CHECK_PROGS(TOOL6, missing tool better,, $path) test "$TOOL6" = tool || fail=: # No AC-OUTPUT, we don't need config.status. $fail && AC_MSG_ERROR([[CHECK_PROG failed]]) AS_EXIT(0) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CLEANUP(path) ## ---------------- ## ## AC_C_BIGENDIAN. ## ## ---------------- ## AT_SETUP([[AC_C_BIGENDIAN]]) AT_KEYWORDS([cross]) # Make sure that AC_C_BIGENDIAN behave the same whether we are # cross-compiling or not. _AT_CHECK_AC_MACRO( [AC_C_BIGENDIAN([ac_endian=big],[ac_endian=little],[ac_endian=unknown]) echo $ac_endian > at-endian ]) rm -f config.hin # So that next run of autoheader is quiet. _AT_CHECK_AC_MACRO( [cross_compiling=yes AC_C_BIGENDIAN([ac_endian=big],[ac_endian=little],[ac_endian=unknown]) ac_prevendian=`cat at-endian` # Check that we have found the same result as in the previous run # or unknown (because the cross-compiling check is allowed to fail; # although it might be interesting to suppress this comparison, just # to know on which system it fails if it ever does). if test $ac_endian != $ac_prevendian && test $ac_endian != unknown; then AC_MSG_ERROR([unexpected endianness: first run found '$ac_prevendian' but second run found '$ac_endian']) fi ]) # Make sure AC_C_BIGENDIAN with no argument will define WORDS_BIGENDIAN AT_CONFIGURE_AC([AC_C_BIGENDIAN]) AT_CHECK_AUTOHEADER AT_CHECK([grep WORDS_BIGENDIAN config.hin], [], [ignore]) AT_CLEANUP(at-endian) # ------------------------------ # # AC_PATH_PROG & AC_PATH_PROGS. # # ------------------------------ # AT_SETUP([[AC_PATH_PROG & AC_PATH_PROGS]]) AT_CHECK_PROGS_PREPARE AT_DATA([configure.ac], [[AC_INIT pwd=`pwd` p="1${PATH_SEPARATOR}2${PATH_SEPARATOR}3${PATH_SEPARATOR}4${PATH_SEPARATOR}5${PATH_SEPARATOR}6" path=`echo $p | sed -e 's,\([[0-9]]\),'"$pwd"'/path/\1,g'` fail=false AC_PATH_PROG(TOOL1, tool, not-found, $path) test "$TOOL1" = $pwd/path/1/tool || fail=: AC_PATH_PROG(TOOL2, better, not-found, $path) test "$TOOL2" = $pwd/path/6/better || fail=: # When a tool is not found, and no value is given for not-found, # the variable is left empty. AC_PATH_PROGS(TOOL3, missing,, $path) test -z "$TOOL3" || fail=: AC_PATH_PROGS(TOOL4, missing tool better,, $path) test "$TOOL4" = $pwd/path/1/tool || fail=: # No AC-OUTPUT, we don't need config.status. $fail && AC_MSG_ERROR([[PATH_PROG failed]]) AS_EXIT(0) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CLEANUP(path) ## -------------- ## ## AC_PATH_XTRA. ## ## -------------- ## AT_SETUP([AC_PATH_XTRA]) _AT_CHECK_AC_MACRO([AC_PATH_XTRA]) # Check X_DISPLAY_MISSING. AT_CHECK_CONFIGURE([--without-x]) AT_CHECK_DEFINES( [#define X_DISPLAY_MISSING 1 ]) AT_CLEANUP ## ------------------------------- ## ## Obsolete non-updatable macros. ## ## ------------------------------- ## AT_CHECK_MACRO([AC_SYS_RESTARTABLE_SYSCALLS], , ,[-W no-obsolete]) AT_CHECK_MACRO([AC_FUNC_WAIT3], , ,[-W no-obsolete]) autoconf2.59-2.59+dfsg/tests/base.at0000644000175000017500000001104007675551520016452 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([Autoconf base layer.]) # Copyright (C) 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. ## ------------------------------- ## ## AC_REQUIRE: topological sort.. ## ## ------------------------------- ## # Check that dependencies are always properly honored. AT_SETUP([AC_REQUIRE: topological sort]) AT_DATA([configure.ac], [[define([REQUIRE_AND_CHECK], [AC_REQUIRE([$1]) test -z "$m4@&t@_translit([$1], [A-Z], [a-z])" && AS_EXIT(1)]) AC_DEFUN([TEST1], [REQUIRE_AND_CHECK([TEST2a]) REQUIRE_AND_CHECK([TEST2b]) test1=set]) AC_DEFUN([TEST2a], [test2a=set]) AC_DEFUN([TEST2b], [REQUIRE_AND_CHECK([TEST3]) test2b=set]) AC_DEFUN([TEST3], [REQUIRE_AND_CHECK([TEST2a]) test3=set]) AS@&t@_INIT TEST1 test -z "$test1" && AC_MSG_ERROR([\$test1 is empty]) AS_EXIT(0) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CLEANUP ## ----------------------------------------------- ## ## AC_REQUIRE and AC_DEFUN_ONCE: Require, expand. ## ## ----------------------------------------------- ## AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: Require, expand]) AT_DATA([configure.ac], [[AC_DEFUN([TEST], [AC_REQUIRE([MULTI_TEST]) AC_REQUIRE([SINGLE_TEST])]) AC_DEFUN([MULTI_TEST], [multi_test=".$multi_test"]) AC_DEFUN_ONCE([SINGLE_TEST], [single_test=".$single_test"]) AS@&t@_INIT TEST TEST MULTI_TEST MULTI_TEST SINGLE_TEST SINGLE_TEST case $multi_test:$single_test in ...:. ) AS_EXIT(0);; ...:* ) AC_MSG_ERROR([DEFUN_ONCE is broken]);; *:. ) AC_MSG_ERROR([DEFUN is broken (Wow, congrats!)]);; esac ]]) AT_CHECK_AUTOCONF([], 0, [], [configure.ac:17: warning: SINGLE_TEST invoked multiple times configure.ac:18: warning: SINGLE_TEST invoked multiple times ]) AT_CHECK_CONFIGURE AT_CLEANUP ## ----------------------------------------------- ## ## AC_REQUIRE and AC_DEFUN_ONCE: Expand, require. ## ## ----------------------------------------------- ## AT_SETUP([AC_REQUIRE & AC_DEFUN_ONCE: Expand, require]) AT_DATA([configure.ac], [[AC_DEFUN([TEST], [AC_REQUIRE([MULTI_TEST]) AC_REQUIRE([SINGLE_TEST])]) AC_DEFUN([MULTI_TEST], [multi_test=".$multi_test"]) AC_DEFUN_ONCE([SINGLE_TEST], [single_test=".$single_test"]) AS@&t@_INIT MULTI_TEST MULTI_TEST SINGLE_TEST SINGLE_TEST TEST TEST case $multi_test:$single_test in ..:. ) AS_EXIT(0);; ..:* ) AC_MSG_ERROR([DEFUN_ONCE is broken]);; *:. ) AC_MSG_ERROR([DEFUN is broken (Wow, congrats!)]);; * ) AC_MSG_ERROR([received `$multi_test:$single_test']);; esac ]]) AT_CHECK_AUTOCONF([], 0, [], [configure.ac:16: warning: SINGLE_TEST invoked multiple times ]) AT_CHECK_CONFIGURE AT_CLEANUP ## ------------------------- ## ## AC_REQUIRE & AC_PROVIDE. ## ## ------------------------- ## AT_SETUP([AC_REQUIRE & AC_PROVIDE]) AT_DATA([configure.ac], [[AC_DEFUN([TEST], [AC_REQUIRE([INNER_TEST])]) AC_DEFUN([INNER_TEST], [inner_test=".$inner_test"]) AS@&t@_INIT AC_PROVIDE([INNER_TEST]) TEST case $inner_test in "" ) AS_EXIT(0);; * ) AC_MSG_ERROR([received `$inner_test']);; esac ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CLEANUP ## ---------------- ## ## AC_CACHE_CHECK. ## ## ---------------- ## # Make sure AC_CACHE_CHECK is silent with -q. AT_SETUP([AC_CACHE_CHECK]) AT_DATA([configure.ac], [[AC_INIT AC_CACHE_CHECK([for nothing], [ac_nothing], [ac_nothing=found]) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP ## ---------------- ## ## AC_TRY_COMMAND. ## ## ---------------- ## AT_SETUP([AC_TRY_COMMAND]) AT_DATA([configure.ac], [[AC_INIT if AC_TRY_COMMAND([(echo "The Cat in the Hat"; echo "The Hat in the Cat" >&2) | grep \^The\ Cat\ in\ the\ Hat\$ >/dev/null]); then : else AC_MSG_ERROR([Didn't see the Cat in the Hat!]) fi if AC_TRY_COMMAND([(echo "The Cat in the Hat"; echo "The Hat in the Cat" >&2) | grep \^The\ Hat\ in\ the\ Cat\$ >/dev/null]); then AC_MSG_ERROR([Saw the Hat in the Cat!]) fi ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP autoconf2.59-2.59+dfsg/tests/compile.at0000644000175000017500000000616107675551530017201 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([Low level compiling/preprocessing macros.]) # Copyright (C) 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Since the macros which compile are required by most tests, check # them first. But remember that looking for a compiler is even more # primitive, so check those first. ## ------------------------------------- ## ## AC_LANG, AC_LANG_PUSH & AC_LANG_POP. ## ## ------------------------------------- ## AT_SETUP([AC_LANG, AC_LANG_PUSH & AC_LANG_POP]) AT_DATA([configure.ac], [[AC_INIT # C AC_LANG(C) # C AC_LANG_PUSH(C) # C C AC_LANG_PUSH(C++) # C++ C C AC_LANG(C++) # C++ C C AC_LANG_PUSH(Fortran 77) # F77 C++ C C AC_LANG_POP(Fortran 77) # C++ C C AC_LANG(C++) # C++ C C AC_LANG_POP(C++) # C C AC_LANG_POP(C) # C ]]) AT_CHECK_AUTOCONF AT_CHECK([sed -n 's/^ac_ext=//p' configure], 0, [c c c cc cc f cc cc c c ]) AT_CLEANUP ## ---------------------- ## ## AC_REQUIRE & AC_LANG. ## ## ---------------------- ## AT_SETUP([AC_REQUIRE & AC_LANG]) AT_DATA([configure.ac], [[AC_DEFUN([AC_F77_1], [AC_LANG_PUSH([Fortran 77]) if test $ac_ext != f; then AC_MSG_ERROR([F77_1: current shell language is $ac_ext, expected Fortran]) fi AC_LANG_POP ]) AC_DEFUN([AC_F77_2], [AC_LANG_PUSH([Fortran 77]) AC_REQUIRE([AC_F77_1]) if test $ac_ext != f; then AC_MSG_ERROR([F77_2: current shell language is $ac_ext, expected Fortran]) fi AC_LANG_POP ]) AC_INIT AC_F77_2 AS_EXIT(0) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CLEANUP ## --------------- ## ## AC_RUN_IFELSE. ## ## --------------- ## AT_SETUP([AC_RUN_IFELSE]) AT_DATA([configure.ac], [[AC_INIT AC_RUN_IFELSE([AC_LANG_PROGRAM([], [exit (0)])], [], [AC_MSG_ERROR([saw `exit 0' as a failure])]) AC_RUN_IFELSE([AC_LANG_PROGRAM([], [exit (2)])], [AC_MSG_ERROR([saw `exit 2' as a success])], [status=$? test $status != 2 && AC_MSG_ERROR([did not get as 2 exit status: $status])]) # The old stinky one. AC_TRY_RUN([int main () { exit (3); }], [AC_MSG_ERROR([saw `exit 3' as a success])], [status=$? test $status != 3 && AC_MSG_ERROR([did not get 3 as exit status: $status])]) ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP ## ------------------ ## ## AC_TRY_LINK_FUNC. ## ## ------------------ ## AT_CHECK_MACRO([AC_TRY_LINK_FUNC], [AC_TRY_LINK_FUNC(printf,, [AC_MSG_ERROR([cannot find `printf'])]) AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this, [AC_MSG_ERROR([found a nonexistent function])])]) autoconf2.59-2.59+dfsg/tests/acc.at0000644000175000017500000000116607752413034016267 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/c macros.]) # Modern macros. AT_CHECK_MACRO([AC_C_BACKSLASH_A]) AT_CHECK_MACRO([AC_C_BIGENDIAN]) AT_CHECK_MACRO([AC_C_CHAR_UNSIGNED]) AT_CHECK_MACRO([AC_C_LONG_DOUBLE]) AT_CHECK_MACRO([AC_C_STRINGIZE]) AT_CHECK_MACRO([AC_PROG_CC_C_O]) AT_CHECK_MACRO([AC_PROG_CPP_WERROR]) AT_CHECK_MACRO([AC_PROG_GCC_TRADITIONAL]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_LANG_C]) AT_CHECK_AU_MACRO([AC_LANG_CPLUSPLUS]) autoconf2.59-2.59+dfsg/tests/acprograms.at0000644000175000017500000000120407752413034017670 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/programs macros.]) # Modern macros. AT_CHECK_MACRO([AC_PROG_AWK]) AT_CHECK_MACRO([AC_PROG_FGREP]) AT_CHECK_MACRO([AC_PROG_INSTALL]) AT_CHECK_MACRO([AC_PROG_LEX]) AT_CHECK_MACRO([AC_PROG_LN_S]) AT_CHECK_MACRO([AC_PROG_MAKE_SET]) AT_CHECK_MACRO([AC_PROG_RANLIB]) AT_CHECK_MACRO([AC_PROG_YACC]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_CHECK_TOOL_PREFIX]) AT_CHECK_AU_MACRO([AC_DECL_YYTEXT]) AT_CHECK_AU_MACRO([AC_RSH]) autoconf2.59-2.59+dfsg/tests/actypes.at0000644000175000017500000000120507752413034017203 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/types macros.]) # Modern macros. AT_CHECK_MACRO([AC_STRUCT_ST_BLOCKS]) AT_CHECK_MACRO([AC_STRUCT_TIMEZONE]) AT_CHECK_MACRO([AC_TYPE_MODE_T]) AT_CHECK_MACRO([AC_TYPE_OFF_T]) AT_CHECK_MACRO([AC_TYPE_SIGNAL]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_INT_16_BITS]) AT_CHECK_AU_MACRO([AC_LONG_64_BITS]) AT_CHECK_AU_MACRO([AC_STRUCT_ST_BLKSIZE]) AT_CHECK_AU_MACRO([AC_STRUCT_ST_RDEV]) AT_CHECK_AU_MACRO([AM_TYPE_PTRDIFF_T]) autoconf2.59-2.59+dfsg/tests/aclang.at0000644000175000017500000000057507752413034016771 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/lang macros.]) # Modern macros. AT_CHECK_MACRO([AC_NO_EXECUTABLES]) AT_CHECK_MACRO([AC_REQUIRE_CPP]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_LANG_SAVE]) autoconf2.59-2.59+dfsg/tests/acautoheader.at0000644000175000017500000000000007752413034020150 0ustar taffittaffitautoconf2.59-2.59+dfsg/tests/acgeneral.at0000644000175000017500000000150007752413034017452 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/general macros.]) # Modern macros. AT_CHECK_MACRO([AC_ARG_ENABLE]) AT_CHECK_MACRO([AC_ARG_PROGRAM]) AT_CHECK_MACRO([AC_ARG_WITH]) AT_CHECK_MACRO([AC_CANONICAL_TARGET]) AT_CHECK_MACRO([AC_EGREP_CPP]) AT_CHECK_MACRO([AC_EGREP_HEADER]) AT_CHECK_MACRO([AC_PREFIX_DEFAULT]) # Obsolete macros. AT_CHECK_AU_MACRO([AC_CHECKING]) AT_CHECK_AU_MACRO([AC_COMPILE_CHECK]) AT_CHECK_AU_MACRO([AC_ENABLE]) AT_CHECK_AU_MACRO([AC_TRY_COMPILE]) AT_CHECK_AU_MACRO([AC_TRY_CPP]) AT_CHECK_AU_MACRO([AC_TRY_LINK]) AT_CHECK_AU_MACRO([AC_TRY_RUN]) AT_CHECK_AU_MACRO([AC_VALIDATE_CACHED_SYSTEM_TUPLE]) AT_CHECK_AU_MACRO([AC_WITH]) autoconf2.59-2.59+dfsg/tests/acstatus.at0000644000175000017500000000050007752413034017357 0ustar taffittaffit# Generated by mktests.sh. -*- Autotest -*- ## --------------------- ## ## Do not edit by hand. ## ## --------------------- ## # Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc. AT_BANNER([Testing autoconf/status macros.]) # Modern macros. # Obsolete macros. AT_CHECK_AU_MACRO([AC_OUTPUT_COMMANDS]) autoconf2.59-2.59+dfsg/tests/tools.at0000644000175000017500000003231307720657041016702 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([Executables (autoheader, autoupdate...).]) # Copyright (C) 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. ## ----------------------------- ## ## Syntax of the shell scripts. ## ## ----------------------------- ## # We use `/bin/sh -n script' to check that there are no syntax errors # in the scripts. Although incredible, there are /bin/sh that go into # endless loops with `-n', e.g., SunOS's: # # $ uname -a # SunOS ondine 4.1.3 2 sun4m unknown # $ cat endless.sh # while false # do # : # done # exit 0 # $ time sh endless.sh # sh endless.sh 0,02s user 0,03s system 78% cpu 0,064 total # $ time sh -nx endless.sh # ^Csh -nx endless.sh 3,67s user 0,03s system 63% cpu 5,868 total # # So before using `/bin/sh -n' to check our scripts, we first check # that `/bin/sh -n' is not broken to death. AT_SETUP([Syntax of the shell scripts]) # A script that never returns. We don't care that it never returns, # broken /bin/sh loop equally with `false', but it makes it easier to # test the robustness in a good environment: just remove the `-n'. AT_DATA([endless.sh], [[while : do : done ]]) # A script in charge of testing `/bin/sh -n'. AT_DATA([syntax.sh], [[(/bin/sh -n endless.sh) & sleep 2 if kill $! >/dev/null 2>&1; then # We managed to kill the child, which means that we probably # can't trust `/bin/sh -n', hence the test failed. exit 77 fi ]]) # If we can't trust sh, just skip. AT_CHECK([/bin/sh ./syntax.sh]) # Specify the path to the tool, some shells don't honor PATH when # running `sh PROG'. AT_CHECK([/bin/sh -n $abs_top_builddir/bin/autoconf], 0) # These are not built, they are in the src tree. AT_CHECK([/bin/sh -n $abs_top_srcdir/config/install-sh], 0) AT_CHECK([/bin/sh -n $abs_top_srcdir/config/mkinstalldirs], 0) AT_CHECK([/bin/sh -n $abs_top_srcdir/config/missing], 0) AT_CLEANUP ## ---------------------------- ## ## Syntax of the Perl scripts. ## ## ---------------------------- ## AT_SETUP([Syntax of the Perl scripts]) # Perl says things like: # | % perl -c ./autom4te # | ./autom4te syntax OK # Ignore it, it might change between releases. m4_define([AT_CHECK_PERL_SYNTAX], [AT_CHECK([autom4te_perllibdir=$abs_top_srcdir/lib $PERL -c $abs_top_builddir/bin/$1], 0, [], [ignore])]) AT_CHECK_PERL_SYNTAX([autoheader]) AT_CHECK_PERL_SYNTAX([autom4te]) AT_CHECK_PERL_SYNTAX([autoreconf]) AT_CHECK_PERL_SYNTAX([autoscan]) AT_CHECK_PERL_SYNTAX([autoupdate]) AT_CHECK_PERL_SYNTAX([ifnames]) AT_CLEANUP ## ------------------ ## ## autom4te's cache. ## ## ------------------ ## AT_SETUP([autom4te cache]) AT_DATA_M4SUGAR([[script.4s]], [[m4_include([foo]) ]]) # Everything is OK. touch foo AT_CHECK_M4SUGAR # We moved a file: it should fail mkdir sub mv foo sub AT_CHECK_M4SUGAR([], [1], [], [m4: script.4s: 1: Cannot open foo: No such file or directory autom4te: m4 failed with exit status: 1 ]) # But if we change the main file, then we should no longer complain of # missing files. AT_DATA_M4SUGAR([[script.4s]], [[m4_include([sub/foo]) ]]) AT_CHECK_M4SUGAR AT_CLEANUP ## ------------------ ## ## autoconf --trace. ## ## ------------------ ## # autoconf --trace: user macros # ----------------------------- AT_SETUP([autoconf --trace: user macros]) AT_DATA([configure.ac], [[m4_define([active], [ACTIVE]) m4_define([TRACE1], [TRACE2(m4_shift($@))]) m4_define([TRACE2], [[$2], $1]) # No arguments. TRACE1 TRACE2 # With arguments, single line. TRACE1(foo, @bar, @baz) TRACE1(foo, TRACE1(bar, baz)) TRACE1(foo, active, baz) TRACE1(foo, [active], TRACE1(active, [active])) # With arguments, multiple lines. TRACE1(foo bar, bar foo) ]]) # Several --traces. AT_CHECK_AUTOCONF([-t TRACE1 -t TRACE2], 0, [[configure.ac:6:TRACE1: configure.ac:6:TRACE2: configure.ac:7:TRACE2: configure.ac:10:TRACE1:foo:@bar:@baz configure.ac:10:TRACE2:@bar:@baz configure.ac:11:TRACE1:bar:baz configure.ac:11:TRACE2:baz configure.ac:11:TRACE1:foo::baz configure.ac:11:TRACE2::baz configure.ac:12:TRACE1:foo:ACTIVE:baz configure.ac:12:TRACE2:ACTIVE:baz configure.ac:13:TRACE1:ACTIVE:active configure.ac:13:TRACE2:active configure.ac:13:TRACE1:foo:active::ACTIVE configure.ac:13:TRACE2:active::ACTIVE configure.ac:19:TRACE1:foo bar:bar foo configure.ac:19:TRACE2:bar foo ]]) # Several line requests. AT_CHECK_AUTOCONF([[-t TRACE1:' [$1], [$2], [$3].']], 0, [[ [], [], []. [foo], [@bar], [@baz]. [bar], [baz], []. [foo], [], [baz]. [foo], [ACTIVE], [baz]. [ACTIVE], [active], []. [foo], [active], []. [foo bar], [bar foo], []. ]]) # ${sep}@. AT_CHECK_AUTOCONF([-t TRACE2:'${)===(}@'], 0, [[[] [] [@bar])===([@baz] [baz] [])===([baz] [ACTIVE])===([baz] [active] [active])===([])===([ACTIVE] [bar foo] ]]) AT_CLEANUP # autoconf --trace: builtins # -------------------------- AT_SETUP([autoconf --trace: builtins]) AT_DATA([configure.ac], [[define([active], [ACTIVE]) ]]) AT_CHECK_AUTOCONF([[-t define | sed -n '$p']], 0, [[configure.ac:1:define:active:ACTIVE ]]) # FIXME: Without `$1' the following test dies. Groumphf, once again to # dive into obscure feature interaction... # Note that using `-i' means we need the *.m4 files, not the *.m4f files, # hence we need srcdir, not builddir. AT_CHECK_AUTOCONF([[-t define:'$1' -i| sed -n '$p']], 0, [[active ]]) AT_CLEANUP ## ---------------------------- ## ## autoconf: forbidden tokens. ## ## ---------------------------- ## # autoconf: forbidden tokens, basic # --------------------------------- AT_SETUP([autoconf: forbidden tokens, basic]) AT_DATA_M4SH([configure.ac], [[AS_INIT m4_foo _m4_bar AS_FOO _AS_BAR [dnl] ]]) AT_DATA_M4SH([experr], [[configure.ac:2: error: possibly undefined macro: m4_foo If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:3: error: possibly undefined macro: _m4_bar configure.ac:4: error: possibly undefined macro: AS_FOO configure.ac:5: error: possibly undefined macro: _AS_BAR configure.ac:6: error: possibly undefined macro: dnl ]]) AT_CHECK_AUTOCONF([], 1, [], experr) AT_CLEANUP # autoconf: forbidden tokens, exceptions # -------------------------------------- AT_SETUP([autoconf: forbidden tokens, exceptions]) AT_DATA_M4SH([configure.ac], [[AS_INIT # This is allowed in spite of the name. # It is on purpose that we check the case where there are several # tokens on the same line. m4_pattern_allow([^AS_ALLOWED$]) NOT_AS_ALLOWED AS_ALLOWED AS_ALLOWED_NOT # Test forbidding. m4_pattern_forbid([^FORBIDDEN$]) NOT_FORBIDDEN FORBIDDEN FORBIDDEN_NOT # Test Autoconf's patterns. AS_THIS_IS_INVALID and _AS_THIS_IS_INVALID_TOO BUT_AZ_THIS_IS_NOT ALTHOUGH_AS_THIS_IS # This is legal, although there is `AS_DEFINE' in there. BAS_DEFINE # AS_THIS_IS_A_COMMENT so just shut up. It would be very bad if Autoconf forgot to expand [AS_]INIT! ]]) AT_DATA_M4SH([experr], [[configure.ac:1: error: possibly undefined macro: AS_INIT If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. configure.ac:7: error: possibly undefined macro: AS_ALLOWED_NOT configure.ac:10: error: possibly undefined macro: FORBIDDEN configure.ac:14: error: possibly undefined macro: AS_THIS_IS_INVALID configure.ac:14: error: possibly undefined macro: _AS_THIS_IS_INVALID_TOO ]]) AT_CHECK_AUTOCONF([], 1, [], [experr]) AT_CLEANUP ## --------- ## ## ifnames. ## ## --------- ## AT_SETUP([ifnames]) AT_DATA([iftest1.c], [[#ifdef DEF1 #ifndef DEF2 #if !defined(DEF3) && defined(DEF4) /* but not defined(DEF5) */ # if SPACES # if TABS /* #if C_COMMENTS */ // #if CXX_COMMENTS #if LINE1 = \ LINE2 #if (VAL1*VAL2)==VAL3+VAL4 /* Not VAL5 !!! */ ]]) AT_DATA([iftest2.c], [[#ifdef IFTEST2 #if VAL1 ]]) AT_CHECK([ifnames iftest1.c iftest2.c], 0, [DEF1 iftest1.c DEF2 iftest1.c DEF3 iftest1.c DEF4 iftest1.c IFTEST2 iftest2.c LINE1 iftest1.c LINE2 iftest1.c SPACES iftest1.c TABS iftest1.c VAL1 iftest1.c iftest2.c VAL2 iftest1.c VAL3 iftest1.c VAL4 iftest1.c ], []) AT_CLEANUP ## ------------ ## ## autoheader. ## ## ------------ ## # autoheader is intensively used in its modern form throughout this # test suite. But we also have to check that acconfig.h still works. # autoheader uses autoconf --trace, so traces first. AT_SETUP([autoheader]) AT_DATA([acconfig.h], [[/* Define this to whatever you want. */ #undef this ]]) # 1. Check that `acconfig.h' is still honored. AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) AC_DEFINE(this, "whatever you want.") ]]) AT_CHECK_AUTOHEADER([], [], [], [ignore]) AT_CHECK([cat config.hin], 0, [[/* config.hin. Generated from configure.ac by autoheader. */ /* Define this to whatever you want. */ #undef this /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION ]]) # 2. Check that missing templates are a fatal error. AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) AC_DEFINE(that, "whatever you want.") ]]) # The test suite goes too fast for the cache time stamps... # Pass --force. AT_CHECK_AUTOHEADER([--force], [1], [], [ignore]) # 3. Check TOP and BOTTOM. AT_DATA([acconfig.h], [[/* Top from acconfig.h. */ @TOP@ /* Middle from acconfig.h. */ @BOTTOM@ /* Bottom from acconfig.h. */ ]]) AT_DATA([configure.ac], [[AC_INIT AC_CONFIG_HEADERS(config.h:config.hin) AH_TOP([Top1 from configure.ac.]) AH_TOP([Top2 from configure.ac.]) AH_TOP([The Cat in a h@t.]) AH_VERBATIM([Middle], [Middle from configure.ac.]) AH_VERBATIM([Mouse], [The Mouse in a h@t.]) AH_BOTTOM([Bottom1 from configure.ac.]) AH_BOTTOM([Bottom2 from configure.ac.]) AH_BOTTOM([The Dog in a h@t.]) AC_DEFINE([ANT], [@], [The Ant in a h@t.]) ]]) # Yes, that's right: the `middle' part of `acconfig.h' is still before # the AH_TOP part. But so what, you're not supposed to use the two # together. # Ignore STDERR which is the longuish complaint against autoheader junk # files. AT_CHECK_AUTOHEADER([--force], [], [], [ignore]) AT_CHECK([cat config.hin], 0, [[/* config.hin. Generated from configure.ac by autoheader. */ /* Top from acconfig.h. */ /* Middle from acconfig.h. */ Top1 from configure.ac. Top2 from configure.ac. The Cat in a h@t. /* The Ant in a h@t. */ #undef ANT Middle from configure.ac. The Mouse in a h@t. /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION Bottom1 from configure.ac. Bottom2 from configure.ac. The Dog in a h@t. /* Bottom from acconfig.h. */ ]]) AT_CLEANUP ## ------------ ## ## autoupdate. ## ## ------------ ## # Check that AC_CANONICAL_SYSTEM and AC_OUTPUT are properly updated. AT_SETUP([autoupdate]) AT_DATA([configure.ac], [[AC_INIT(Test, 1.0) AC_CANONICAL_SYSTEM # The doc says 27 is a valid fubar. fubar=27 AC_OUTPUT(Makefile, echo $fubar, fubar=$fubar) ]]) AT_DATA([expout], [[AC_INIT([Test],[1.0]) AC_CANONICAL_TARGET([]) # The doc says 27 is a valid fubar. fubar=27 AC_CONFIG_FILES([Makefile]) AC_CONFIG_COMMANDS([default],[[echo $fubar]],[[fubar=$fubar]]) AC_OUTPUT ]]) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE AT_CHECK([cat configure.ac], 0, [expout]) # Checking that `autoupdate' is idempotent AT_CHECK_AUTOUPDATE AT_CHECK([cat configure.ac], 0, [expout]) AT_CLEANUP(configure.ac~) # autoupdating AC_LINK_FILES # -------------------------- AT_SETUP([autoupdating AC_LINK_FILES]) AT_DATA([configure.ac], [[AC_INIT AC_LINK_FILES(dst1 dst2, src1 src2) AC_OUTPUT ]]) AT_DATA([dst1], dst1 ) AT_DATA([dst2], dst2 ) # Checking `autoupdate'. AT_CHECK_AUTOUPDATE AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE AT_CHECK([cat src1], 0, [dst1 ]) AT_CHECK([cat src2], 0, [dst2 ]) AT_CLEANUP(src1 src2 configure.ac~) # autoupdating AC_PREREQ # ---------------------- AT_SETUP([autoupdating AC_PREREQ]) # Produce `AC_PREREQ()'. AT_CHECK([autoupdate --version | sed 's/.*) //;q'], 0, [stdout]) autoupdate_version=`cat stdout` echo "AC_PREREQ($autoupdate_version)" >expout AT_CHECK([echo "AC_PREREQ(1.0)" | autoupdate -], 0, [expout], []) AT_CHECK([echo "AC_PREREQ($autoupdate_version)" | autoupdate -], 0, [expout], []) AT_CHECK([echo "AC_PREREQ(999.99)" | autoupdate -], 63, [], [ignore]) AT_CLEANUP autoconf2.59-2.59+dfsg/tests/foreign.at0000644000175000017500000000544107663136371017201 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([Compatibility with other tools.]) # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. ## --------- ## ## Libtool. ## ## --------- ## AT_SETUP([[Libtool]]) # Skip this test if there is no libtoolize. AT_CHECK([libtoolize --version || exit 77], ignore, ignore, ignore) # CVS Autoconf probably does not work with too old Libtools. AT_CHECK([[ case `libtoolize --version | sed -n '/^.* \([0-9][0-9.a-z]*\)$/{s//\1/;p;q;}'` in 0.* ) exit 77;; 1.[0123]* ) exit 77;; esac]], ignore, ignore, ignore) # FIXME: Once Libtool `configure.ac' aware, change this. # Using a configure.in, have libtoolize confess where libtool.m4 is. AT_DATA([configure.in], [[AC_INIT # The other tests are relying on Autoconf's own copy of install-sh # etc. via AC_CONFIG_AUX_DIR(..). Don't do that here, since we don't # want libtoolize to pollute Autoconf's srcdir. AC_CONFIG_AUX_DIR(.) AC_PROG_LIBTOOL ]]) AT_CHECK([libtoolize], 0, [stdout], ignore) # Some broken libtoolize fail to install a functional config.guess. AT_CHECK([./config.guess || exit 77], [], [ignore], [ignore]) # Make sure at-path contains something valid, and let the test suite # display it when verbose. And fail, skipping would too easily hide # problems. AT_CHECK([sed -n ["s,^.*\`\(/[^']*\)'.*,\1,p"] stdout], 0, [stdout]) AT_CHECK([test -f "`cat stdout`"]) # libtoolize installed everything but install-sh... touch install-sh # Build the concatenation of libtool.m4 and configure.ac. cp `cat stdout` configure.in cat >>configure.in <<_EOF AC_INIT AC_CONFIG_AUX_DIR(.) AC_CANONICAL_SYSTEM AC_PROG_LIBTOOL _EOF # FIXME: Once Libtool really fixed, stop ignoring stderr. AT_CHECK_AUTOCONF([], [], [], [ignore]) # Ignore stderr, because ltconfig always loads the cache, which is # /dev/null, and some shells choke on this. For instance with Bash # 2.05, you get: # # loading cache /dev/null within ltconfig # ./ltconfig: .: /dev/null: not a regular file # # But the script executes properly. AT_CHECK_CONFIGURE([], [], [], [ignore]) AT_CLEANUP(install-sh ltconfig libtool at-path ltmain.sh config.guess config.sub) autoconf2.59-2.59+dfsg/tests/wrapper.in0000755000175000017500000000425607734532156017240 0ustar taffittaffit#! /bin/sh ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if ((MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` testdir=@abs_top_builddir@/tests AUTOCONF=$testdir/autoconf AUTOHEADER=$testdir/autoheader AUTOM4TE=$testdir/autom4te AUTOM4TE_CFG=@abs_top_builddir@/lib/autom4te.cfg autom4te_perllibdir=@abs_top_srcdir@/lib export AUTOCONF AUTOHEADER AUTOM4TE AUTOM4TE_CFG autom4te_perllibdir case $as_me in ifnames) # Does not have lib files. exec @abs_top_builddir@/bin/$as_me ${1+"$@"} ;; *) # We might need files from the build tree (frozen files), in # addition of src files. exec @abs_top_builddir@/bin/$as_me \ -B @abs_top_builddir@/lib \ -B @abs_top_srcdir@/lib ${1+"$@"} esac exit 1 autoconf2.59-2.59+dfsg/tests/c.at0000644000175000017500000001162207663135110015756 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([C low level compiling/preprocessing macros.]) # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Since the macros which compile are required by most tests, check # them first. But remember that looking for a compiler is even more # primitive, so check those first. ## ------------ ## ## Extensions. ## ## ------------ ## # As far as we know only `foo', `foo.exe' are possible executable, # and `foo.o', `foo.obj' are possible object files. Autoconf must not # know that, but it is OK for the test suite to take this into account. AT_CHECK_MACRO([Extensions], [[AC_PROG_CC case $ac_exeext in '' | '.exe' ) ;; * ) AC_MSG_ERROR([suspicious executable suffix: $ac_exeext]);; esac case $ac_objext in 'o' | 'obj' ) ;; * ) AC_MSG_ERROR([suspicious object suffix: $ac_objext]);; esac AS_EXIT([0]) ]]) ## -------------------------- ## ## Broken/missing compilers. ## ## -------------------------- ## # Check that Autoconf correctly diagnoses broken compilers, and in # particular, if it does not exit 77, the test suite is in trouble... # FIXME: Once a precise message decided, check stderr of configure. AT_SETUP([Broken/missing compilers]) AT_DATA([configure.ac], [[AC_INIT CC=no-such-compiler AC_PROG_CC ]]) AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([], 77, ignore, ignore) AT_CLEANUP ## ------------ ## ## C keywords. ## ## ------------ ## # GCC supports `const', `inline', `restrict', and `volatile'. AT_CHECK_MACRO([C keywords], [[AC_PROG_CC AC_C_CONST AC_C_INLINE AC_C_RESTRICT AC_C_VOLATILE case $GCC,$ac_cv_c_const,$ac_cv_c_inline,$ac_cv_c_restrict,$ac_cv_c_volatile in yes,*no*) AC_MSG_ERROR([failed to detect `const', `inline', `restrict', or `volatile' support]);; esac ]]) ## --------------------------------- ## ## AC_PROG_CPP requires AC_PROG_CC. ## ## --------------------------------- ## # Must invoke AC_PROG_CC. AT_CHECK_MACRO([AC_PROG_CPP requires AC_PROG_CC], [[AC_PROG_CPP test -z "$CC" && AC_MSG_ERROR([looked for a C preprocessor without looking for a compiler]) ]]) ## --------------------------- ## ## AC_PROG_CPP with warnings. ## ## --------------------------- ## # It's Ok for strict preprocessors to produce warnings. AT_SETUP([AC_PROG_CPP with warnings]) AT_DATA([mycpp], [[#! /bin/sh echo noise >&2 exec "$@" ]]) chmod +x mycpp _AT_CHECK_AC_MACRO( [[AC_PROG_CPP # If the preprocessor is not strict, just ignore test "x$ac_c_preproc_warn_flag" = xyes && AC_MSG_ERROR([preprocessor has no warning option], 77) CPP="./mycpp $CPP" AC_CHECK_HEADERS(stdio.h autoconf_io.h)]]) AT_CHECK_DEFINES( [/* #undef HAVE_AUTOCONF_IO_H */ #define HAVE_STDIO_H 1 ]) AT_CLEANUP ## ------------------------------ ## ## AC_PROG_CPP without warnings. ## ## ------------------------------ ## AT_SETUP([AC_PROG_CPP without warnings]) # Ignore if /lib/cpp doesn't work AT_CHECK([/lib/cpp &2 exec "$@" ]]) chmod +x mycc # We go through the following contortions, in order to have the # configure script go down the same codepaths as it would during a # normal CPP selection check. If we explicitly set CPP, it goes down # a different codepath. _AT_CHECK_AC_MACRO( [[AC_PROG_CC CC="./mycc $CC" AC_PROG_CPP # The test $CC compiler should have been selected. test "$CPP" != "$CC -E" && AC_MSG_ERROR([error messages on stderr cause the preprocessor selection to fail]) # Exercise CPP. AC_CHECK_HEADERS(stdio.h autoconf_io.h)]]) AT_CHECK_DEFINES( [/* #undef HAVE_AUTOCONF_IO_H */ #define HAVE_STDIO_H 1 ]) AT_CLEANUP autoconf2.59-2.59+dfsg/tests/fortran.at0000644000175000017500000000426507750420201017207 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([Fortran low level compiling/preprocessing macros.]) # Copyright (C) 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Since the macros which compile are required by most tests, check # them first. But remember that looking for a compiler is even more # primitive, so check those first. ## --------------------- ## ## Fortran 77 Compiler. ## ## --------------------- ## AT_CHECK_MACRO([GNU Fortran 77], [[AC_LANG(Fortran 77) AC_LANG_COMPILER if AC_TRY_COMMAND([$F77 --version | grep GNU >&2]); then # Be sure to remove files which might be created by compilers that # don't support --version. rm -f a.exe a.out # Has GNU in --version. test "$G77" != yes && AC_MSG_ERROR([failed to recognize GNU Fortran 77 compiler]) else # Be sure to remove files which might be created by compilers that # don't support --version. rm -f a.exe a.out # Has not. test "$G77" = yes && AC_MSG_ERROR([incorrectly recognized a GNU Fortran 77 compiler]) fi ]]) ## ------------------ ## ## Fortran Compiler. ## ## ------------------ ## AT_CHECK_MACRO([GNU Fortran], [[AC_LANG(Fortran) AC_LANG_COMPILER # No Fortran compiler is known not to support "*.f". AC_FC_SRCEXT([f]) # GNU Fortran is known to support freeform. AC_FC_FREEFORM([], [AC_MSG_WARN([Fortran does not accept free-form source])]) if test "$ac_compiler_gnu" = yes; then case $FCFLAGS in *-ffree-form*) ;; *) AC_MSG_ERROR([failed to recognize GNU Fortran's -ffree-form option.]);; esac fi ]]) autoconf2.59-2.59+dfsg/tests/m4sh.at0000644000175000017500000002223607675547223016431 0ustar taffittaffit# -*- Autotest -*- AT_BANNER([M4sh.]) # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. ## ---------------- ## ## LINENO support. ## ## ---------------- ## AT_SETUP([LINENO]) # We cannot unset LINENO with Zsh, yet this test case relies on # unsetting LINENO to compare its result when (i) LINENO is supported # and when (ii) it is not. # So just skip if the shell is ZSH. AT_CHECK([test -n "${ZSH_VERSION+set}" && exit 77], ignore) # AT_DATA_LINENO(FILENAME, # UNSET-LINENO = true | false, COUNTER, COUNTER-RE) # ---------------------------------------------------------------- # Produce the FILENAME M4sh script which uses the COUNTER LINENO or # _oline_, which we can recognized via COUNTER-RE. Unset LINENO is # UNSET-LINENO. # # Use COUNTER, COUNTER-RE = [__LINENO__], [LINENO] # or = [__OLINE__], [_oline__] # # instead of the obvious $LINENO and __oline__, because they would # be replaced in the test suite itself, even before creating these # scripts. For the same reason, grep for LINENO and _oline__ (sic). # # UNSET-LINENO is a shell condition to make sure the scripts have the # same number of lines in the output, so that their outputs be identical. m4_define([AT_DATA_LINENO], [AT_DATA([$1.tas], [[AS@&t@_INIT if $2; then AS@&t@_UNSET([LINENO]) fi _AS@&t@_PREPARE echo "Line: $3" grep 'Line: .*$4' $[0] >/dev/null || AS@&t@_ERROR([cannot find original script]) exit 0 ]]) # If occurrences of $LINENO or __oline__ were wanted, create them. sed 's/__LINENO__/$''LINENO/g;s/__OLINE__/__''oline__/g' $1.tas >$1.as AT_CHECK([autom4te -l m4sh $1.as -o $1]) ])# AT_DATA_LINENO # `_oline_', once processed and ran, produces our reference. # We check that we find ourselves by looking at a string which is # available only in the original script: `_oline_'. AT_DATA_LINENO([reference], [false], [__OLINE__], [_oline__]) AT_CHECK([./reference], 0, [stdout]) # The reference: mv stdout expout # Now using a maybe-functioning LINENO, with different call conventions. # Be sure to be out of the PATH. AT_CHECK([mkdir test || exit 77]) AT_DATA_LINENO([test/test-1], [false], [__LINENO__], [LINENO]) AT_CHECK([./test/test-1], 0, [expout]) AT_CHECK([(PATH=test$PATH_SEPARATOR$PATH; export PATH; exec test-1)], 0, [expout]) AT_CHECK([sh ./test/test-1], 0, [expout]) # Now using a disabled LINENO, with different call conventions. AT_DATA_LINENO([test/test-2], [true], [__LINENO__], [LINENO]) AT_CHECK([./test/test-2], 0, [expout]) AT_CHECK([(PATH=test$PATH_SEPARATOR$PATH; export PATH; exec test-2)], 0, [expout]) AT_CHECK([sh ./test/test-2], 0, [expout]) AT_CLEANUP ## ------------ ## ## AS_DIRNAME. ## ## ------------ ## # Build nested dirs. AT_SETUP([[AS@&t@_DIRNAME]]) AT_DATA_M4SH([script.as], [[AS_INIT # The EXPR variant is allowed to fail if `expr' was considered as too # weak for us, in which case `as_expr=false'. m4_define([DIRNAME_TEST], [dir=`AS_DIRNAME([$1])` test "$dir" = "$2" || (test -n "$3" && test "$dir" = "$3") || echo "dirname($1) = $dir instead of $2" >&2 if test "$as_expr" != false; then dir=`AS_DIRNAME_EXPR([$1])` test "$dir" = "$2" || (test -n "$3" && test "$dir" = "$3") || echo "dirname_expr($1) = $dir instead of $2" >&2 fi dir=`AS_DIRNAME_SED([$1])` test "$dir" = "$2" || test "$dir" = "$2" || (test -n "$3" && test "$dir" = "$3") || echo "dirname_sed($1) = $dir instead of $2" >&2]) DIRNAME_TEST([/], [/]) DIRNAME_TEST([//], [//], [/]) DIRNAME_TEST([///], [/]) DIRNAME_TEST([//1], [//], [/]) DIRNAME_TEST([/1], [/]) DIRNAME_TEST([./1], [.]) DIRNAME_TEST([../../2], [../..]) DIRNAME_TEST([//1/], [//], [/]) DIRNAME_TEST([/1/], [/]) DIRNAME_TEST([./1/], [.]) DIRNAME_TEST([../../2], [../..]) DIRNAME_TEST([//1/3], [//1]) DIRNAME_TEST([/1/3], [/1]) DIRNAME_TEST([./1/3], [./1]) DIRNAME_TEST([../../2/3], [../../2]) DIRNAME_TEST([//1/3///], [//1]) DIRNAME_TEST([/1/3///], [/1]) DIRNAME_TEST([./1/3///], [./1]) DIRNAME_TEST([../../2/3///], [../../2]) DIRNAME_TEST([//1//3/], [//1]) DIRNAME_TEST([/1//3/], [/1]) DIRNAME_TEST([./1//3/], [./1]) DIRNAME_TEST([../../2//3/], [../../2]) AS_EXIT(0) ]]) AT_CHECK_M4SH AT_CHECK([./script]) AT_CLEANUP ## ------------- ## ## AS_BASENAME. ## ## ------------- ## # Build nested dirs. AT_SETUP([[AS@&t@_BASENAME]]) AT_DATA_M4SH([script.as], [[AS_INIT m4_define([BASENAME_TEST], [base=`AS_BASENAME([$1])` test "$base" = "$2" || echo "basename($1) = $base instead of $2" >&2 base=`AS_BASENAME_SED([$1])` test "$base" = "$2" || echo "basename_sed($1) = $base instead of $2" >&2]) BASENAME_TEST([//1], [1]) BASENAME_TEST([/1], [1]) BASENAME_TEST([./1], [1]) BASENAME_TEST([../../2], [2]) BASENAME_TEST([//1/], [1]) BASENAME_TEST([/1/], [1]) BASENAME_TEST([./1/], [1]) BASENAME_TEST([../../2], [2]) BASENAME_TEST([//1/3], [3]) BASENAME_TEST([/1/3], [3]) BASENAME_TEST([./1/3], [3]) BASENAME_TEST([../../2/3], [3]) BASENAME_TEST([//1/3///], [3]) BASENAME_TEST([/1/3///], [3]) BASENAME_TEST([./1/3///], [3]) BASENAME_TEST([../../2/3///], [3]) BASENAME_TEST([//1//3/], [3]) BASENAME_TEST([/1//3/], [3]) BASENAME_TEST([./1//3/], [3]) BASENAME_TEST([a.c], [a.c]) BASENAME_TEST([a.c/], [a.c]) BASENAME_TEST([/a.c/], [a.c]) BASENAME_TEST([/1/a.c], [a.c]) BASENAME_TEST([/1/a.c/], [a.c]) BASENAME_TEST([/1/../a.c], [a.c]) BASENAME_TEST([/1/../a.c/], [a.c]) BASENAME_TEST([./1/a.c], [a.c]) BASENAME_TEST([./1/a.c/], [a.c]) AS_EXIT(0) ]]) AT_CHECK_M4SH AT_CHECK([./script]) AT_CLEANUP ## ------------ ## ## AS_MKDIR_P. ## ## ------------ ## # Build nested dirs. AT_SETUP([[AS@&t@_MKDIR_P]]) AT_DATA_M4SH([script.as], [[AS_INIT pwd=`pwd` set -e # Absolute AS_MKDIR_P(["$pwd/1/2/3/4/5/6"]) test -d "$pwd/1/2/3/4/5/6" || AS_ERROR([$pwd/1/2/3/4/5/6 has not been properly created]) # Relative AS_MKDIR_P(["a/b/c/d/e/f"]) test -d a/b/c/d/e/f || AS_ERROR([a/b/c/d/e/f has not been properly created]) AS_EXIT(0) ]]) AT_CHECK_M4SH AT_CHECK([./script]) AT_CLEANUP ## ----------------------------- ## ## Negated classes in globbing. ## ## ----------------------------- ## # It is known that `[^...]' is not universally supported, but it is # unknown for `[!...]'. AT_SETUP([Negated classes in globbing]) AT_DATA_M4SH([script.as], [[AS_INIT case 'with!two!bangs' in *[[!a-z]]*) ;; *) AS_ERROR([[`*[!a-z]*' didn't match `with!two!bangs']]);; esac case without in *[[!a-z]]*) AS_ERROR([[`*[!a-z]*' matched `without']]);; esac ]]) AT_CHECK_M4SH AT_CHECK([./script]) AT_CLEANUP ## ------------------- ## ## Functions Support. ## ## ------------------- ## # Hypothesis: the shell we are running, after having checked for # $LINENO support, supports functions. AT_SETUP([Functions Support]) AT_DATA_M4SH([script.as], [[AS_INIT _AS_LINENO_PREPARE func_return () { (exit $1) } func_success () { func_return 0 } func_failure () { func_return 1 } if func_success; then if func_failure; then AS_ERROR([func_failure passed]) fi else AS_ERROR([func_success failed]) fi ]]) AT_CHECK_M4SH AT_CHECK([./script]) AT_CLEANUP ## ------------------------------ ## ## Functions and return Support. ## ## ------------------------------ ## # Hypothesis: the shell we are running, after having checked for # $LINENO support, supports functions, and the `return' keyword. AT_SETUP([Functions and return Support]) AT_DATA_M4SH([script.as], [[AS_INIT _AS_LINENO_PREPARE func_success () { return 0 } func_failure () { return 1 } if func_success; then if func_failure; then AS_ERROR([func_failure passed]) fi else AS_ERROR([func_success failed]) fi ]]) AT_CHECK_M4SH AT_CHECK([./script]) AT_CLEANUP ## -------------- ## ## AS_HELP_STRING ## ## -------------- ## # I'm not totally certain that we want to enforce the defaults here, # but at least it is being tested. AT_SETUP([[AS@&t@_HELP_STRING]]) AT_DATA_M4SH([script.as], [[AS_INIT _AS_LINENO_PREPARE echo "AS_HELP_STRING([--an-option],[some text])" echo "AS_HELP_STRING([--another-much-longer-option], [some other text which should wrap at our default of 80 characters.])" ]]) AT_CHECK_M4SH AT_CHECK([./script], [0], [ --an-option some text --another-much-longer-option some other text which should wrap at our default of 80 characters. ]) AT_CLEANUP autoconf2.59-2.59+dfsg/TODO0000644000175000017500000006424107545777021014555 0ustar taffittaffit-*- outline -*- Things it might be nice to do someday. I haven't evaluated all of these suggestions... their presence here doesn't imply my endorsement. -djm & his successors. ------------------------------------------------------------------------------ * Soon ** AC_CHECK_HEADERS and the like, don't have a consistent way to handle multi-line arguments. Fix, test, and document. ** AC_PROG_INSTALL This test should be extended to check that install supports the GNU Install syntax: install FILES... DIR. This will relieve everybody form having to use mkinstalldirs to create the directories, as install does it itself. install-sh is already handling this case. This also makes it simple not to create the directories where nothing will be installed because of configuration options, which is next to impossible using the current setting. In other words: everything is ready (install-sh and Automake), we just need a good reimplementation of AC_PROG_INSTALL. ** --target & AC_ARG_PROGRAM Shouldn't *any* `program' be installed as `$target_alias-program' even if AC_ARG_PROGRAM is not called? That would be much more predictable. Ian? ** AC_CHECK_TOOL... Write a test that checks that it honors the values set by the user. ** autom4te and warnings. Decide what must be done. ** AC_DEFINE(func, rpl_func) This scheme causes problems: if for instance, #define malloc rpl_malloc, then the rest of configure will use an undefined malloc. Hence some tests fail. Up to now we simply #undef these functions where we had a problem (cf. AC_FUNC_MKTIME and AC_FUNC_MMAP for instance). This is _bad_. Maybe the #define func rpl_malloc should be performed in another file than confdefs.h, say confh.h, which is used for config.h generation, but not used in configure's own tests. ** AC_PROG_CC Currently it tries to put the C compiler in ANSI C mode by default. We should change this spec so that AC_PROG_CC tries to change the compiler to be the "nicest" mode, i.e. support for the latest standard features (currently ISO C99) plus support for all vendor extensions, even if they are slightly incompatible with C99. The basic idea here is that AC_PROG_CC should disable pedanticisms and should enable extensions. ** AC_GNU_SOURCE, AC_AIX, and AC_MINIX Deprecate these, as they will be superseded by the AC_PROG_CC changes. * Later ** config.site This guy is really a problem. It's contents should be read before handling the options, so that the latter properly override the latter, but most people would want a means to have a config.site that depends on $prefix for instance. Some other would like config.site to be looked for in the current directory. Harlan: I'll go further. I'd like to see several layers of config.site available. I'm starting to use "modules" at more places to handle software installation, and it would be helpful to set general things like: prefix=/opt/pkg/@PACKAGE@/@VERSION@ once at a global level, and then, for example, have things like: --with-etcdir=$prefix/etc stuffed "above" the various versions of SSH so I wouldn't have to hunt for these things every time it was time to recompile a new version of a previously installed package. Something like: src/config.site Global stuff ... src/ssh/config.site package-specific stuff src/ssh/ssh-1.2.27/ the actual source code I'd like to see automake/autoconf better support packaging tools (like modules, the *BSD ports/ stuff, and others would like hooks for RPMs). ** Languages Integrate other Fortrans etc. ** AC_CHECK_FUNCS and AC_TRY_LINK_FUNC I have still not understood what's the difference between the two which requires to have two different sources: AC_LANG_CALL and AC_LANG_FUNC_LINK_TRY (which names seem to be inappropriate). Wouldn't one be enough? ** Document AC_COMPILE_IFELSE, AC_LANG_PROGRAM etc. And make AC_TRY_COMPILE etc. obsolete. ** Libtool Define once for all the hooks they need, any redefinition of AC_PROG_CC etc. is way too dangerous and too limiting. The GCC team certainly has requirements too. ** AC_SEARCH_LIBS From: Tom Tromey Subject: AC_SEARCH_LIBS I think AC_SEARCH_LIBS has an unfortunate interface. ACTION-IF-FOUND is run in addition to the default action. Most autoconf macros don't work this way. This is confusing. In my case I can't use this macro because it always appends to LIBS. I don't want that. Instead I want to use ACTION-IF-FOUND to set my own macro. Also there is no documentation on the format of library names expected by the macro. Even a reference to some other function (e.g., "the library name can have the same forms as with AC_HAVE_LIBRARY" (if that is true, which I haven't looked up) would be fine. ** Revamp the language support We should probably have a language for C89, and C99. We must give the means to the users to specify some needs over the compilers, and actually look for a good compiler, instead of stopping at the first compiler we find. In fact, the AC_CHECK_PROG macro and variations have proved their limitation: we really need something more powerful and simpler too. We must take into account the specific problems of the GCC team. We must extend AC_CHECK_FUNCS in order to use the headers instead of fake declarations as we currently do. Default headers could be triggered on when C99, but not with the other languages? At the end, we should have a simple macro, such as AC_LANG_COMPILER for instance, which is built over simpler macros. Each language support should come with these simpler macros, but each language should follow the same process. We also need to check the srcext which are supported by the compiler. In fact, this macro is also probably the right place to check for objext and exeext. ** AC_PROG_CC_STDC Should be: AC_PROG_CC_ISO? Or even more specific for the ISO version? Should include more tests (e.g., AC_C_CONST etc.)? See Peter for very useful comments on the technology. Should we make this a new language? AC_LANG(ISO C). It would be great to introduce AC_LANG_COMPILER in this release too. ** autoupdate We should probably install the files which do not depend upon the user, just the Autoconf library files. But conversely autoupdate must be opened to user macros, i.e., for instance libtool itself must be able to say that AM_PROG_LIBTOOL is now AC_PROG_LIBTOOL, and have autoupdate do its job on old configure.ac. * Even later ** Pentateuch Heck, there is nothing after `Deuteronomy'! We're stuck, but we _must_ update the `history' section. Can't go to `New testament', we might hurt feelings? In addition, it means that the Messiah has come, which might be slightly presumptuous :). Still, someone fluent in English should write it. ** AC_PATH_X Hi Robert, > Hi, autoconf people. While packaging plotutils-2.2 (just released), > I noticed what looks like a small error in the autoconf-2.13 texinfo > documentation, the entry for AC_PATH_XTRA, in particular. > The documentation says that AC_PATH_XTRA > ... 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'. > It doesn't seem to add -DX_DISPLAY_MISSING to X_CFLAGS. X_DISPLAY_MISSING > ends up defined in config.h, instead. That's only because you're no doubt using AC_CONFIG_HEADER(..) to send your defines to a config.h-style file. If you were to not use AC_CONFIG_HEADER and X was not available, then you would see -DX_DISPLAY_MISSING being added to @DEFS@ as your output files were being generated. But you are right--the documentation is not clear about this. I'll change it. > In fact it looks to me as if right now, X_CFLAGS is used only for > specifying directories where X include files are stored, via the `-I' option. > Maybe it should really be called X_CPPFLAGS? Well, perhaps. If you feel strongly about this, feel free to submit a change-request. There is a hyperlink to the bug tracking database from http://sourceware.cygnus.com/autoconf/. With the way it reads in the manual right now, it's designed to allow the user to set additional flags in the environment prior to running configure--and these don't need to be limited to just -I flags. Nevertheless, I can see a few clean ways to improve this. ** AC_SYS_INTERPRETER Defines $interpval. This is not a standard name. Do we want to keep this? Clarify our policy on those names. ** Allow --recursive to config.status So that --recheck does not pass --no-recursive to configure. * autoconf.texi Move the specific macro documentation blocks into the source files, and use a doc-block extraction/merge technique to get documentation into texi-file. This should help avoid bit-rot in the doc, and make the doc easier to update when people add/change macros. The name "autodoc" is probably already taken so we probably need another one. ------------------------------------------------------------------------------ * m4 ** I18n The error messages for indir and dumpdef are uselessly different. Fix this for translators. ** Tracing `builtin' F**k! --trace FOO does not catch indir([FOO], $@)! ** Tracing builtins GNU M4 1.4's tracing of builtins is buggy. When run on this input: | divert(-1) | changequote([, ]) | define([m4_eval], defn([eval])) | eval(1) | m4_eval(2) | undefine([eval]) | m4_eval(3) it behaves this way: | % m4 input.m4 -da -t eval | m4trace: -1- eval(1) | m4trace: -1- m4_eval(2) | m4trace: -1- m4_eval(3) | % Conversely: | % m4 input.m4 -da -t m4_eval | % ------------------------------------------------------------------------------ * Autoconf 3 ** Cache name spaces. Cf the discussion with Kaveh. One would like to AC_CHECK_FUNCS(bar) # Do something that changes the environment AC_CACHE_PUSH(foo) AC_CHECK_FUNCS(bar) AC_CACHE_POP in order not to erase the results of a check with another. ** Cache var names should depend upon the current language. ** Use m4 lists? I think one sad decision in Autoconf was to use white space separated lists for some arguments. For instance AC_CHECK_FUNCS(foo bar). I tend to think that, even if it is not as nice, we should use m4 lists, i.e., AC_CHECK_FUNCS((foo, bar)) in this case. This would ease specializing loops, and more importantly, make them much more robust. A typical example of things that can be performed if we use m4 lists instead of white space separated lists is the case of things that have a space in their names, eg, structures. With the current scheme it would be extremely difficult to loop over AC_CHECK_STRUCTS(struct foo struct bar), while it natural and well defined for m4 lists: AC_CHECK_STRUCTS((struct foo, struct bar)). I know that makes a huge difference in syntax, but a major release should be ready to settle a new world. We *can* provide helping tools for the transition. Considering the benefits, I really think it is worth thinking. --akim ** Forbid shell variables as main arguments The fact that we have to support shell variables as main argument forbids many interesting constructions (specialization are not always possible, equally for AC_REQUIRE'ing macros *with their arguments*). Any loop should be handled by m4 itself, and nothing should be hidden to it. As a consequence, shell variables on the main arguments become useless (the main reason we support shell variables is to allow the loop versions of single argument macros, eg, to go from AC_CHECK_FUNC to AC_CHECK_FUNCS). --akim ** Use the @SUBST@ technology also for headers instead of #undef. This requires that acconfig.h becomes completely obsolete: autoheader should generate all the templates. ** Specializing loops. For instance, make AC_CHECK_FUNC[S] automatically use any particular macros for the listed functions. This requires to obsolete the feature `break' in ACTION-IF, since all the loops are to be handled by m4, not sh. ** Faces of a test Each macro can potentially come with several faces: of course the configure snippet (AC_foo), a config.h snippet (AH_foo), a system.h snippet (AS_foo), documentation (AD_foo) and, why not, the some C code for instance to replace a function. The motivation for the `faces' is to encapsulate. It is abnormal that once one has a configure macro, then she has to read somewhere to find the piece of system.h to use etc. The macros should come in a self-contained way, or, said it another way, PnP. A major issue is that of specialization. AC_CHECK_HEADER (or another name) for instance, will have as an effect, via system.h to include the header. But if the test for the header is specific, the generic AS_CHECK_HEADER will still be used. Conversely, some headers may not require a specific AC_ tests, but a specialized AS_ macro. ------------------------------------------------------------------------------ * Make AC_CHECK_LIB check whether the function is already available before checking for the library. This might involve adding another kind of cache variable to indicate whether a given function needs a given library. The current ac_cv_func_ variables are intended to indicate whether the function is in the default libraries, but actually also take into account whatever value LIBS had when they were checked for. Isn't this the issue of AC_SEARCH_LIB? --akim How come the list of libraries to browse not an additional parameter of AC_CHECK_FUNC, exactly like for the headers? --akim ------------------------------------------------------------------------------ * Add AC_PROG_CC_POSIX to replace the current ad-hoc macros for AIX, Minix, ISC, etc. ------------------------------------------------------------------------------ * Support creating both config.h and DEFS in the same configure. ------------------------------------------------------------------------------ * Select the right CONFIG_SHELL automatically (for Ultrix, Lynx especially.) ------------------------------------------------------------------------------ * Doc: Centralize information on POSIX, MS-DOS, cross-compiling, and other important topics. ------------------------------------------------------------------------------ * Mike Haertel's suggestions: ** Provide header files containing decls for alloca, strings, etc. ** Cross compiling: *** Error messages include instructions for overriding defaults using config.site. *** Distribute a config.site corresponding to a hypothetical bare POSIX system with c89. ** Site defaults: *** Convention for consistency checking of env vars and options in config.site so config.site can print obnoxious messages if it doesn't like options or env vars that users use. ------------------------------------------------------------------------------ * Look at user contributed macros: IEEE double precision math more ------------------------------------------------------------------------------ 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. ------------------------------------------------------------------------------ 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 name space pollution: when conftest.c includes to pick up any __stub macro definitions, it's getting a prototype declaration for select(), which collides with the dummy declaration in conftest.c. (The chain of includes is conftest.c -> -> -> -> -> .) #define $ac_func __dummy_$ac_func #include #undef $ac_func From: kwzh@gnu.ai.mit.edu (Karl Heuer) The test for the isascii function was failing because that function is also a macro. He proposed that the test file look like this: /* Remove any macro definition. */ #undef isascii /* Override any gcc2 internal prototype to avoid an error. */ char isascii(); isascii(); Andreas Schwab ------------------------------------------------------------------------------ It would be nice if I could (in the Makefile.in files) set the path to config.h. You have config.h ../config.h ../../config.h's all over the place, in the findutils-4.1 directory. From: "Randall S. Winchester" ------------------------------------------------------------------------------ In a future version (after 2.2), make AC_PROG_{CC,RANLIB,anything else} use AC_CHECK_TOOL. From Roland McGrath. ------------------------------------------------------------------------------ ls -lt configure configure.in | sort doesn't work right if configure.in is from a symlink farm, where the symlink has either a timestamp of its own, or under BSD 4.4, it has the timestamp of the current directory, neither of which helps. Changing it to ls -Llt configure configure.in | sort works for me, though I don't know how portable that is _Mark_ ------------------------------------------------------------------------------ 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 appropriate checks, the existence of the paths, and libs and such LIBS=$LIBS $PKG-LIBS DEFS=$DEFS $PKG-DEFS CPPFLAGS=$PKG-CPPFLAGS $CPPFLAGS $PKG-ROOT=$PKG-ROOT The cppflags should reverse the order so that you can have; -I/usr/local/bind/include -I/usr/local/athena/include and -L/usr/local/athena/lib -lkrb -ldes /usr/local/bind/lib/libresolv.a as order matters. also an AC_PKG_CHK_HEADER and an AC_PKG_CHK_FUNCTION so one can give alternate paths to check for stuff ($PKG-ROOT/lib for example) From: Randall Winchester ------------------------------------------------------------------------------ AC_C_CROSS assumes that configure was called like 'CC=target-gcc; ./configure'. I want to write a package that has target dependent libraries and host dependent tools. So I don't like to lose the distinction between CC and [G]CC_FOR_TARGET. AC_C_CROSS should check for equality of target and host. It would be great if GCC_FOR_TARGET AR_FOR_TARGET RANLIB_FOR_TARGET would be set automatically if host != target. AC_LANG_CROSS_C would be nice too, to check header files etc. with GCC_FOR_TARGET instead of CC Here is one simple test if test "x$host" != "x$target"; then AC_PROGRAMS_CHECK(AR_FOR_TARGET, $target-ar, $target-ar, ar) AC_PROGRAMS_CHECK(RANLIB_FOR_TARGET, $target-ranlib, $target-ranlib, ranlib) AC_PROGRAMS_CHECK(GCC_FOR_TARGET, $target-gcc, $target-gcc, gcc) fi This could be improved to also look for gcc in PATH, but require the prefix to contain the target e.g.: target=m68k-coff -->GCC_FOR_TARGET = /usr/gnu/m68k-coff/bin/gcc From: nennker@cs.tu-berlin.DE (Axel Nennker) ------------------------------------------------------------------------------ The problem occurs with the following libc functions in SunOS 5.4: fnmatch glob globfree regcomp regexec regerror regfree wordexp wordfree It also occurs with a bunch more libposix4 functions that most people probably aren't worried about yet, e.g. shm_open. All these functions fail with errno set to ENOSYS (89) ``Operation not applicable''. Perhaps Autoconf should have a specific macro for fnmatch, another for glob+globfree, another for regcomp+regexec+regerror+regfree, and another for wordexp+wordfree. This wouldn't solve the problem in general, but it should work for Solaris 2.4. Or Autoconf could limit itself to fnmatch and regcomp, the only two functions that I know have been a problem so far. From Paul Eggert. ------------------------------------------------------------------------------ Make easy macros for checking for X functions and libraries, such as Motif. ------------------------------------------------------------------------------ There are basically three ways to lock files lockf, fnctl, flock I'd be interested in adding a macro to pick the "right one" if you're interested. From: Rich Salz ------------------------------------------------------------------------------ Timezone calculations checks. ------------------------------------------------------------------------------ Support different default filesystem layouts, e.g. SVR4, Linux. Of course, this can be done locally with config.site. ------------------------------------------------------------------------------ I wonder if it is possible to get the path for X11's app-defaults directory by autoconf. Moreover, I'd like to have a general way of accessing imake variables by autoconf, something like AC_DEFINE(WINE_APP_DEFAULTS, AC_IMAKE_VAR(XAPPLOADDIR)) Slaven Rezic ------------------------------------------------------------------------------ Cache consistency checking: ignore cache if environment (CC or PATH) differs. From Mike Haertel So we need a general mechanism for storing variables' values in the cache, and checking if they are the same after reading the cache. Then we can add to the list of variables as we come across the need. So far we want LD_LIBRARY_PATH and the internal variables for some of (all?) the args. From: roland@gnu.ai.mit.edu (Roland McGrath) Hmm. That list might include LD_LIBRARY_PATH, LD_RUN_PATH (for solaris), and PATH. I can't think of any others so far. From: friedman@splode.com (Noah Friedman) ------------------------------------------------------------------------------ Every user running X11 usually has a directory like *X11* in his PATH variable. By replacing bin by include, you can find good places to look for the include files or libraries. From: rcb5@win.tue.nl (Richard Verhoeven) ------------------------------------------------------------------------------ In most cases, when autoscan suggests something, using the search or index command into the Info reader for autoconf manual quickly explains me what the test is about. However, for header files and functions, the search might fail, because the test is not of the specific kind. The Autoconf manual should reflect somewhere all header files or functions (non-specific features, generally) triggering autoscan to generate tests, and tell in a few words what is the problem, and the suggested approach for a solution; that is, how one should use the result of testing the feature. From: pinard@iro.umontreal.ca ------------------------------------------------------------------------------ It would be nice if the configure script would handle an option such as --x-libraries="/usr/openwin/lib /usr/dt/lib". Rick Boykin Under Solaris 2.4, the regular X includes and libs and the Motif includes and libs are in different places. The Emacs configure script actually allows dir1:dir2:dir3 -- if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"` LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"` fi if test "${x_includes}" != NONE && test -n "${x_includes}"; then C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"` fi ------------------------------------------------------------------------------ What messages should be produced by default, if any? Probably only the few most important ones, like which configuration name was used, whether X or Xt are in use, etc. The specific decisions, and progress messages, should be recorded on the terminal only if --verbose is used. --silent just suppresses the "checking for...result" messages, not the "creating FOO" messages. I think the default should be to suppress both. From: Richard Stallman There is no distinction now between important decisions (we have X) vs minor decisions (we have lstat). However, there are probably only a few things you deem important enough to announce and only those few things will need to be changed. Perhaps config.status could be written with comments saying what was decided. From: Roland McGrath ------------------------------------------------------------------------------ Another thing I wish for is a macro which figures out which libraries are needed for BSD-style sockets. AC_PATH_X already detects this correctly...so it's just a matter of separating out the socket-related code. From: "Joel N. Weber II" ------------------------------------------------------------------------------ in order to use the AC_CANONICAL_SYSTEM macro, I have to have install-sh somewhere nearby --- why is this? I have no real reason to distribute install-sh, other than that its absence breaks this code. Shouldn't the above loop be looking for config.sub and config.guess? From: jimb@totoro.bio.indiana.edu (Jim Blandy) adding AC_CANONICAL_HOST to my configure.in script caused all sorts of odd/unexplained errors. Obviously, I had to go get copies of config.guess, config.sub and install-sh from the autoconf distribution, but the error messages and autoconf docs didn't explain that very well. From: bostic@bsdi.com (Keith Bostic) ------------------------------------------------------------------------------ Perhaps also have AC_TRY_COMPILER try to link an invalid program, and die if the compiler seemed to succeed--in which case it's not usable with autoconf scripts. ------------------------------------------------------------------------------ Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/man/0000755000175000017500000000000007752722363014630 5ustar taffittaffitautoconf2.59-2.59+dfsg/man/autoheader.x0000644000175000017500000000007507551540544017140 0ustar taffittaffit[name] autoheader \- Create a template header for configure autoconf2.59-2.59+dfsg/man/autom4te.x0000644000175000017500000000007307551540544016557 0ustar taffittaffit[name] autom4te \- Generate files and scripts thanks to M4 autoconf2.59-2.59+dfsg/man/Makefile.am0000644000175000017500000000440007357357031016657 0ustar taffittaffit## Process this file with automake to create Makefile.in -*-Makefile-*- ## Makefile for Autoconf. ## Copyright 2001 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. dist_man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 \ autoscan.1 autom4te.1 config.guess.1 config.sub.1 man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x \ autoscan.x autom4te.x config.guess.x config.sub.x EXTRA_DIST = $(man_aux) common.x MAINTAINERCLEANFILES = $(dist_man_MANS) # Depend on configure.ac to get version number changes. common_dep = $(top_srcdir)/configure.ac $(srcdir)/common.x binsrcdir = $(top_srcdir)/bin autoconf.1: $(common_dep) $(srcdir)/autoconf.x $(binsrcdir)/autoconf.in autoheader.1: $(common_dep) $(srcdir)/autoheader.x $(binsrcdir)/autoheader.in autom4te.1: $(common_dep) $(srcdir)/autom4te.x $(binsrcdir)/autom4te.in autoreconf.1: $(common_dep) $(srcdir)/autoreconf.x $(binsrcdir)/autoreconf.in autoscan.1: $(common_dep) $(srcdir)/autoscan.x $(binsrcdir)/autoscan.in autoupdate.1: $(common_dep) $(srcdir)/autoupdate.x $(binsrcdir)/autoupdate.in ifnames.1: $(common_dep) $(srcdir)/ifnames.x $(binsrcdir)/ifnames.in # Independent from this package. config.guess.1: $(srcdir)/config.guess.x $(top_srcdir)/config/config.guess config.sub.1: $(srcdir)/config.sub.x $(top_srcdir)/config/config.sub SUFFIXES = .x .1 .x.1: echo "Updating man page $@" PATH="$(top_builddir)/tests@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \ export PATH; \ $(HELP2MAN) \ --include=$(srcdir)/$*.x \ --include=$(srcdir)/common.x \ --output=$@ $* autoconf2.59-2.59+dfsg/man/ifnames.x0000644000175000017500000000010007551540544016426 0ustar taffittaffit[name] ifnames \- Extract CPP conditionals from a set of files autoconf2.59-2.59+dfsg/man/autoupdate.10000644000175000017500000000335707752412561017071 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH AUTOUPDATE "1" "November 2003" "autoupdate 2.59" "User Commands" .SH NAME autoupdate \- Update a configure.in to a newer Autoconf .SH SYNOPSIS .B autoupdate [\fIOPTION\fR] ... [\fITEMPLATE-FILE\fR...] .SH DESCRIPTION Update the TEMPLATE-FILE... if given, or `configure.ac' if present, or else `configure.in', to the syntax of the current version of Autoconf. The original files are backed up. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP \fB\-f\fR, \fB\-\-force\fR consider all files obsolete .SS "Library directories:" .TP \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR prepend directory DIR to search path .TP \fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR append directory DIR to search path .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B autoupdate is maintained as a Texinfo manual. If the .B info and .B autoupdate programs are properly installed at your site, the command .IP .B info autoupdate .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/man/autoconf.x0000644000175000017500000000006307551540544016632 0ustar taffittaffit[name] autoconf \- Generate configuration scripts autoconf2.59-2.59+dfsg/man/Makefile.in0000644000175000017500000002427707752412550016703 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in Makefile.am mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = man1dir = $(mandir)/man1 am__installdirs = $(DESTDIR)$(man1dir) NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ dist_man_MANS = autoconf.1 autoreconf.1 autoheader.1 autoupdate.1 ifnames.1 \ autoscan.1 autom4te.1 config.guess.1 config.sub.1 man_aux = autoconf.x autoreconf.x autoheader.x autoupdate.x ifnames.x \ autoscan.x autom4te.x config.guess.x config.sub.x EXTRA_DIST = $(man_aux) common.x MAINTAINERCLEANFILES = $(dist_man_MANS) # Depend on configure.ac to get version number changes. common_dep = $(top_srcdir)/configure.ac $(srcdir)/common.x binsrcdir = $(top_srcdir)/bin SUFFIXES = .x .1 all: all-am .SUFFIXES: .SUFFIXES: .x .1 $(srcdir)/Makefile.in: Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: $(mkinstalldirs) $(DESTDIR)$(man1dir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-man install-exec-am: install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ uninstall-am uninstall-info-am uninstall-man uninstall-man1 autoconf.1: $(common_dep) $(srcdir)/autoconf.x $(binsrcdir)/autoconf.in autoheader.1: $(common_dep) $(srcdir)/autoheader.x $(binsrcdir)/autoheader.in autom4te.1: $(common_dep) $(srcdir)/autom4te.x $(binsrcdir)/autom4te.in autoreconf.1: $(common_dep) $(srcdir)/autoreconf.x $(binsrcdir)/autoreconf.in autoscan.1: $(common_dep) $(srcdir)/autoscan.x $(binsrcdir)/autoscan.in autoupdate.1: $(common_dep) $(srcdir)/autoupdate.x $(binsrcdir)/autoupdate.in ifnames.1: $(common_dep) $(srcdir)/ifnames.x $(binsrcdir)/ifnames.in # Independent from this package. config.guess.1: $(srcdir)/config.guess.x $(top_srcdir)/config/config.guess config.sub.1: $(srcdir)/config.sub.x $(top_srcdir)/config/config.sub .x.1: echo "Updating man page $@" PATH="$(top_builddir)/tests@PATH_SEPARATOR@$(top_srcdir)/config@PATH_SEPARATOR@$$PATH"; \ export PATH; \ $(HELP2MAN) \ --include=$(srcdir)/$*.x \ --include=$(srcdir)/common.x \ --output=$@ $* # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/man/autoreconf.x0000644000175000017500000000007207551540544017161 0ustar taffittaffit[name] autoreconf \- Update generated configuration files autoconf2.59-2.59+dfsg/man/autoreconf.10000644000175000017500000000617607752412560017064 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH AUTORECONF "1" "November 2003" "autoreconf 2.59" "User Commands" .SH NAME autoreconf \- Update generated configuration files .SH SYNOPSIS .B autoreconf [\fIOPTION\fR] ... [\fICONFIGURE-AC or DIRECTORY\fR] ... .SH DESCRIPTION Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' (formerly `gettextize'), and `libtoolize' where appropriate) repeatedly to remake the GNU Build System files in the DIRECTORIES or the directory trees driven by CONFIGURE-AC (defaulting to `.'). .PP By default, it only remakes those files that are older than their predecessors. If you install new versions of the GNU Build System, running `autoreconf' remakes all of the files by giving it the `--force' option. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP \fB\-f\fR, \fB\-\-force\fR consider all files obsolete .TP \fB\-i\fR, \fB\-\-install\fR copy missing auxiliary files .TP \fB\-s\fR, \fB\-\-symlink\fR with \fB\-i\fR, install symbolic links instead of copies .TP \fB\-m\fR, \fB\-\-make\fR when applicable, re-run ./configure && make .TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY [syntax] .SS "Warning categories include:" .TP `cross' cross compilation issues .TP `gnu' GNU coding standards (default in gnu and gnits modes) .TP `obsolete' obsolete features or constructions .TP `override' user redefinitions of Automake rules or variables .TP `portability' portability issues .TP `syntax' dubious syntactic constructs (default) .TP `unsupported' unsupported or incomplete features (default) .TP `all' all the warnings .TP `no-CATEGORY' turn off warnings in CATEGORY .TP `none' turn off all the warnings .TP `error' treat warnings as errors .PP The environment variable `WARNINGS' is honored. Some subtools might support other warning types, using `all' is encouraged. .SS "Library directories:" .TP \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR prepend directory DIR to search path .TP \fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR append directory DIR to search path .PP The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL, AUTOPOINT, LIBTOOLIZE are honored. .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B autoreconf is maintained as a Texinfo manual. If the .B info and .B autoreconf programs are properly installed at your site, the command .IP .B info autoreconf .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/man/config.guess.10000644000175000017500000000371607745762663017324 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH CONFIG.GUESS "1" "October 2003" "config.guess (2003-10-03)" "User Commands" .SH NAME config.guess \- guess the build system triplet .SH SYNOPSIS .B config.guess [\fIOPTION\fR] .SH DESCRIPTION The GNU build system distinguishes three types of machines, the `build' machine on which the compilers are run, the `host' machine on which the package being built will run, and, exclusively when you build a compiler, assembler etc., the `target' machine, for which the compiler being built will produce code. This script will guess the type of the `build' machine. .PP Output the configuration name of the system `config.guess' is run on. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-t\fR, \fB\-\-time\-stamp\fR print date of last modification, then exit .TP \fB\-v\fR, \fB\-\-version\fR print version number, then exit .SH "ENVIRONMENT VARIABLES" config.guess might need to compile and run C code, hence it needs a compiler for the `build' machine: use the environment variable `CC_FOR_BUILD' to specify the compiler for the build machine. If `CC_FOR_BUILD' is not specified, `CC' will be used. Be sure to specify `CC_FOR_BUILD' is `CC' is a cross-compiler to the `host' machine. CC_FOR_BUILD a native C compiler, defaults to `cc' CC a native C compiler, the previous variable is preferred .SH "REPORTING BUGS" Report bugs and patches to . .PP Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. .PP This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). autoconf2.59-2.59+dfsg/man/autoheader.10000644000175000017500000000447507752412561017041 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH AUTOHEADER "1" "November 2003" "autoheader 2.59" "User Commands" .SH NAME autoheader \- Create a template header for configure .SH SYNOPSIS .B autoheader [\fIOPTION\fR] ... [\fITEMPLATE-FILE\fR] .SH DESCRIPTION Create a template file of C `#define' statements for `configure' to use. To this end, scan TEMPLATE-FILE, or `configure.ac' if present, or else `configure.in'. .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP \fB\-f\fR, \fB\-\-force\fR consider all files obsolete .TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY .SS "Warning categories include:" .TP `cross' cross compilation issues .TP `gnu' GNU coding standards (default in gnu and gnits modes) .TP `obsolete' obsolete features or constructions .TP `override' user redefinitions of Automake rules or variables .TP `portability' portability issues .TP `syntax' dubious syntactic constructs (default) .TP `unsupported' unsupported or incomplete features (default) .TP `all' all the warnings .TP `no-CATEGORY' turn off warnings in CATEGORY .TP `none' turn off all the warnings .TP `error' treat warnings as errors .SS "Library directories:" .TP \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR prepend directory DIR to search path .TP \fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR append directory DIR to search path .SH AUTHOR Written by Roland McGrath and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B autoheader is maintained as a Texinfo manual. If the .B info and .B autoheader programs are properly installed at your site, the command .IP .B info autoheader .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/man/autom4te.10000644000175000017500000000717107752412563016460 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH AUTOM4TE "1" "November 2003" "autom4te 2.59" "User Commands" .SH NAME autom4te \- Generate files and scripts thanks to M4 .SH SYNOPSIS .B autom4te [\fIOPTION\fR] ... [\fIFILES\fR] .SH DESCRIPTION Run GNU M4 on the FILES, avoiding useless runs. Output the traces if tracing, the frozen file if freezing, otherwise the expansion of the FILES. .PP If some of the FILES are named `FILE.m4f' they are considered to be M4 frozen files of all the previous files (which are therefore not loaded). If `FILE.m4f' is not found, then `FILE.m4' will be used, together with all the previous files. .PP Some files may be optional, i.e., will only be processed if found in the include path, but then must end in `.m4?'; the question mark is not part of the actual file name. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR save output in FILE (defaults to `-', stdout) .TP \fB\-f\fR, \fB\-\-force\fR don't rely on cached values .TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY .TP \fB\-l\fR, \fB\-\-language\fR=\fILANG\fR specify the set of M4 macros to use .TP \fB\-C\fR, \fB\-\-cache\fR=\fIDIRECTORY\fR preserve results for future runs in DIRECTORY .TP \fB\-\-no\-cache\fR disable the cache .TP \fB\-m\fR, \fB\-\-mode\fR=\fIOCTAL\fR change the non trace output file mode (0666) .TP \fB\-M\fR, \fB\-\-melt\fR don't use M4 frozen files .SS "Languages include:" .TP `Autoconf' create Autoconf configure scripts .TP `Autotest' create Autotest test suites .TP `M4sh' create M4sh shell scripts .TP `M4sugar' create M4sugar output .SS "Warning categories include:" .TP `cross' cross compilation issues .TP `gnu' GNU coding standards (default in gnu and gnits modes) .TP `obsolete' obsolete features or constructions .TP `override' user redefinitions of Automake rules or variables .TP `portability' portability issues .TP `syntax' dubious syntactic constructs (default) .TP `unsupported' unsupported or incomplete features (default) .TP `all' all the warnings .TP `no-CATEGORY' turn off warnings in CATEGORY .TP `none' turn off all the warnings .TP `error' treat warnings as errors .PP The environment variable `WARNINGS' is honored. .SS "Library directories:" .TP \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR prepend directory DIR to search path .TP \fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR append directory DIR to search path .SS "Tracing:" .TP \fB\-t\fR, \fB\-\-trace\fR=\fIMACRO\fR report the MACRO invocations .TP \fB\-p\fR, \fB\-\-preselect\fR=\fIMACRO\fR prepare to trace MACRO in a future run .SS "Freezing:" .TP \fB\-F\fR, \fB\-\-freeze\fR produce an M4 frozen state file for FILES .SH AUTHOR Written by Akim Demaille. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B autom4te is maintained as a Texinfo manual. If the .B info and .B autom4te programs are properly installed at your site, the command .IP .B info autom4te .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/man/autoupdate.x0000644000175000017500000000010007551540544017157 0ustar taffittaffit[name] autoupdate \- Update a configure.in to a newer Autoconf autoconf2.59-2.59+dfsg/man/config.sub.10000644000175000017500000000217707745762663016767 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH CONFIG.SUB "1" "October 2003" "config.sub (2003-08-18)" "User Commands" .SH NAME config.sub \- validate and canonicalize a configuration triplet .SH SYNOPSIS .B config.sub [\fIOPTION\fR] \fICPU-MFR-OPSYS\fR .SH DESCRIPTION .IP \&../config/config.sub [OPTION] ALIAS .PP Canonicalize a configuration name. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-t\fR, \fB\-\-time\-stamp\fR print date of last modification, then exit .TP \fB\-v\fR, \fB\-\-version\fR print version number, then exit .SH "REPORTING BUGS" Report bugs and patches to . .SH COPYRIGHT Copyright \(co 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. .PP This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). autoconf2.59-2.59+dfsg/man/autoconf.10000644000175000017500000000475507752412560016536 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH AUTOCONF "1" "November 2003" "autoconf 2.59" "User Commands" .SH NAME autoconf \- Generate configuration scripts .SH SYNOPSIS .B autoconf [\fIOPTION\fR] ... [\fITEMPLATE-FILE\fR] .SH DESCRIPTION Generate a configuration script from a TEMPLATE-FILE if given, or `configure.ac' if present, or else `configure.in'. Output is sent to the standard output if TEMPLATE-FILE is given, else into `configure'. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP \fB\-f\fR, \fB\-\-force\fR consider all files obsolete .TP \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR save output in FILE (stdout is the default) .TP \fB\-W\fR, \fB\-\-warnings\fR=\fICATEGORY\fR report the warnings falling in CATEGORY [syntax] .SS "Warning categories include:" .TP `cross' cross compilation issues .TP `obsolete' obsolete constructs .TP `syntax' dubious syntactic constructs .TP `all' all the warnings .TP `no-CATEGORY' turn off the warnings on CATEGORY .TP `none' turn off all the warnings .TP `error' warnings are error .PP The environment variable `WARNINGS' is honored. .SS "Library directories:" .TP \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR prepend directory DIR to search path .TP \fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR append directory DIR to search path .SS "Tracing:" .TP \fB\-t\fR, \fB\-\-trace\fR=\fIMACRO\fR report the list of calls to MACRO .TP \fB\-i\fR, \fB\-\-initialization\fR also trace Autoconf's initialization process .PP In tracing mode, no configuration script is created. .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B autoconf is maintained as a Texinfo manual. If the .B info and .B autoconf programs are properly installed at your site, the command .IP .B info autoconf .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/man/common.x0000644000175000017500000000031107551540544016300 0ustar taffittaffit[see also] .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). autoconf2.59-2.59+dfsg/man/autoscan.x0000644000175000017500000000007007551540544016627 0ustar taffittaffit[name] autoscan \- Generate a preliminary configure.in autoconf2.59-2.59+dfsg/man/config.sub.x0000644000175000017500000000012207551540544017045 0ustar taffittaffit--no-info [name] config.sub \- validate and canonicalize a configuration triplet autoconf2.59-2.59+dfsg/man/config.guess.x0000644000175000017500000000165207551540544017413 0ustar taffittaffit--no-info [name] config.guess \- guess the build system triplet [Environment variables] config.guess might need to compile and run C code, hence it needs a compiler for the `build' machine: use the environment variable `CC_FOR_BUILD' to specify the compiler for the build machine. If `CC_FOR_BUILD' is not specified, `CC' will be used. Be sure to specify `CC_FOR_BUILD' is `CC' is a cross-compiler to the `host' machine. CC_FOR_BUILD a native C compiler, defaults to `cc' CC a native C compiler, the previous variable is preferred [description] The GNU build system distinguishes three types of machines, the `build' machine on which the compilers are run, the `host' machine on which the package being built will run, and, exclusively when you build a compiler, assembler etc., the `target' machine, for which the compiler being built will produce code. This script will guess the type of the `build' machine. autoconf2.59-2.59+dfsg/man/autoscan.10000644000175000017500000000336607752412563016535 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH AUTOSCAN "1" "November 2003" "autoscan 2.59" "User Commands" .SH NAME autoscan \- Generate a preliminary configure.in .SH SYNOPSIS .B autoscan [\fIOPTION\fR] ... [\fISRCDIR\fR] .SH DESCRIPTION Examine source files in the directory tree rooted at SRCDIR, or the current directory if none is given. Search the source files for common portability problems, check for incompleteness of `configure.ac', and create a file `configure.scan' which is a preliminary `configure.ac' for that package. .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .TP \fB\-v\fR, \fB\-\-verbose\fR verbosely report processing .TP \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .SS "Library directories:" .TP \fB\-B\fR, \fB\-\-prepend\-include\fR=\fIDIR\fR prepend directory DIR to search path .TP \fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR append directory DIR to search path .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B autoscan is maintained as a Texinfo manual. If the .B info and .B autoscan programs are properly installed at your site, the command .IP .B info autoscan .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/man/ifnames.10000644000175000017500000000275007752412562016335 0ustar taffittaffit.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. .TH IFNAMES "1" "November 2003" "ifnames 2.59" "User Commands" .SH NAME ifnames \- Extract CPP conditionals from a set of files .SH SYNOPSIS .B ifnames [\fIOPTION\fR] ... [\fIFILE\fR] ... .SH DESCRIPTION Scan all of the C source FILES (or the standard input, if none are given) and write to the standard output a sorted list of all the identifiers that appear in those files in `#if', `#elif', `#ifdef', or `#ifndef' directives. Print each identifier on a line, followed by a space-separated list of the files in which that identifier occurs. .TP \fB\-h\fR, \fB\-\-help\fR print this help, then exit .TP \fB\-V\fR, \fB\-\-version\fR print version number, then exit .SH AUTHOR Written by David J. MacKenzie and Paul Eggert. .SH "REPORTING BUGS" Report bugs to . .SH COPYRIGHT Copyright \(co 2003 Free Software Foundation, Inc. .br This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. .SH "SEE ALSO" .BR autoconf (1), .BR automake (1), .BR autoreconf (1), .BR autoupdate (1), .BR autoheader (1), .BR autoscan (1), .BR config.guess (1), .BR config.sub (1), .BR ifnames (1), .BR libtool (1). .PP The full documentation for .B ifnames is maintained as a Texinfo manual. If the .B info and .B ifnames programs are properly installed at your site, the command .IP .B info ifnames .PP should give you access to the complete manual. autoconf2.59-2.59+dfsg/BUGS0000644000175000017500000000341107544566510014536 0ustar taffittaffit-*- outline -*- This file lists the bugs you must be aware of. Be sure to check this file before using Autoconf, and especially CVS versions of Autoconf. Copyright 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Autoconf must not be used in production if there are ``Serious'' bugs, and use with caution an Autoconf with ``Important bugs''. Many other bugs are registered on the GNATS server: http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=autoconf Please, don't register bugs listed below: we already know we have to address them. * Status /*--------------------------. | Sane for full scale use. | `--------------------------*/ * Interoperability bugs ** libtool 1.4.2, configure.ac, and AC_CONFIG_AUX_DIR configure.ac files that use AC_CONFIG_AUX_DIR do not work with libtool 1.4.2. To work around the problem, you can rename configure.ac to configure.in. Or you can apply Roger Leigh's patch to libtool; see . autoconf2.59-2.59+dfsg/aclocal.m40000644000175000017500000005063607752412544015724 0ustar taffittaffit# generated automatically by aclocal 1.7a -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # -*- Autoconf -*- # Copyright (C) 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7a"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7a])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 7 # AM_PATH_LISPDIR # --------------- AC_DEFUN([AM_PATH_LISPDIR], [AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) AC_ARG_VAR([EMACS], [the Emacs editor command]) AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) AC_ARG_WITH([lispdir], [ --with-lispdir Override the default lisp directory ], [ lispdir="$withval" AC_MSG_CHECKING([where .elc files should go]) AC_MSG_RESULT([$lispdir])], [ # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' conftest.out]) am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x\?emacs\/site-lisp$/{s,.*/lib/\(x\?emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' ]) lispdir="$am_cv_lispdir" ]) AC_SUBST([lispdir]) ])# AM_PATH_LISPDIR AU_DEFUN([ud_PATH_LISPDIR], [AM_PATH_LISPDIR]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4_include([config/m4.m4]) autoconf2.59-2.59+dfsg/configure0000755000175000017500000027616107752412550015773 0ustar taffittaffit#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.58a for GNU Autoconf 2.59. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='GNU Autoconf' PACKAGE_TARNAME='autoconf' PACKAGE_VERSION='2.59' PACKAGE_STRING='GNU Autoconf 2.59' PACKAGE_BUGREPORT='bug-autoconf@gnu.org' ac_unique_file="ChangeLog" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot EXPR M4 HELP2MAN PERL TEST_EMACS EMACS EMACSLOADPATH lispdir LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_EMACS_set=${EMACS+set} ac_env_EMACS_value=$EMACS ac_cv_env_EMACS_set=${EMACS+set} ac_cv_env_EMACS_value=$EMACS ac_env_EMACSLOADPATH_set=${EMACSLOADPATH+set} ac_env_EMACSLOADPATH_value=$EMACSLOADPATH ac_cv_env_EMACSLOADPATH_set=${EMACSLOADPATH+set} ac_cv_env_EMACSLOADPATH_value=$EMACSLOADPATH # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures GNU Autoconf 2.59 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of GNU Autoconf 2.59:";; esac cat <<\_ACEOF Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-lispdir Override the default lisp directory Some influential environment variables: EMACS the Emacs editor command EMACSLOADPATH the Emacs library search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF GNU Autoconf configure 2.59 generated by GNU Autoconf 2.58a Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU Autoconf $as_me 2.59, which was generated by GNU Autoconf 2.58a. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config $srcdir/config; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5 echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ac_config_files="$ac_config_files config/Makefile" am__api_version="1.7a" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='autoconf' VERSION='2.59' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Initialize the test suite and build position independent wrappers. ac_config_commands="$ac_config_commands tests/atconfig" ac_config_files="$ac_config_files tests/Makefile tests/atlocal" ac_config_files="$ac_config_files tests/autoconf:tests/wrapper.in" ac_config_files="$ac_config_files tests/autoheader:tests/wrapper.in" ac_config_files="$ac_config_files tests/autom4te:tests/wrapper.in" ac_config_files="$ac_config_files tests/autoreconf:tests/wrapper.in" ac_config_files="$ac_config_files tests/autoscan:tests/wrapper.in" ac_config_files="$ac_config_files tests/autoupdate:tests/wrapper.in" ac_config_files="$ac_config_files tests/ifnames:tests/wrapper.in" # Extract the first word of "expr", so it can be a program name with args. set dummy expr; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_EXPR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $EXPR in [\\/]* | ?:[\\/]*) ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi EXPR=$ac_cv_path_EXPR if test -n "$EXPR"; then echo "$as_me:$LINENO: result: $EXPR" >&5 echo "${ECHO_T}$EXPR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ## ---- ## ## M4. ## ## ---- ## # We use a path for GNU m4 so even if users have another m4 first in # their path, the installer can configure with a path that has GNU m4 # first and get that path embedded in the installed autoconf and # autoheader scripts. for ac_prog in gm4 gnum4 m4 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_M4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $M4 in [\\/]* | ?:[\\/]*) ac_cv_path_M4="$M4" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_M4="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi M4=$ac_cv_path_M4 if test -n "$M4"; then echo "$as_me:$LINENO: result: $M4" >&5 echo "${ECHO_T}$M4" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$M4" && break done test -n "$M4" || M4="m4" echo "$as_me:$LINENO: checking whether m4 supports frozen files" >&5 echo $ECHO_N "checking whether m4 supports frozen files... $ECHO_C" >&6 if test "${ac_cv_prog_gnu_m4+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_gnu_m4=no if test x"$M4" != x; then case `$M4 --help < /dev/null 2>&1` in *reload-state*) ac_cv_prog_gnu_m4=yes ;; esac fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_gnu_m4" >&5 echo "${ECHO_T}$ac_cv_prog_gnu_m4" >&6 if test x"$ac_cv_prog_gnu_m4" != xyes; then { { echo "$as_me:$LINENO: error: GNU M4 1.4 is required" >&5 echo "$as_me: error: GNU M4 1.4 is required" >&2;} { (exit 1); exit 1; }; } fi ## ----------- ## ## Man pages. ## ## ----------- ## ac_config_files="$ac_config_files man/Makefile" HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} ## ------ ## ## Perl. ## ## ------ ## # We use a path for perl so the #! line in autoscan will work. # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then echo "$as_me:$LINENO: result: $PERL" >&5 echo "${ECHO_T}$PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test "$PERL" = no; then { { echo "$as_me:$LINENO: error: perl is not found" >&5 echo "$as_me: error: perl is not found" >&2;} { (exit 1); exit 1; }; } fi $PERL -e 'require 5.005_03;' || { { { echo "$as_me:$LINENO: error: Perl 5.005_03 or better is required" >&5 echo "$as_me: error: Perl 5.005_03 or better is required" >&2;} { (exit 1); exit 1; }; } } ## ------- ## ## Emacs. ## ## ------- ## ac_config_files="$ac_config_files lib/emacs/Makefile" TEST_EMACS=$EMACS test x"$TEST_EMACS" = xt && TEST_EMACS= for ac_prog in emacs xemacs 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_TEST_EMACS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$TEST_EMACS"; then ac_cv_prog_TEST_EMACS="$TEST_EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_TEST_EMACS="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi TEST_EMACS=$ac_cv_prog_TEST_EMACS if test -n "$TEST_EMACS"; then echo "$as_me:$LINENO: result: $TEST_EMACS" >&5 echo "${ECHO_T}$TEST_EMACS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$TEST_EMACS" && break done test -n "$TEST_EMACS" || TEST_EMACS="no" # autoconf-mode.el and autotest-mode.el do not work with older version of # Emacs (i.e. 18.x.x). During byte-compilation, Emacs complains: # "Variable (broken nil) seen on pass 2 of byte compiler but not pass 1" # We detect this problem here. if test "$TEST_EMACS" != no; then echo "$as_me:$LINENO: checking whether $TEST_EMACS is sufficiently recent" >&5 echo $ECHO_N "checking whether $TEST_EMACS is sufficiently recent... $ECHO_C" >&6 if test "${ac_cv_prog_emacs_ok+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Note: The quoted "EOF" is intentional. It protects the ` in the text. cat >conftest.el << "EOF" (defvar broken) (defun broken-mode () (setq broken-defaults `(broken nil))) EOF if { (echo "$as_me:$LINENO: \$TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2") >&5 ($TEST_EMACS -batch -q -f batch-byte-compile conftest.el 1>&2) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_cv_prog_emacs_ok=yes else ac_cv_prog_emacs_ok=no fi rm -f conftest.el conftest.elc fi echo "$as_me:$LINENO: result: $ac_cv_prog_emacs_ok" >&5 echo "${ECHO_T}$ac_cv_prog_emacs_ok" >&6 if test $ac_cv_prog_emacs_ok = no; then TEST_EMACS=no fi fi EMACS=$TEST_EMACS for ac_prog in emacs xemacs 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 "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_EMACS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$EMACS"; then ac_cv_prog_EMACS="$EMACS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_EMACS="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi EMACS=$ac_cv_prog_EMACS if test -n "$EMACS"; then echo "$as_me:$LINENO: result: $EMACS" >&5 echo "${ECHO_T}$EMACS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$EMACS" && break done test -n "$EMACS" || EMACS="no" # Check whether --with-lispdir or --without-lispdir was given. if test "${with_lispdir+set}" = set; then withval="$with_lispdir" lispdir="$withval" echo "$as_me:$LINENO: checking where .elc files should go" >&5 echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $lispdir" >&5 echo "${ECHO_T}$lispdir" >&6 else # If set to t, that means we are running in a shell under Emacs. # If you have an Emacs named "t", then use the full path. test x"$EMACS" = xt && EMACS= echo "$as_me:$LINENO: checking where .elc files should go" >&5 echo $ECHO_N "checking where .elc files should go... $ECHO_C" >&6 if test "${am_cv_lispdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test $EMACS != "no"; then if test x${lispdir+set} != xset; then # If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly # Some emacsen will start up in interactive mode, requiring C-x C-c to exit, # which is non-obvious for non-emacs users. # Redirecting /dev/null should help a bit; pity we can't detect "broken" # emacsen earlier and avoid running this altogether. { (echo "$as_me:$LINENO: \$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) \"\\n\")) (setq load-path (cdr load-path)))' conftest.out") >&5 ($EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' conftest.out) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } am_cv_lispdir=`sed -n \ -e 's,/$,,' \ -e '/.*\/lib\/x\?emacs\/site-lisp$/{s,.*/lib/\(x\?emacs/site-lisp\)$,${libdir}/\1,;p;q;}' \ -e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \ conftest.out` rm conftest.out fi fi test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' fi echo "$as_me:$LINENO: result: $am_cv_lispdir" >&5 echo "${ECHO_T}$am_cv_lispdir" >&6 lispdir="$am_cv_lispdir" fi; ## ------------ ## ## Conclusion. ## ## ------------ ## ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile lib/m4sugar/Makefile lib/autoconf/Makefile lib/autotest/Makefile bin/Makefile" cat >confcache <<\_ACEOF # 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, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by GNU Autoconf $as_me 2.59, which was generated by GNU Autoconf 2.58a. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ GNU Autoconf config.status 2.59 configured by $0, generated by GNU Autoconf 2.58a, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "config/Makefile" ) CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/atlocal" ) CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;; "tests/autoconf" ) CONFIG_FILES="$CONFIG_FILES tests/autoconf:tests/wrapper.in" ;; "tests/autoheader" ) CONFIG_FILES="$CONFIG_FILES tests/autoheader:tests/wrapper.in" ;; "tests/autom4te" ) CONFIG_FILES="$CONFIG_FILES tests/autom4te:tests/wrapper.in" ;; "tests/autoreconf" ) CONFIG_FILES="$CONFIG_FILES tests/autoreconf:tests/wrapper.in" ;; "tests/autoscan" ) CONFIG_FILES="$CONFIG_FILES tests/autoscan:tests/wrapper.in" ;; "tests/autoupdate" ) CONFIG_FILES="$CONFIG_FILES tests/autoupdate:tests/wrapper.in" ;; "tests/ifnames" ) CONFIG_FILES="$CONFIG_FILES tests/ifnames:tests/wrapper.in" ;; "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "lib/emacs/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/emacs/Makefile" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/Autom4te/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Autom4te/Makefile" ;; "lib/autoscan/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/autoscan/Makefile" ;; "lib/m4sugar/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/m4sugar/Makefile" ;; "lib/autoconf/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/autoconf/Makefile" ;; "lib/autotest/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/autotest/Makefile" ;; "bin/Makefile" ) CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;; "tests/atconfig" ) CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@EXPR@,$EXPR,;t t s,@M4@,$M4,;t t s,@HELP2MAN@,$HELP2MAN,;t t s,@PERL@,$PERL,;t t s,@TEST_EMACS@,$TEST_EMACS,;t t s,@EMACS@,$EMACS,;t t s,@EMACSLOADPATH@,$EMACSLOADPATH,;t t s,@lispdir@,$lispdir,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi # Run the commands associated with the file. case $ac_file in tests/autoconf ) chmod +x tests/autoconf ;; tests/autoheader ) chmod +x tests/autoheader ;; tests/autom4te ) chmod +x tests/autom4te ;; tests/autoreconf ) chmod +x tests/autoreconf ;; tests/autoscan ) chmod +x tests/autoscan ;; tests/autoupdate ) chmod +x tests/autoupdate ;; tests/ifnames ) chmod +x tests/ifnames ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in tests/atconfig ) cat >tests/atconfig <>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # Report the state of this version of Autoconf if this is a beta. autoconf2.59-2.59+dfsg/README0000644000175000017500000000453707666572272014754 0ustar taffittaffit-*- text -*- Autoconf Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a configuration script for a package from a template file that lists the operating system features that the package can use, in the form of M4 macro calls. Producing configuration scripts using Autoconf requires GNU M4 and Perl. You must install GNU M4 (version 1.4 or later) and Perl (5.005_03 or later) before configuring Autoconf, so that Autoconf's configure script can find them. The configuration scripts produced by Autoconf are self-contained, so their users do not need to have Autoconf (or GNU M4, Perl etc.). The file INSTALL should be distributed with packages that use Autoconf-generated configure scripts and Makefiles that conform to the GNU coding standards. The package's README can just give an overview of the package, where to report bugs, and a pointer to INSTALL for instructions on compilation and installation. This removes the need to maintain many similar sets of installation instructions. Be sure to read BUGS (especially if this version is not an official release) and INSTALL. Mail suggestions to autoconf@gnu.org, report bugs on http://bugs.gnu.org/cgi-bin/gnatsweb.pl?database=autoconf or to bug-autoconf@gnu.org, and submit patches to autoconf-patches@gnu.org. Always include the Autoconf version number, which you can get by running `autoconf --version'. ----- Copyright (C) 1992, 1993, 1994, 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/ChangeLog0000644000175000017500000066604407752412265015644 0ustar taffittaffit2003-11-06 Akim Demaille Version 2.59. 2003-11-05 Alexandre Duret-Lutz * lib/autoconf/status.m4 (_AC_SRCPATHS): Fix use of AS_SET_CATFILE so that ac_abs_builddir, ac_abs_top_builddir, ac_abs_srcdir, and ac_abs_top_srcdir are absolute paths. * lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): Remove misleading comment. 2003-11-05 Akim Demaille * configure.ac: Bump to 2.58a. 2003-11-05 Kevin Ryde * doc/autoconf.texi (Using Autotest): Avoid @strong{Note: ...}, since it provokes a warning from makeinfo about looking like a cross reference in info output. * doc/autoconf.texi (Function Portability): Add notes on signal handler return type, as per AC_TYPE_SIGNAL. 2003-11-04 Akim Demaille Version 2.58. * doc/standards.texi: Update from master. * tests/mktests.sh (ac_exclude_list): Add AC_FC_FREEFORM. 2003-11-04 Akim Demaille AC_CONFIG_FILE([d1/foo:d2/foo]) triggers error messages when computing the absolute path to d1 in the source hierarchy: it may not exist at all. So don't cd into it. From Alexandre Duret-Lutz. http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00205.html * lib/m4sugar/m4sh.m4 (AS_SET_CATFILE): New. From Paul Eggert, but named after Perl's IO::Spec->catfile. * doc/autoconf.texi (Programming in M4sh): Document. * lib/autoconf/status.m4 (_AC_SRCPATHS): Use it. 2003-11-03 Pavel Roskin * doc/autoconf.texi (Generic Structure Checks): Describe action-if-found and action-if-not-found in AC_CHECK_MEMBERS. 2003-10-31 Akim Demaille * tests/fortran.at (GNU Fortran 77): Don't run FC macros. (GNU Fortran): New. * doc/autoconf.texi (Language Choice): Document. * lib/autoconf/fortran.m4 (AC_FC_SRCEXT, AC_FC_FREEFORM): Assert the current language is Fortran. 2003-10-31 Akim Demaille * bin/autom4te.in (&freeze): Use a less likely warning separator than `\n\n', so that `\n\n\n' is valid in warnings. Reported by Steve Huston. 2003-10-28 Akim Demaille * Makefile.cfg (local_updates, executable-update): Tweak to be robust to parallel makes. Suggested by Alexandre Duret-Lutz. 2003-10-27 Akim Demaille * Makefile.cfg (executable-update): New. (local_updates): Call it. 2003-10-27 Akim Demaille * lib/autoconf/general.m4 (_AC_RUN_IFELSE, _AC_INIT_PREPARE): Don't remove core.* as it may remove valid user files. * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED) (AC_FUNC_UTIME_NULL): Likewise. 2003-10-23 Akim Demaille Version 2.57g. * config/config.guess, config/config.sub: Upgrade from masters. 2003-10-23 Akim Demaille * lib/autoconf/fortran.m4 (AC_FC_SRCEXT): Functions using AC_COMPILE_IFELSE that use break skip the clean up. So do it by hand... 2003-10-23 Akim Demaille * lib/autoconf/general.m4 (_AC_LINK_IFELSE, _AC_COMPILE_IFELSE): Don't forget to remove conftest.err. 2003-10-23 Akim Demaille * lib/autoconf/general.m4 (_AC_LIBOBJ): Don't insert twice the same object file in $LIBOBJS. Reported by Alexandre Duret-Lutz & Derek Robert Price. * doc/autoconf.texi (Generic Functions): Adjust. 2003-10-20 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_TR_SH_PREPARE, _AS_TR_CPP_PREPARE): Use 'eval', so that the resulting configure scripts work even if the current directory has a weird file name like 'y%s+%pp%;s%@%_%g'. 2003-10-20 Daniel Jacobowitz * lib/autoconf/lang.m4 (AC_LANG_WERROR): New macro. * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_PREPROC_IFELSE) (_AC_LINK_IFELSE): Check the werror flag. * doc/autoconf.texi (Generic Compiler Characteristics): Document AC_LANG_WERROR. * NEWS: Mention it. 2003-10-20 Daniel Jacobowitz * lib/autoconf/lang.m4 (AC_NO_EXECUTABLES): Override _AC_COMPILER_EXEEXT to attempt a link. If linking fails, override AC_LINK_IFELSE. 2003-10-15 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): Work around a bug in pdksh 5.2.14. Bug reported by Ralf Corsepius. * doc/autoconf.texi (Shellology): Mention the Korn shell and pdksh. Mention /usr/dt/bin/dtksh on Solaris. (Shell Substitutions): Warn about $((...)). (Parentheses): New section. 2003-10-15 Kevin Ryde * doc/autoconf.texi (Function Portability): Add @prindex for exit. Add putenv and unsetenv. Add sysconf _SC_PAGE_SIZE. 2003-10-13 Nathanael Nerode * lib/autoconf/functions.m4 (AC_FUNC_FORK): Trivial fix for vfork cross test. 2003-10-11 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC): Use the new official name for the GNU Fortran 95+ compiler, 'gfortran', not 'g95'. 2003-10-10 Andreas Schwab * bin/autoheader.in: Avoid empty first line in --version and --help output. * bin/ifnames.in: Likewise. 2003-10-09 Paul Eggert * lib/Autom4te/XFile.pm: Don't assume -j is solo. Issue a more-informative diagnostic. Problems reported by Eric Sunshine. 2003-10-08 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC_V_OUTPUT): Omit quoted -mGLOB_options_string stuff for Intel ifc, which can cause _AC_FC_LIBRARY_LDFLAGS to fail. Use (faster) case for pattern-matching instead of grep. 2003-10-08 Steven G. Johnson * doc/autoconf.texi: Document new FC Fortran macros. 2003-10-08 Gary V. Vaughan * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR): Stub out a macro that future autopoint/aclocal/automake/autoreconf will be able to trace to find where to install local m4 macros. * doc/autoconf.texi (Input): Document it. * NEWS: Updated. 2003-10-06 Gary V. Vaughan * lib/autoconf/fortran.m4 (_AC_FC_LIBRARY_LDFLAGS): Add -lcrtbegin.o to list of ignored flags and fix underquoting of -lcrt[01].o. 2003-10-04 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_FC_G): Use language-specific cache variable instead of $G77 to decide whether to include -O2, since $G77 is specific to Fortran 77. 2003-10-03 Steven G. Johnson * lib/autoconf/fortran.m4 (AC_FC_FREEFORM): Support Absoft "-f free" flag. Re-order flags tested into rough order of popularity. 2003-10-03 Steven G. Johnson * lib/autoconf/fortran.m4 (AC_PROG_FC): Reverse the order of the arguments so that it can be used with syntax identical to AC_PROG_F77, and so that we can more easily decide to remove/deprecate the DIALECT optional argument in the future if it proves troublesome. (AC_FC_FREEFORM): Exit 77 upon failure to fix test suite for non-freeform-supporting compilers. Document freeform flags. 2003-10-03 Akim Demaille * configure.ac: Look for emacs, not macs. Reported by Eric Sunshine. 2003-10-03 Akim Demaille * lib/autom4te.in (Autoreconf-preselections): Trace AC_CONFIG_AUX_DIR. * bin/autoreconf.in (autoreconf_current_directory): Create the AUX_DIR if needed, for sake of automake --add-missing etc. Suggested by Alexandre Duret-Lutz. 2003-10-03 Akim Demaille * configure.ac: Quotation and formatting changes. (EMACS): Don't set it if it is not recent enough to support autoconf-mode.el. From Eric Sunshine. 2003-10-02 Akim Demaille * bin/ifnames.in (&scan_file): Skip C++ comments. From Jeremy Yallop. 2003-10-01 Pavel Roskin * doc/autoconf.texi (Particular Structure Checks): Fix misspelling of HAVE_STRUCT_STAT_ST_BLOCKS. 2003-10-01 Akim Demaille Version 2.57f. 2003-09-30 Paul Eggert * lib/Autom4te/XFile.pm: Use Errno. (lock): Ignore ENOLCK errors. Problem reported Andreas Schwab in . 2003-09-30 Akim Demaille * config/announce-gen (&print_news_deltas): Extracted from... (&print_changelog_deltas): here. (&news_file): Rename as... (@news_file): this. 2003-09-30 Nicolas Joly * lib/autoconf/fortran.m4 (_AC_PROG_FC): Remove files which might have been created when invoking the compiler. * tests/fortran.at (GNU Fortran 77): Quote $G77. 2003-09-29 Akim Demaille Version 2.57e. * config/mkinstalldirs: Upgrade. 2003-09-28 Paul Eggert * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Set DUALCASE=1, for MKS sh. Problem reported by Lars J. Aas in . (_AS_MKDIR_P_PREPARE): Change "rm -fr ./-p" to the more-conservative "test -d ./-p && rmdir ./-p". Suggested by Andreas Schwab in: http://mail.gnu.org/archive/html/autoconf-patches/2003-09/msg00039.html 2003-09-26 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_COMMANDS): Make sure the directory for AC_CONFIG_COMMANDS' first argument exists. This makes valid the invocation of _AC_SRCPATH that follows. Reported by Eric Sunshine. * doc/autoconf.texi (Configuration Commands): Adjust. 2003-09-26 Akim Demaille * bin/autoscan.in (Autom4te::FileUtils): Use it for find_file. Reported by Ralf Corsepius. 2003-09-26 Akim Demaille * lib/autoconf/general.m4 (AC_HELP_STRING): Don't overquote the arguments. Actually, use AU_ALIAS. From Bruno Haible. 2003-09-26 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P_PREPARE): If mkdir -p . fails, rm -fr ./-p to remove junk left behind on NextStep and OpenStep. Problem reported by Eric Sunshine in: http://mail.gnu.org/archive/html/autoconf-patches/2002-12/msg00014.html 2003-09-26 Akim Demaille The test suite are sometimes assigning timings incorrectly. Reported by Henk Krus. Diagnosed by Nicolas Joly. * lib/autotest/general.m4 (AT_CLEANUP): Rename AT_help as AT_help_all. Instead of making AT_help a sequence of assignments to grow $at_help_all, just make AT_help_all be the growing contents of $at_help_all, and make a single assignment in... (AT_INIT): here. (at_times_skip): Flip the meaning and rename as... (at_times_p): this. (AT_INIT): When summarizing the test that ran, remove $at_times_file after use, and check it is present before trying to use it. 2003-09-25 Akim Demaille Version 2.57d. * bin/Makefile.am (edit): Handle '@configure_input@'. (autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate) (ifnames): chmod -w. * tests/wrapper.as (AUTOCONF, AUTOM4TE, ): Point to tests/ executables, not bin/ executables! Otherwise all the magic needed to find non installed files is turned off. This caused a failure of test 40 and 41 that ran aclocal 1.8 which in turn ran autom4te as found in its environment (sent by tests/autoreconf): pointing to bin/autom4te that could not find its files. * tests/mktests.sh: Force the replacement of generated files, for the sake of "mv" program that are interactive when overwriting a -w file. * config/install-sh: Upgrade from CVS Automake. 2003-09-23 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Document test -h versus test -L issues. 2003-09-23 Daniel Jacobowitz and Paul Eggert Trivial change to support GCC's configuration procedure. * lib/autoconf/c.m4 (AC_PROG_CPP_WERROR): New macro. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Don't warn about inconsistency if the preprocessor is set to give errors for any warning. * doc/autoconf.texi (C Compiler Characteristics): Document this. 2003-09-13 Alexandre Duret-Lutz * Makefile.am (autom4te-update, autom4te_files): Fetch Struct.pm and XFile.pm from Automake. * lib/Autom4te/XFile.pm: Update from Automake. 2003-09-12 Akim Demaille Version 2.57c. 2003-09-12 Akim Demaille * config/config.guess, config/config.sub, config/missing, * lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm: Update from masters. 2003-09-12 Akim Demaille * doc/autoconf.texi (Header Portability): Promote linux/types.h, not asm/types.h. 2003-09-11 Akim Demaille * doc/autoconf.texi (Header Portability): linux/random.h. From Peter Hendrickson. 2003-09-10 Akim Demaille * tests/mktests.sh (au_exclude_egrep): Make it harder to be willing to edit the output files. 2003-09-10 Akim Demaille * tests/fortran.at (GNU Fortran 77): Also exercise AC_FC_SRCEXT and AC_FC_FREEFORM. * tests/mktests.sh: Skip AC_FC_SRCEXT. * lib/autoconf/fortran.m4 (AC_FC_SRCEXT, AC_FC_FREEFORM): Likewise. 2003-09-09 Akim Demaille * lib/Autom4te/FileUtils.pm (&update_file): s/cannot not/cannot/g. Reported by Gary Vaughan. * bin/autom4te.in (handle_m4): Likewise. 2003-09-09 Akim Demaille * lib/Autom4te/FileUtils.pm (&update_file): Be sure not to leave trailing files. 2003-09-07 Paul Eggert * lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Improve the accuracy of the wording about obsolescence. From a suggestion by Ian Lance Taylor in . 2003-09-05 Paul Eggert * lib/autoconf/fortran.m4 (AC_FC_FREEFORM): Try -ffree-form too, for the benefit of g77 3.2. Fix suggested by Steven G. Johnson. 2003-09-04 Akim Demaille * tests/mktests.sh (ac_exclude_list): Fix the filtering of AC_FUNC_WAIT3. 2003-09-04 Akim Demaille * bin/autom4te.in: Use &fatal where more appropriate than &error. (freeze): When exiting, use $exit_code. * lib/autoconf/fortran.m4: Comment changes. 2003-09-04 Akim Demaille * tests/mktests.sh (ac_exclude_list): Add AC_FC_FUNC. 2003-09-02 Steven G. Johnson Add support for newer Fortran dialects. The F77 interface is unchanged, and continues to support Fortran 77. New FC macros correspond to all the old F77 macros, with output variables FC, FCFLAGS, and FCLIBS. AC_PROG_FC defaults to picking the newest available dialect, but older dialects can be specified. There are new macros AC_FC_SRCEXT to set the source extension, and AC_FC_FREEFORM to accept free-form source files. * lib/autoconf/c.m4 (_AC_LANG_PREFIX(C), _AC_LANG_PREFIX(C++)): New macros. (AC_LANG_PROGRAM(C)): Invoke _AC_LANG_PROGRAM_C_FC_HOOKS if defined. * lib/autoconf/fortran.m4 (AC_LANG(Fortran), _AC_FORTRAN_ASSERT, _AC_LANG_ABBREV(Fortran), _AC_LANG_PREFIX(Fortran 77), _AC_LANG_PREFIX(Fortran), _AC_FC, AC_LANG_SOURCE(Fortran), AC_LANG_PROGRAM(Fortran), AC_LANG_CALL(Fortran), AC_LANG_PREPROC(Fortran), AC_LANG_COMPILER(Fortran), _AC_FC_DIALECT_YEAR, _AC_F95_FC, _AC_F90_FC, _AC_F77_FC, _AC_PROG_FC, AC_PROG_FC, _AC_PROG_FC_G, _AC_PROG_FC_C_O, AC_PROG_FC_C_O, _AC_PROG_FC_V_OUTPUT, _AC_PROG_FC_V, _AC_FC_LIBRARY_LDFLAGS, AC_FC_LIBRARY_LDFLAGS, _AC_FC_DUMMY_MAIN, AC_FC_DUMMY_MAIN, _AC_FC_MAIN, AC_FC_MAIN, __AC_FC_NAME_MANGLING, _AC_FC_WRAPPERS, AC_FC_WRAPPERS, _AC_FC_FUNC, AC_FC_FUNC, AC_FC_SRCEXT, AC_FC_FREEFORM): New macros. (AC_PROG_F77, AC_PROG_F77_C_O, AC_F77_LIBRARY_LDFLAGS, AC_F77_DUMMY_MAIN, AC_F77_MAIN, _AC_F77_NAME_MANGLING, AC_F77_NAME_MANGLING, AC_F77_WRAPPERS, AC_F77_FUNC): Rewrite in terms of the above. (_AC_PROG_F77_G, _AC_PROG_F77_V_OUTPUT, _AC_PROG_F77_V): Remove. * lib/autoconf/lang.m4 (_AC_LANG_PREFIX): New macro. * tests/acfortran.at: Test AC_FC_FREEFORM, AC_FC_FUNC, AC_FC_MAIN, AC_FC_SRCEXT, AC_FC_WRAPPERS, AC_PROG_FC_C_O. 2003-09-02 Paul Eggert * doc/autoconf.texi (Limitations of Usual Tools, Limitations of Make): Document problems with timestamp resolution that 'make', 'cp -p', and 'touch -r' have. 2003-08-27 Akim Demaille * tests/m4sugar.at (cross_warning): Make sure to enable the output, so that we can track spurious m4sugar output. * tests/local.at: Require 2.57. (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't m4_default the arguments that are defaulted by AT_CHECK anyway. Use AT_CHECK_AUTOM4TE. * lib/m4sugar/m4sugar.m4: There should be no output at all: add a missing dnl. 2003-08-27 Akim Demaille * bin/autoheader.in: Issue the "Using auxiliary..." message only when -Wobsolete is set. Set it on by default. Suggested by Klee Dienes. 2003-08-27 Akim Demaille * doc/autoconf.texi (AC_FUNC_FSEEKO, AC_SYS_LARGEFILE): More documentation. From Guido Draheim. 2003-08-26 Akim Demaille * doc/autoconf.texi (Output): Make clear that one can run code after AC_OUTPUT. 2003-08-25 Akim Demaille * config/announce-gen, GNUmakefile, Makefile.maint: Update from CVS Bison. 2003-08-25 Alexandre Duret-Lutz * bin/autoreconf.in (parse_args): Do not pass --no-force to Automake versions prior to 1.8. 2003-08-25 Akim Demaille * doc/autoconf.texi (Header Portability): netinet/if_ether.h. From Ville Karaila. 2003-08-24 Akim Demaille * configure.ac: Bump to 2.57c. 2003-08-22 Akim Demaille Version 2.57b. * Makefile.cfg (local-checks-to-skip): New. * Makefile.maint (local-check): Rename as... (local-checks-available): this. (local-check): New. * Makefile.am (EXTRA_DIST): Add Makefile.cfg. * configure.ac: Require Automake 1.7.6. 2003-08-22 Akim Demaille Output stack traces in warnings. * lib/m4sugar/m4sugar.m4 (_m4_warn): New. Replace the former... (m4_warn): Pass the call stack to _m4_warn. * bin/autom4te.in: Adjust to output the call stack. * tests/m4sugar.at (m4@&t@_warn): Adjust. 2003-08-22 Akim Demaille * lib/Autom4te/Request.pm, lib/Autom4te/C4che.pm: New. * bin/autom4te.in: Adjust. 2003-08-21 Akim Demaille * lib/Autom4te/General.pm (&file_name_is_absolute): Remove. (&verbose): Remove. (&getopt): Adjust the note and verb channels, depending upon --verbose. * bin/autoheader.in, bin/autom4te.in, bin/autoscan.in, * bin/autoupdate.in: Adjust. Use &verb, not &verbose. 2003-08-21 Akim Demaille * bin/autoheader.in (&parse_args): Use &parse_warnings and &parse_WARNINGS. ($help): Use Autom4te::ChannelDefs::usage. * bin/autoscan.in: Use Autom4te::ChannelDefs. * lib/Autom4te/General.pm: Don't export error: you don't own it. 2003-08-21 Akim Demaille First stab at preserving warnings between calls to autom4te, including when the cache is used. There are still several issues: (i) there are too many runs of m4 (one for include, one for warnings, and some more), (ii) warnings spreading on several lines are not handled gracefully, (iii) the code meant to have the call stack display for errors does not work (its handling should move from m4 to autom4te). * bin/autom4te.in Autom4te::Channels, Autom4te::ChannelDefs): Use them. (@preselect): Add m4_warn. ($exit_status): Remove, use $exit_code. ($help): Use Autom4te::ChannelDefs::usage. (&handle_m4): No longer define the m4_warnings. At each run, extract and report the warnings. Always cache the result, including if the exit status is on failure, since if nothing changes, we should result in the same failure, hence we can use the cache. * lib/m4sugar/m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse) (_m4_warning_error_ifelse, __m4_warning_error_ifelse, _m4_warn): Remove. (m4_warn): Redefine as a do-nothing: it is its invocation that matters, as warnings are now reported via traces. * lib/autoconf/general.m4 (AC_DIAGNOSE): Don't make it a copy of the contents of m4_warn: make it _call_ m4_warn, so that tracing the latter reveals calls to the former. Adjust the tests. * tests/m4sugar.at (m4@&t@_warn): Use existing warning categories. 2003-08-21 Akim Demaille * bin/autoreconf.pm (Autom4te::Channels, Autom4te::ChannelDefs): Use them. 2003-08-21 Akim Demaille * lib/Autom4te/FileUtils.pm (&find_file): Walk the @include in forward order. * lib/Autom4te/ChannelDefs.pm: Doc typos. (&parse_warnings): Accept a list of warning requests. (&usage): Return a string, not a side effect. (cross): New warning category. 2003-08-21 Akim Demaille * lib/Autom4te/Configure_ac.pm (&find_configure_ac) (&require_configure_ac): Accept an optional directory argument. ($configure_ac): Remove. * lib/Autom4te/General.pm (&find_configure_ac, &canonfile) (&catfile): Remove. * bin/autoheader.in, bin/autoreconf.in, bin/autoupdate.in, * bin/autoscan.in: Adjust. 2003-08-20 Akim Demaille * bin/autoheader.in: Remove duplicate 'use Autom4te::FileUtils'. Reported by Alexandre Duret-Lutz. 2003-08-20 Akim Demaille * bin/autoupdate.in, bin/autoheader.in, bin/autoreconf.in, * bin/autom4te: Adjust. In particular, be Autoconf tools are really silent when properly working, bind the verbosity of the 'note' channel to $verbose. * lib/Autom4te/General.pm (&find_file, &mtime, &update_file) (&xsystem, &contents): Remove, since they are exported by... * lib/Autom4te/FileUtils.pm: this. More perldoc. * lib/Autom4te/General.pm (&up_to_date_p): Move to... * lib/Autom4te/FileUtils.pm: here. 2003-08-20 Akim Demaille * lib/Autom4te/Channels.pm, lib/Autom4te/ChannelDefs.pm * lib/Autom4te/Configure_ac.pm, lib/Autom4te/FileUtils.pm: New, from CVS Automake. 2003-08-20 Akim Demaille * Makefile.am (automake_cvsweb, automake_cvsargs, autom4te_files) (autom4te-update): New. * Makefile.cfg (update): Bind autom4te-update. 2003-08-19 Derek Price * lib/autotest/general.m4: Comment various HELP_* diversions. (PARSE_ARGS_BEGIN): New section for option parsing related initialization. (AT_ARG_OPTION,AT_ARG_OPTION_ARG,_AT_ARG_OPTION): New macros to define package specific options and associated help. 2003-08-19 Akim Demaille * config/announce-gen, Makefile.cfg: New. * Makefile.am: Adjust. * GNUmakefile, Makefile.maint: Update from CVS Coreutils. 2003-08-19 Alexandre Duret-Lutz * lib/autom4te.in (Automake-preselections): Preselect AC_CONFIG_LIBOBJ_DIR, AC_CONFIG_LINKS, m4_include, and m4_sinclude. 2003-08-19 Alexandre Duret-Lutz * lib/autom4te.in (Autoconf): Move all args except aclocal.m4? into ... (Autoconf-without-aclocal-m4): ... this new language. * doc/autoconf.texi (autom4te Invocation): Mention Autoconf-without-aclocal-m4. 2003-08-18 Derek Price * doc/autoconf.texi (Writing testsuite.at): Document RUN-IF-FAIL & RUN-IF-PASS optional arguments. 2003-08-18 Derek Price * doc/autoconf.texi (Programming in M4sh): Add doc for AS_IF. 2003-08-16 Derek Price * doc/autoconf.texi (Writing testsuite.at): Document defaults for STDOUT & STDERR arguments. 2003-08-14 Derek Price * lib/autotestgeneral.m4 (AT_INIT): Reformat test summary line to print DESCRIPTION rather than FILE and LINE. Shorten result to fit in new, shorter column three. Add DESCRIPTION to log file content. 2003-08-13 Derek Price * lib/autotest/general.m4 (AT_INIT): Correct typo in final status output. 2003-08-12 Derek Price * lib/autotest/general.m4 (AT_CHECK): Use new _AT_CHECK API. (AT_CHECK_NOESCAPE): Move core functionality to... (_AT_CHECK): ...this new macro. 2003-08-07 Derek Price * lib/autotest/general.m4 (AT_CHECK): Move core functionality... (AT_CHECK_NOESCAPE): ...to this new macro. 2003-07-31 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): Work around a bug in Bash 2.01. Problem reported by Brian Gough in . 2003-07-25 John W. Eaton * lib/autoconf/fortran.m4 (AC_F77_LIBRARY_LDFLAGS): Also ignore -lcrt1.o, for OS X. (trivial change) 2003-07-07 Paul Eggert * lib/autoconf/c.m4 (AC_C_INLINE): Wrap the '#define inline ...' inside '#ifndef __cplusplus'. Problem reported by Bob Friesenhahn. 2003-07-06 Bill Clarke * lib/autoconf/functions.m4 (AC_FUNC_MMAP): Cast pointer to 'long', not 'int', for benefit of Sun's recent C++ compilers (trivial change). See: http://mail.gnu.org/archive/html/autoconf-patches/2003-07/msg00007.html (This really should be 'intptr_t', not 'long', but that would take more work.) 2003-06-25 Akim Demaille * lib/Makefile.am (autom4te.cfg): Make it read only. Depend on Makefile since it contains substitutions. From Paolo Bonzini. * lib/autom4te.in (args): Add local.at? for Autotest args. This change was made on autom4te.cfg which is generated. Reported by Raja R. Harinath. 2003-06-25 Akim Demaille * doc/autoconf.texi (Header Portability): sys/mount.h. From Gareth McCaughan. 2003-06-23 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Report a single config.log, not all of them. This fixes 1. the fact that when testing Autoconf there are many many config.log, 2. the incorrect use of top_srcdir to find config.log. Don't mix the detailed output of failed test with the summary of failures. Rather, append detailed log afterwards. 2003-06-23 Akim Demaille * tests/local.at (AT_CHECK_CONFIGURE): Adjust to the verbose being always run: output config.log on $at_group_log. 2003-06-23 Akim Demaille * tests/torture.at (#define header templates): Don't use quotes in C++ comments as it puzzles Emacs' sh font-lock-mode. 2003-06-23 Akim Demaille * tests/mktests.sh (au_exclude_egrep): Fix output copyright notice. * lib/autom4te.cfg (args): Add local.at? for Autotest args. * tests/atspecific.m4: Rename as... * tests/local.at: This. * tests/suite.at: Move the globals into... * tests/local.at: here. * tests/Makefile.am: Adjust. * doc/autoconf.texi (testsuite Scripts): Adjust. 2003-06-21 Kevin Ryde * lib/autoconf/c.m4 (_AC_PROG_CC_STDC): Extend test program to get an error from OSF 4.0 Compaq cc in its default almost-ANSI mode, thereby ensuring we add -std1 for full-ANSI. * doc/autoconf.texi (hdrindex): New macro. Add index entries for portability of various standard header files. 2003-06-20 Akim Demaille * configure.ac: Bump to 2.57b. 2003-06-20 Akim Demaille Version 2.57a. 2003-06-20 Akim Demaille * bin/autom4te.in: Don't rely on $HOME being defined. Reported by Marc Espie as PR/233. 2003-06-20 Akim Demaille * lib/autotest/general.m4: Use at_times_file only if used. From Nicolas Joly. 2003-06-20 Akim Demaille * config/config.guess, config/config.sub, config/elisp-comp, * config/install-sh, config/mkinstalldirs, doc/standards.texi: Update from masters. 2003-06-11 Paolo Bonzini * doc/autoconf.texi (Writing testsuite.at): Document AT_XFAIL_IF * lib/autotest/general.m4 (AT_XFAIL_IF): New macro. (TEST_SCRIPT): New diversion. (AT_SETUP): Divert output to TEST_SCRIPT and move some code... (AT_CLEANUP): ...to here. Undivert TEST_SCRIPT. (AT_INIT): Support for expected failures. 2003-06-02 Akim Demaille * bin/autom4te.in, bin/autoscan.in, bin/autoheader.in: White space changes. * lib/Autom4te/General.pm (&backname): Remove, no longer used by Autoconf nor Automake. (&contents): New, from Automake. PODify. 2003-05-28 Paul Eggert * NEWS, doc/autoconf.texi (Particular Functions), lib/autoconf/functions.m4 (AC_FUNC_MKTIME): Check that mktime is the inverse of localtime. 2003-05-25 Alexandre Duret-Lutz * lib/Autom4te/General.pm (END): Print diagnostics to STDERR. (handle_exec_errors): New function. Work around $! being altered by WEXITSTATUS. (xqx, xsystem): Use handle_exec_errors. 2003-05-23 Alexandre Duret-Lutz * lib/Autom4te/General.pm (END): Rewrite exit code processing. Do not call `_exit()', simply modify `$?'. (xsystem): Reset $! before running system, and check it afterward. * tests/tools.at (autoupdating AC_PREREQ): Expect exit status 63 for version mismatches. 2003-05-23 Akim Demaille * lib/autoconf/status.m4: Prefer "TAB-SP" to "SP-TAB", because of Emacs' dangerous whitespace.el behavior (smashing "useless" spaces in the middle of a line). * lib/m4sugar/m4sugar.m4: Likewise. Remove useless spaces in comments. 2003-05-23 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_version_prereq): Failure causes an exit 63, so that we (or Automake's "missing") can tell the difference with a plain failure. * doc/autoconf.texi (Notices): Adjust. 2003-05-23 Akim Demaille * Makefile.am, bin/Makefile.am, config/Makefile.am, * doc/Makefile.am, lib/autoconf/Makefile.am, tests/Makefile.am: White spaces cleanup. 2003-05-22 Jim Meyering Paul Eggert * lib/autoconf/c.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Remove `#include ' from the list; we should never make confdefs.h include or , because the resulting namespace pollution would cause other tests to fail. Configure scripts run with some older versions of g++ and HP's aCC would fail due to such an #include. Problems reported by Matthew Mueller in and by Keith Bostic in . In the test, use the test declaration before including , as that's closer to how it'll be used. 2003-05-23 Akim Demaille * doc/autoconf.texi (Header Portability): ucred.h. From Ian Redfern. 2003-05-22 Paolo Bonzini Overhaul Autotest's logging: generate separate log files in testsuite.dir/NNN/testsuite.log, and append them to testsuite.log instead of re-running the test verbosely. * lib/autotest/general.m4 (AT_INIT): Use a single redirected file descriptor, write 0 to at_status_file instead of setting at_status=0, initialize some new variables (at_status_file, at_group_log, at_suite_log, at_tee_pipe). Remove the cruft to rerun the tests, instead append the at_group_log to the at_suite_log when a test fails. (AT_SETUP): pipe the test case's output into at_tee_pipe, with the AS_MESSAGE_LOG_FD redirected to stdout. (AT_CLEANUP): save the output status in $at_status_file and restore it, redirect the AS_MESSAGE_LOG_FD back to its original place. (AT_CHECK): since tests are run with a redirected stdout, and used to be re-run in verbose mode, turn some $at_verbose into echo, and don't redirect the output of testing stdout and stderr. * lib/autotest/autoconf.texi (testsuite Scripts): Update the name of the debugging directory and information about its contents. 2003-05-22 Paolo Bonzini * lib/m4sugar/m4sh.m4 [AS_REQUIRE]: actually use the 2nd parameter 2003-05-22 Akim Demaille * lib/autoconf/autotest.m4, lib/autoconf/autoupdate.m4 * lib/autoconf/fortran.m4 lib/autoconf/general.m4 * lib/autoconf/headers.m4 lib/autoconf/oldnames.m4 * lib/autoconf/status.m4: Fix and adjust copyright notices. 2003-05-22 Akim Demaille * aclocal.m4, bin/autoconf.as, lib/autoconf/autoconf.m4, * lib/autoconf/autoheader.m4, lib/autoconf/autoupdate.m4, * lib/autoconf/c.m4, lib/autoconf/fortran.m4, * lib/autoconf/general.m4, lib/autoconf/headers.m4, * lib/autoconf/lang.m4, lib/autoconf/libs.m4, * lib/autoconf/programs.m4, lib/autoconf/specific.m4, * lib/autoconf/status.m4, lib/autoconf/types.m4, * lib/autotest/general.m4, lib/m4sugar/m4sugar.m4, * tests/atspecific.m4, tests/base.at, tests/compile.at, * tests/foreign.at, tests/m4sh.at, tests/semantics.at, * tests/tools.at, tests/torture.at: Whitespace clean up. Suggested by Jim Meyering. 2003-05-22 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Restore smashed ' \t' as '\t ' so that Emacs' whitespace.el keep it. Reported by Jim Meyering. 2003-05-22 Akim Demaille * doc/autoconf.texi: Replace AC_HELP_STRING AS_HELP_STRING. Add AC_HELP_STRING to the obsolete macros section. Typos. Use '@.' for sentences that ended in a capital letter. From Art Haas. 2003-05-22 Akim Demaille * config/config.guess, config/config.sub, config/elisp-comp, * config/install-sh, config/mdate-sh, config/mkinstalldirs, * config/texinfo.tex, doc/standards.texi: Update from masters. 2003-05-21 Paolo Bonzini * lib/m4sugar/m4sh.m4 (AS_VAR_SET): Escape the RHS before passing it to eval. 2003-05-21 Akim Demaille * bin/autoupdate.in ($m4): Fix quotation. Reported by Martin Mokrejs. 2003-05-19 Paul Eggert * ChangeLog, ChangeLog.2, THANKS, lib/m4sugar/m4sugar.m4: Remove non-ASCII characters. 2003-05-18 Paolo Bonzini * tests/semantics.at (AC_SEARCH_LIBS): New test. * tests/semantics.at (AC_CHECK_HEADERS_OLD, AC_CHECK_HEADERS_NEW): New tests. 2003-05-17 Akim Demaille * lib/autoconf/functions.m4: Use the default includes so that memcmp be declared before being tested. Reported by Sander Niemeijer. (AC_FUNC_ERROR_AT_LINE, AC_FUNC_GETGROUPS, AC_FUNC_STRNLEN): Likewise. * doc/autoconf.texi (Default Includes): Document AC_INCLUDES_DEFAULT. 2003-05-17 Akim Demaille * lib/autoconf/specific.m4: Include signal.h and unistd.h. * doc/autoconf.texi (Obsolete Macros): Adjust. Reported by Werner LEMBERG and Debian Bug 190886. 2003-05-16 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_UNSET_PREPARE): s/FOO/as_foo/ to avoid user name space clashes. Reported by Bruno Haible. 2003-05-16 Akim Demaille * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, * bin/autoscan.in, bin/autoupdate.in, bin/ifnames.in (BEGIN): Make them uniform, and more robust to Perl special characters. Reported by Martin Mokrejs. 2003-05-14 Akim Demaille * tests/foreign.at (Libtool): Skip all Libtools pre 1.4. 2003-05-14 Akim Demaille * doc/autoconf.texi (Header Portability): X11/extensions/scrnsaver.h, linux/irda.h. 2003-05-12 Akim Demaille * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Improve the message. From Matthias Andree. 2003-05-07 Alexandre Duret-Lutz * lib/Autom4te/XFile.pm (lock, truncate): Do not pass @_ to flock and truncate. 2003-05-06 Akim Demaille Don't try to be smart with aclocal 1.8+ because (i) aclocal no longer updates aclocal.m4 if useless, (ii) if a file m4_included by aclocal.m4 is changed it might require the importing of another m4 extension file, i.e., aclocal must be run. * bin/autoreconf.in (&run_aclocal, $aclocal_supports_force): New. (&parse_args): Use --force with aclocal if required and supported. (&autoreconf_current_directory): Use &run_aclocal. 2003-05-06 Akim Demaille Lock autom4te's cache. * lib/Autom4te/XFile.pm ($me, &name, &lock, &truncate, &seek): New. * bin/autom4te.in (&Request::save, &Request::load): Use an IO::File argument instead of a file name, so that the request file remains open during the whole autom4te run. ($icache_file): New. (&freeze): Lock the $icache_file. 2003-04-29 Derek Price * lib/autotest/general.m4 (AT_KEYWORDS): Don't use a comma as the seperator with m4_append_uniq(). It doesn't work. (AT_CLEANUP): Add `;' to end of at_help_all. (AT_INIT): Allow --keywords to be specified more than once. When grepping $at_help_all for keywords, use the field and keyword seperators to ensure a complete keyword match. Alter at_prev handling to support the new --keywords behavior. 2003-04-27 Karl Berry * doc/autoconf.texi: Make the dir entries in the autoconf manual align better with others. I also made some of the individual entries on one line, for brevity and to make it easier for me to sort my dir-example file in the Texinfo distribution :). 2003-04-12 Jim Meyering * NEWS: Mention the new macro. * lib/autoconf/c.m4 (AC_C_RESTRICT): New macro. * doc/autoconf.texi (C Compiler): Describe AC_C_RESTRICT. * tests/c.at: Test AC_C_RESTRICT. * tests/mktests.sh (ac_exclude_list): Add exclusion for AC_C_RESTRICT. 2003-04-08 Akim Demaille * bin/ifnames.in: Skip C++ comments. From Jeremy Yallop. 2003-04-08 Akim Demaille * GNUmakefile (SHELL): Don't assume sh is in /bin/. From Ilya Zakharevich. 2003-04-08 Akim Demaille * doc/autoconf.texi (Particular Headers): Some about sys/socket.h, net/if.h, stdlib.h. 2003-04-01 Derek Price * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Correct syntax error from Akim's checkin of 2003-03-29. 2003-04-01 Derek Price * tests/torture.at (Configuring subdirectories): Add missing close-quote for Akim's change from 2003-03-28. 2003-04-01 Akim Demaille * doc/autoconf.texi (ac, at, ms): Rename these indexes as... (AC, AT, MS): these. (shortindexflag, @acindex, @ahindex, @asindex, @atindex, @msindex): New. Use them. * doc/Makefile.am (CLEANFILES): Adjust. (TEXI2DVI): Make it --batch. 2003-03-31 Derek Price * lib/autotest/general.m4: Revert the checkin from 2003-03-27 which removed the main loop. Thanks to Akim Demaille. 2003-03-29 Akim Demaille * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Skip OS/2's install, that starts a GUI. From Ilya Zakharevich. 2003-03-29 Akim Demaille * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): The documentation to read is Autoconf's. Suggested by Paul Eggert. 2003-03-28 Akim Demaille * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): Suggest reading the section "Present But Cannot Be Compiled" when the header causes problems. 2003-03-28 Akim Demaille * tests/torture.at (Configuring subdirectories): Require aclocal 1.4, otherwise the test fails, as it does support configure.ac. This fixes the "test 40 failed" bug reports. 2003-03-28 Akim Demaille * doc/autoconf.texi (C Compiler): `#line' portability. From Paul Eggert and Nelson H. F. Beebe. 2003-03-27 Derek Price * lib/autotest/general.m4: Eliminate main loop and reorganize test layout in order to allow scripting around test groups. 2003-03-27 Derek Price * lib/autotest/general.m4 (PARSE_ARGS,PARSE_ARGS_END,HELP,HELP_MODES, HELP_TUNING,HELP_OTHER,HELP_END,PREPARE_TESTS,TESTS_END): Define and use new diversions in preparation for accepting new arguments and allowing scripting around tests. (OPTIONS,TAIL): Remove these diversions to make way for the ones above. 2003-03-26 Derek Price * lib/autoconf/general.m4 (AC_ARG_VAR): Use AS_HELP_STRING instead of obsolete AC_HELP_STRING. (AC_HELP_STRING): AU_DEFUN to... * lib/m4sugar/m4sh.m4 (AS_HELP_STRING): ...here. * tests/m4sh.at (AS_HELP_STRING): New test. * tests/acgeneral.at: Regenerated. 2003-03-26 Derek Price * lib/autotest/general.m4: s/DEFAULT/DEFAULTS/ since it makes more sense. Verbosify the diversion definitions comment. 2003-03-26 Derek Price * lib/autotest/general.m4 (AT_INIT): Remove redundant call to AS_PREPARE. 2003-03-21 Eric Siegerman * doc/autoconf.texi (Present But Cannot Be Compiled): Grammar fixes and minor rewording. (trivial change) 2003-03-06 Paul Eggert Work around a problem noted by Nelson H. F. Beebe with coreutils 4.5.9: Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09) rejects '#line 32768 "configure"' because the line number overflows. * lib/autoconf/c.m4 (AC_LANG_SOURCE(C)): Do not generate #line directives. * lib/autoconf/lang.m4 (AC_LANG_SOURCE): Fix comment to match this. * doc/autoconf.texi (Generating Sources): Document this. 2003-03-01 Richard Dawe * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): Normalize file name for the m4 program, when it has an "exe" file extension. DJGPP's error messages include the error code in brackets - remove the error code during normalization. 2003-02-28 Akim Demaille * doc/autoconf.texi (Present But Cannot Be Compiled): New. 2003-02-28 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): Remove the section about `$<' in inference rules, it was a bogus interpretation of an old Automake change. Discuss NetBSD, FreeBSD, OpenBSD, and Tru64 make in the "target lookup" section. (Automake): Automake 1.5+ no longer requires special tools to be present on the developer's host. 2003-02-26 Richard Dawe * bin/autoheader.in (BEGIN): For DJGPP SHELL may not be set to a shell that can handle redirection or quoting correctly. Override SHELL with the shell detected by configure. Use of $^O suggested by Tim van Holder. * bin/autom4te.in (BEGIN): Likewise. * bin/autoreconf.in (BEGIN): Likewise. * bin/autoscan.in (BEGIN): Likewise. * bin/autoupdate.in (BEGIN): Likewise. * bin/ifnames.in (BEGIN): Likewise. * bin/ifnames.in: Add final newline to help and version messages. * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Translate colons, to cope with DOS-style absolute paths, when constructing ${ac_make}. * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS, _AC_OUTPUT_FILES): When constructing paths with IFS=:, quote the path. If we're constructing a DOS-style absolute path, we don't want to split it on the colon. * tests/atspecific.m4 (AT_CHECK_CONFIGURE): Fix typo in description. 2003-02-25 Pavel Roskin * bin/autoheader.in: Add missing newline when printing suggestion how change AC_DEFINE call. 2003-02-24 Paul Eggert * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix typo in 2002-09-01 patch by replacing "test -n" with "test -z". This fixes a bug found by Jeff Painter and reported by Tom Epperly in . * doc/autoconf.texi (Shell Substitutions): test -n -> test -z, to fix a mismatch between example and discussion. 2003-02-24 Kevin Ryde * doc/autoconf.texi (Limitations of Builtins): Add notes on printf format starting with "-". 2003-02-20 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): `foo=bar make -e' is not portable inside Makefile. 2003-02-20 Akim Demaille * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL): When compiler says yeah, but preproc says nope, compiler is right. Conversely, prompt the reader to send a bug report to the maintainers of the package, not of Autoconf. 2003-02-20 Klee Dienes * bin/autoreconf.in (autoreconf_current_directory): Properly handle an empty aclocal.m4. 2003-02-20 Akim Demaille * lib/autoconf/general.m4 (AC_PREFIX_PROGRAM): Quote $ac_prefix_program. From Larry Jones. 2002-12-23 Paul Eggert * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Define $1 to an innocuous variant befor including or . This works around a bug reported by Albert Chin: HP-UX 11i (and earlier versions) have a that declares gettimeofday and many other functions. 2002-12-03 Paul Eggert Version 2.57. * NEWS, configure.ac: Update version. * doc/fdl.texi: Upgrade to FDL version 1.2. * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Use the function f nontrivially in main's body, so that f's external declaration is not optimized away in AIX. This should fix the bug reported by Martin Frydl in . * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C), _AC_PROG_PREPROC_WORKS_IFELSE): Use if __STDC__ is defined, to support freestanding compilers. This should fix the bug reported by Momchil Velkov in . * doc/autoconf.texi (Obsolete Macros): Fix typos (insert empty arg, AC_DEFINE -> AC_DEFINE_UNQUOTED) in documentation for obsolete AC_CHECK_TYPE. The missing empty arg was reported by Simon Josefsson in . * Makefile.maint (www-gnu): New macro. (standards.texi-url_prefix, make-stds.texi-url_prefix): Use it, as the location has moved. 2002-12-02 Martin Frydl * bin/autom4te.in (at_flatten): rewritten to avoid M4 problem when \(.*\) match is too long and there is something more to be checked. 2002-11-15 Akim Demaille Version 2.56. * config/install-sh: chmod +x. From Paul Eggert. * config/move-if-change: Indenting changes. * Makefile.am (AUTOMAKE_OPTIONS): Move to... * configure.ac (AM_INIT_AUTOMAKE): here. Require 1.7.1. 2002-11-14 Akim Demaille Version 2.55. * config/config.guess, config/config.sub, config/install-sh: Update from masters. 2002-11-14 Akim Demaille * Makefile.maint: Sync with Bison, i.e.: (po-check): Scan .l and .y files instead of the .c and the .h files that they generate. This fixes the bug reported by Tim Van Holder in: Look for N_ as well as for _. Try to avoid matching #define for N_ and _. From Paul Eggert. 2002-11-14 Akim Demaille * doc/autoconf.texi (C Compiler): Compiling several files at once. From Paul Eggert and Albert Chin-A-Young. 2002-11-14 Akim Demaille * doc/autoconf.texi (C Compiler): Solitary backslashes. From Paul Eggert and Albert Chin-A-Young. 2002-11-14 Kevin Ryde * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)): Initialize f=$1 rather than assigning in main, to avoid HP cc +O3 optimizing it away. 2002-11-12 Peter Eisentraut * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Add -q option. Process --recheck after parsing all options. Pass -q option to configure on --recheck. (AC_OUTPUT): Pass -q from configure to config.status. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Strip -q from arguments to record. * doc/autoconf.texi (config.status Invocation): Document config.status -q option. 2002-11-07 Alexandre Duret-Lutz * bin/autoscan.in (scan_file): Scan Makefile.am too. Ignore Makefile.in if Makefile.am exists. (output): Strip `.am' from Makefiles. Don't output AC_CONFIG_FILES if no Makefiles were found. 2002-11-07 Akim Demaille * Makefile.am (cvs_files): Add elisp-comp, mdate-sh. (local_updates): New. * Makefile.maint: Update, from CVS Bison. (local_updates): New. 2002-11-06 Akim Demaille * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY): Wrap the `f' declaration in extern "C" too. Reported by Roberto Bagnara. 2002-11-06 Akim Demaille * tests/torture.at (Configuring subdirectories): Don't use grep -w. * doc/autoconf.texi (Limitations of Usual Tools): Grep -w. Reported by Ezra Peisach. 2002-11-05 Akim Demaille * lib/autoconf/autoheader.m4 (_AH_TEMPLATE_OLD, _AH_VERBATIM_OLD): Remove. We _have_ to stop using the old compatibility scheme that tried to avoid useless backslashes because Libtool 1.4.3 contains a AC_DEFINE([error_t], [int], [Define to a type to use for \`error_t' if it is not otherwise available.]) We _have_ to quote the single quote and backslashes with \. The old compatibility scheme saw that ` was backslashed, and therefore did not quote the single quote. Hence before this patch, Autoconf was not compatible with Libtool. 2002-11-04 Paul Eggert * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Set the following variables, too: LC_ADDRESS, LC_IDENTIFICATION, LC_MEASUREMENT, LC_MONETARY, LC_NAME, LC_PAPER, LC_TELEPHONE. * doc/autoconf.texi (Special Shell Variables): Mention those vars. 2002-11-04 Akim Demaille Version 2.54c. * Makefile.maint (update, cvs-update, po-update, do-po-update): New. * config/texinfo.tex: Update. 2002-11-03 Akim Demaille * bin/autoreconf.in (&autoreconf_current_directory): New, extracted from... (&autoreconf): here. ($help, $make, &parse_args, &autoreconf_current_directory): Support -m/--make. * doc/autoconf.texi (autoreconf Invocation): Adjust. 2002-10-31 Bruno Haible * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF): Change message. Change name of cache variable to ac_cv_func_malloc_0_nonnull. (AC_FUNC_MALLOC): Change description of HAVE_MALLOC macro. (_AC_FUNC_REALLOC_IF): Change message. Change name of cache variable to ac_cv_func_realloc_0_nonnull. (AC_FUNC_REALLOC): Change description of HAVE_REALLOC macro. 2002-10-31 Akim Demaille The test suite was no longer checking for trailing envvars and files. * tests/atspecific.m4 (AC_STATE_SAVE): Don't use quadrigraphs here. (AT_CHECK_ENV): Make sure the `state-ls.before file exists. 2002-10-31 Akim Demaille * lib/autoconf/programs.m4 (AC_PROG_MAKE_SET): Use and display `$(MAKE)' instead of '${MAKE}' to emphasize that we refer to the Make variable, not a shell variable. Suggested by Bruno Haible. 2002-10-31 Akim Demaille * bin/autom4te.in (load_configuration): Reject #args out of any language. 2002-10-31 Akim Demaille * lib/autoconf/general.m4 (_AC_MSG_LOG_CONFTEST): New. (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE) (_AC_RUN_IFELSE): Use it. * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT): (_AC_COMPILER_EXEEXT_DEFAULT): Likewise. * lib/autoconf/c.m4 (AC_LANG_SOURCE): Don't include confdefs.h, inline it. 2002-10-30 Akim Demaille * bin/autom4te.in (&parse_args, $help): Support --no-cache. * doc/autoconf.texi (autom4te Invocation): Adjust. Suggested by Tim van Holder. 2002-10-29 Paul Eggert * doc/autoconf.texi (Particular Functions): AC_FUNC_MALLOC and AC_FUNC_REALLOC check for compatibility with glibc, not POSIX. Problem reported by Bruno Haible. 2002-10-29 Akim Demaille * doc/autoconf.texi (Header Templates): Put also in words what the pictures says to assist free style readers. (Customizing autom4te): s/--cache=/--cache /. 2002-10-29 Akim Demaille * lib/autoconf/functions.m4 (_AC_FUNC_VFORK): Include stdlib.h and sys/wait.h. sparc_address_test returns void. Use it with an argument, as prototyped. From Bruno Haible. 2002-10-29 Akim Demaille * doc/autoconf.texi (Subdirectories): Cygnus dirs have configure.in, not configure.ac. Reported by Bruno Haible. 2002-10-29 Akim Demaille * tests/torture.at (Deep Package): New test. (Configuring subdirectories): Don't use a testSubDir as Autotest now does it itself. 2002-10-29 Akim Demaille * bin/autoreconf.in (&parse_args, $help): Support --warnings. * doc/autoconf.texi (Invoking autom4te): Rename as... (autom4te Invocation): this, for consistency with the other nodes. 2002-10-29 Akim Demaille * lib/autom4te.in (Autoconf): s/automate/autom4te/. Reported by Ralf Corsepius. 2002-10-29 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted characters is a back as an `obsolete' warning now. Reported by Ralf Corsepius. 2002-10-28 Akim Demaille * configure.ac: Bump to 2.54c. 2002-10-28 Akim Demaille Version 2.54b. * tests/foreign.at (Libtool): Adjust to broken libtoolize. 2002-10-28 Akim Demaille * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): Be robust to different m4 executable names, and different GNU M4 version. Reported by Ezra Peisach and Paul Jarc. 2002-10-27 Akim Demaille * lib/autoconf/functions.m4 (_AC_FUNC_VFORK): Really use AC_RUN_IFELSE. 2002-10-27 Akim Demaille * doc/autoconf.texi: More AC_MSG_FAILURE promotion. * lib/autoconf/fortran.m4 (_AC_F77_NAME_MANGLING): Die when a simple Fortran program cannot be compiled. * lib/autoconf/lang.m4 (AC_LANG_CALL, AC_LANG_FUNC_LINK_TRY): Issue a warning if no function is given. 2002-10-27 Akim Demaille * doc/autoconf.texi (Run Time): Document AC_RUN_IFELSE. Move the documentation of AC_TRY_RUN to... (Obsolete Macros): here. Adjust all the old samples still using AC_TRY_RUN to AC_RUN_IFELSE. (autoconf Invocation): Remove the duplicates with `invoking autom4te'. * lib/autoconf/headers.m4 (AC_HEADER_STDC): Don't use AC_TRY_RUN. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Likewise. 2002-10-27 Akim Demaille * doc/autoconf.texi (Generating Sources): Document AC_LANG_CALL and AC_LANG_FUNC_LINK_TRY. (Examining Libraries): Rename as... (Running the Linker): this. Document AC_LINK_IFELSE. Move the documentation of AC_TRY_LINK and AC_TRY_LINK_FUNC to... (Obsolete Macros): here. * lib/autoconf/fortran.m4 (_AC_F77_NAME_MANGLING): Don't use AC_TRY_LINK_FUNC nor AC_TRY_LINK. * lib/autoconf/libs.m4 (AC_CHECK_LIB, AC_PATH_XTRA): Likewise. * lib/autoconf/headers.m4 (AC_USG): Likewise. 2002-10-27 Akim Demaille * lib/autoconf/headers.m4 (AC_HEADER_STDC): Don't use AC_TRY_CPP. More `check config.log' messages. * lib/autoconf/general.m4 (AC_MSG_FAILURE): New. * doc/autoconf.texi (Printing Messages): Document it. * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Use it when appropriate. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT) (_AC_COMPILER_EXEEXT_WORKS, _AC_COMPILER_EXEEXT_O) (_AC_COMPILER_OBJEXT): Likewise. * lib/autoconf/general.m4 (AC_RUN_IFELSE): Likewise. * lib/autoconf/fortran.m4 (_AC_LANG_PROGRAM_C_F77_HOOKS): Likewise. * lib/autoconf/c.m4 (AC_PROG_CPP, AC_PROG_CC, AC_PROG_CXXCPP): Likewise. Deprecate macros with unusual interfaces. * lib/autoconf/general.m4 (AC_TRY_CPP, AC_TRY_LINK) (AC_TRY_COMPILE, AC_TRY_RUN): AU_DEFUN'ed. Document the new ones, and proper style. * doc/autoconf.texi (Generating Sources): New. Document AC_LANG_CONFTEST, AC_LANG_SOURCE, AC_LANG_PROGRAM. (Examining Declarations): Rename as... (Running the Preprocessor): this. Document AC_PREPROC_IFELSE. (Examining Syntax): Rename as... (Running the Compiler): this. (AC_FOO_IFELSE vs AC_TRY_FOO): New section. (Obsolete Macros): Move the definition of AC_TRY_CPP and AC_TRY_COMPILE here. 2002-10-27 Akim Demaille Move sections around. * doc/autoconf.texi (Customizing autom4te): Remove a lost sentence. Reported by Burno Haible. (Language Choice): Now the first section of... (Writing Tests): this section. Make the introduction less C-centric. (Guidelines, Test Functions): Move to... (Writing Test Programs): this new section. (Test Programs): Merge into... (Run Time): this. 2002-10-27 Akim Demaille * lib/freeze.mk ($(AUTOM4TE_CFG)): Add a missing dependency on autom4te.in that resulted in the need for two `make' runs. 2002-10-27 Akim Demaille * configure.ac: Bump to 2.54b. 2002-10-25 Akim Demaille Version 2.54a. * Makefile.maint: Update from the Coreutils. (AMTAR): Remove, obsolete. (automake_repo): Update to redhat.com. (cvs_file): New. Adjust to the fact that ansi2knr is now hosted by Automake. * Makefile.am (cvs_files): Add install-sh and mkinstalldirs. * config/config.guess, config/mkinstalldirs, config/texinfo.tex: Update from masters. * lib/autoscan/Makefile.am (EXTRA_DIST, nodist_autoscanlib_DATA): autoscan.pre is not to be installed, and autoscan.list is not to be shipped. (CLEANFILES): Add autoscan.list. (autoscan.list): Disable the cache. * bin/Makefile.am: Include freeze.mk. 2002-10-25 Akim Demaille * bin/autom4te.in (&load_configuration): Take the file as argument. (&parse_args): Handle -C, --cache. ($help): Adjust. (MAIN): Load ~/.autom4te.cfg and ./.autom4te.cfg. * lib/autom4te.in (Autoconf): Pass --cache=autom4te.cache. * doc/autoconf.texi (Invoking autom4te): Document --cache. Now a subsection of... (Using autom4te): This new section. (Customizing autom4te): New. (autom4te.cache): Adjust. 2002-10-25 Akim Demaille * doc/autoconf.texi (Generic Headers): More information on how to use AC_CHECK_HEADERS. 2002-10-25 Akim Demaille * bin/autoconf.as, bin/autoconf.in, bin/autoupdate.in ($help): Space changes. 2002-10-25 Akim Demaille * bin/autoscan.in (output): Output AC_PREREQ. (%needed_macros): Add AC_PREREQ so that configure.ac without one be reported. 2002-10-23 Akim Demaille * doc/autoconf.texi (Particular Headers): In AC_HEADER_STDBOOL, document _Bool. 2002-10-23 Akim Demaille * bin/autom4te.in (handle_traces): Handle @&t@ in traces. Reported by Peter Eisentraut. 2002-10-23 Akim Demaille * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): Also look for the type _Bool. Fix a typo. * doc/autoconf.texi (Particular Headers): Adjust according to Paul Eggert's recommandations. 2002-10-22 Akim Demaille * lib/autoconf/headers.m4 (AC_HEADER_STDBOOL): New, based on CVS Bison, by Paul Eggert. * doc/autoconf.texi (Particular Headers): Document it. 2002-10-22 Aaron M. Ucko * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Avoid duplicates in `$ac_configure_args'. 2002-10-22 Akim Demaille * doc/autoconf.texi: Use AC_CONFIG_HEADERS in examples. (AC_ST_BLKSIZE, AC_ST_RDEV): Directly point to AC_CHECK_MEMBERS. From Art Haas. 2002-10-22 Akim Demaille Restore the 2002-10-11 Akim Demaille patch: * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) (AC_CHECK_HEADER, _AC_CHECK_HEADER_NEW,_AC_CHECK_HEADER_OLD): Restore. (_AC_CHECK_HEADER_NEW): Rename as... (AC_CHECK_HEADER): this. 2002-10-22 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools): Remove incorrect words about HP-UX cmp: it was actually a user-written cmp. 2002-10-22 Akim Demaille * tests/foreign.at (Libtool): Don't check autoconf's stderr: there are a few warnings. * lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD): Quote for Perl '' strings, not "". * bin/autoheader.in: Invoke autoconf to get '' strings, not "" strings. 2002-10-22 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted characters is a syntax warning now. (_AS_QUOTE): Accept $2 as list of characters to quote. * lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD): Quote for Perl, not sh. * bin/autoheader.in: When $debug, report the file which is `do'ne. * tests/tools.at (autom4te, autoheader): Exercise @bar, not merely `@', to tickle Perl's lists. Reported by Carlos Velasco. 2002-10-18 Akim Demaille * bin/autom4te.in (handle_m4): Pass --fatal-warning to m4, so that missing included files _are_ errors. Thanks to Alexandre Duret-Lutz. * tests/tools.at (autom4te cache): Adjust. * tests/atspecific.m4 (AT_CHECK_AUTOM4TE): New. (AT_CHECK_M4SUGAR): Use it. * tests/m4sugar.at (m4_warn, m4_require: circular dependencies): Adjust. * tests/tools.at (autom4te): Now it does exit 1. 2002-10-17 Akim Demaille * lib/autoconf/general.m4 (AC_CACHE_SAVE): Don't use cmp. Fixes the `AC_ARG_VAR' test failures. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Don't use cmp. * lib/freeze.mk (check-forbidden-patterns): New. * lib/autoconf/Makefile.am, lib/autotest/Makefile.am * lib/m4sugar/Makefile.am (check-local): Use it to catch `cmp'. * doc/autoconf.texi (Limitations of Usual Tools): HP-UX' cmp and /dev/null. Reported months ago by H. Merijn Brand. 2002-10-17 Akim Demaille * tests/tools.at (autoheader): Put randoms `@' to stress Perl. 2002-10-16 Paul Eggert * Makefile.maint (wget_files): Remove ansi2knr.c. (ansi2knr.c-url_prefix): Remove. 2002-10-16 Akim Demaille Because of caching, some files that no longer exist and are no longer required can still cause errors. Reported by Alexandre Duret-Lutz. * bin/autom4te.in (&parse_args): Do not prepend `--reload-state' to frozen files in @ARGV, as @ARGV must remain being a list of files. Rather, at M4 call sites, use this... (&files_to_options): New function. (&freeze): Use &error. (&up_to_date): If a file that was included according to the cache is no longer there, then the output is out dated. (&main): Don't even check whether a file is up to date is anyway --force is given. * tests/tools.at (autom4te cache): New. 2002-10-16 Akim Demaille * bin/autoconf.as: Kill dead options. * bin/autoupdate.in (&parse_args): Kill old options. * bin/autoreconf.in (&parse_args): Remove dead options. Factor some code. (&autoreconf): Report the directories we enter *and leave*, so that error messages can be easily located, and use GNU Make format, so that Emacs' compile mode understands us. * lib/Autom4te/General.pm (&update_file): Use `verbose' to report if some file was changed instead of `print'. * bin/autoheader.in: Suggest AC_DEFINE with 3 args when needed. (&parse_args): Remove the dead options. * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Adjust to the new autoheader's quiet mode. (AT_CHECK_AUTOUPDATE): Likewise. * tests/tools.at (autoupdate): Adjust. * tests/semantics.at (AC_C_BIGENDIAN): Likewise. 2002-10-11 Akim Demaille No longer use CPP to check for the existing of headers: use CC to check for compilability. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_MONGREL) (AC_CHECK_HEADER, _AC_CHECK_HEADER_OLD): Remove. (_AC_CHECK_HEADER_NEW): Rename as... (AC_CHECK_HEADER): this. * lib/autotest/general.m4 (AT_INIT): Include the failed test numbers in the Subject suggestion. 2002-10-11 Akim Demaille * lib/autoconf/specific.m4 (AC_DECL_SYS_SIGLIST): Obsolete. Suggest using AC_CHECK_DECLS instead. 2002-10-11 Akim Demaille * tests/torture.at (AC_ARG_VAR): Have configure report the value of `precious'. 2002-10-11 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use $$ in the file name to enable parallel executions. From Sam Varshavchik. 2002-10-08 Akim Demaille * bin/autoreconf.in (&autoreconf): Run autopoint before the first aclocal invocation, as Gettext macros might not be visible to aclocal. Instead of blindly running autopoint, scan configure.ac (not the traces) for AM_GNU_GETTEXT_VERSION uses, as autopoint does. Reported by Paul D. Smith. 2002-10-08 Paul Eggert Work around problems found when POSIXLY_CORRECT=1 is set. None of this seems to have anything to do with POSIX, really, but it's how Perl getopt works. * bin/autom4te.in (parse_args): Configure GetOpt with "permute", too. * doc/autoconf.texi (Invoking autom4te): --warning -> --warnings. * lib/autom4te.in: --warning -> --warnings. 2002-09-28 Akim Demaille * doc/autoconf.texi (autom4te.cache): New section. 2002-09-28 Akim Demaille * lib/autom4te.in (Autoscan-preselections, Autoreconf-preselections) (Automake-preselections): Update. * bin/autoreconf.in, bin/autoheader.in: Comment changes. 2002-09-28 Akim Demaille * lib/autoscan/autoscan.pre: Move all the remaining rules to... * lib/autoconf/c.m4, lib/autoconf/functions.m4, * lib/autoconf/headers.m4, lib/autoconf/libs.m4, * lib/autoconf/specific.m4, lib/autoconf/types.m4: here. 2002-09-28 Akim Demaille * tests/torture.at (Configuring subdirectories): Be robust to users who use config.site to require for a cache: in this case, the two last configure runs, using two different sets of arguments, trigger a legitimate error. 2002-09-28 Akim Demaille * tests/m4sh.at (Functions Support, Functions and return Support): New. 2002-09-28 Akim Demaille * bin/Makefile.am (ETAGS_SH, ETAGS_PERL): Update: ifnames and autoheader are Perl programs. (autoconf, autoheader, autoreconf, autoupdate, ifnames, autoscan) (autom4te): Specify that the sources are in the $srcdir. * doc/autoconf.texi (Installation Directory Variables): Adjust. 2002-09-28 Akim Demaille * lib/autoscan/autoscan.pre (st_blksize, st_blocks, st_rdev) (tm_zone): Move their rules to... * lib/autoconf/types.m4: here, using AN_ macros. * lib/autoscan/autoscan.pre (AWK, BISON, INSTALL, LEX, LN, MAKE) (RANLIB, YACC, awk, bison, byacc, flex, gawk, install, lex, ln) (make, mawk, nawk, ranlib, yacc): Similarly, move to... * lib/autoconf/programs.m4: here. * lib/freeze.mk (ETAGS_FOR_M4, ETAGS_FOR_M4SUGAR) (ETAGS_FOR_AUTOCONF): New. Use it. 2002-09-28 Akim Demaille * lib/autoconf/autoscan.m4: New file. * lib/autoconf/autoconf.m4: Include it. * lib/autoconf/functions.m4: Use AN_FUNCTION for all the functions that were listed in the original autoscan.list. * lib/autoconf/headers.m4: Similarly with headers. * lib/freeze.mk (autoconf_m4f_dependencies): Add autoscan.m4. (.m4.m4f): Don't pass --prepend-include, since that's done by tests/autom4te itself. * lib/autoscan/Makefile.am: Include freeze.mk. (autoscan.list): New target --this file is no longer a source. (autoscan.pre): New file. 2002-09-28 Akim Demaille * bin/autoscan.in (@kinds): Make them singular. Adjust all uses. (&init_tables): When --debug, report the list of rules to ease tracking changes in autoscan.list. * lib/autoscan/autoscan.list (function): Strip comments, sort. 2002-09-28 Akim Demaille * lib/autoscan/functions, lib/autoscan/headers, * lib/autoscan/identifiers, lib/autoscan/makevars, * lib/autoscan/programs: Merge into... * lib/autoscan/autoscan.list: this. * bin/autoscan.in (&init_tables): Adjust. 2002-09-28 Akim Demaille * lib/autoscan/functions, lib/autoscan/headers, * lib/autoscan/identifiers, lib/autoscan/makevars, * lib/autoscan/programs: Make the `kind' explicit, i.e., each `functions' line is now prefixed with `function:'. * bin/autoscan.in (&init_tables): Adjust. 2002-09-28 Akim Demaille From now on, autoscan files must always map a macro name to a word: there is no `default' macro for autoscan. * bin/autoscan.in (&init_tables): Reject entries with no macro at all. * lib/autoscan/functions, lib/autoscan/headers: Make the macro explicit. 2002-09-28 Akim Demaille * bin/autoscan.in (%c_keywords): Remove. (&used): Keep only track of the words we might be interested in. (&output_kind): It is no longer needed to look for non active checks. 2002-09-27 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_MBRTOWC): New, stolen from jm_FUNC_MBRTOWC, by Paul Eggert, from the Coreutils 4.5.1. * lib/autoscan/functions: Adjust. * doc/autoconf.texi (Particular Functions): Adjust. 2002-09-27 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools): Some about mv from /tmp. Thanks to Bill Moseley and Paul Eggert. * lib/m4sugar/m4sh.m4 (AS_TMPDIR): $2 is the directory into which the tmpdir must be created. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Have the tmp dir be in the build tree, instead of $TMPDIR. 2002-09-27 Akim Demaille * bin/autoscan.in: Improve the comments. (&parse_args): Drop obsolete undocumented options. (&output_kind): Output warnings. * lib/autoscan/functions: (dcgettext): Now trigger AM_GNU_GETTEXT. (getwd): Trigger a warning. 2002-09-26 Akim Demaille * bin/autoreconf.in: Clarify that -s is meaningless without -i. Reported by Ralf Corsepius. * doc/autoconf.texi (autoreconf Invocation): Likewise. 2002-09-26 Akim Demaille Single suffix rules and seperated dependencies are not portable. * doc/autoconf.texi (Installation Directory Variables): Update. (Limitations of Make): Some about `Single Suffix Rules and Separated Dependencies'. * bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate) (ifnames, autoscan, autom4te): Un-factor into several rules. 2002-09-25 Paul Eggert * BUGS (Interoperability bugs): New section. Mention libtool 1.4.2, configure.ac, and AC_CONFIG_AUX_DIR interoperability bug. 2002-09-24 Paul Eggert Fix a portability bug reported by Alexandre Duret-Lutz: Solaris 8 make handles suffix-rules differently from GNU make. * bin/Makefile.am (SUFFIXES, .in): Remove. (autoconf autoheader autoreconf autoupdate ifnames autoscan autom4te): Move the body of the old .in rule here. 2002-09-16 Akim Demaille i960 compilers create `b.out' files by default. Reported by Ralf Corsepius. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT): Remove b.out files. (_AC_COMPILER_EXEEXT_DEFAULT): Adjust to b.out. 2002-09-13 Paul Eggert * doc/autoconf.texi (Particular Headers): Remove obsolete reference to `struct timezone' in the description of AC_HEADER_TIME. 2002-09-13 Akim Demaille Version 2.54. * config/config.sub, config/config.guess: Update. * Makefile.maint: Update from bits of the Coreutils 4.5.1. * Makefile.am: Adjust. 2002-09-13 Akim Demaille * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Suggest reading config.log when the compiler is rejected. Suggested by Guido Draheim. 2002-09-13 Akim Demaille * bin/autoreconf.in: Don't use Cwd::chdir, since in its internals (chdir_init) might hang when stat'ing mounted directories. Reported by Vance Shipley. 2002-09-12 Akim Demaille * bin/autoscan.in (&parse_args): Pass a reference to the lists, not the lists. 2002-09-12 Akim Demaille * doc/autoconf.texi (Defining Symbols): Present two different prototypes for AC_DEFINE and AC_DEFINE_UNQUOTED to emphasize the difference between 1 argument calls, and 2-3 argument calls. 2002-09-12 Peter Eisentraut * doc/autoconf.texi: Review grammar and punctuation. 2002-09-11 Paul Eggert * doc/autoconf.texi: Fix minor formatting, spelling, and grammatical typos. (Defining Symbols): Explain that AC_DEFINE(var) defaults to 1, but AC_DEFINE(var,,description) does not; and the AC_DEFINE(var) case is obsolescent. 2002-09-11 Akim Demaille * doc/autoconf.texi (Questions): Rename as... (FAQ): this. (Defining Directories): New. 2002-09-09 Akim Demaille * doc/autoconf.texi (Making testsuite Scripts): Update. Suggested by Nishio Futoshi. 2002-09-09 Koji Arai * doc/autoconf.texi (Making testsuite Scripts): Use `@@' where a plain `@' is wanted. 2002-09-09 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Keep the `duplicates', since the algorithm was too naive and could keep `--prefix=1 --prefix=2 --prefix=1' as `--prefix=1 --prefix=2', and keep `--prefix foo --prefix bar' as `--prefix foo bar'. Reported by Ralf Corsepius. * tests/torture.at (Configuring subdirectories): Exercise these cases. 2002-09-09 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Use $srcdir when looking for a replacement file. * lib/autoconf/general.m4 (AC_CHECK_DECLS): Check that the directory is relative. * doc/autoconf.texi (Generic Functions): Clarify the replacement directory definition. Reported by Andreas Schwab and Jim Meyering. 2002-09-06 Akim Demaille * doc/autoconf.texi (Setting Output Variables): Clarify what precious variables are. Suggested by Pontus Skoeld. 2002-09-05 Akim Demaille * bin/Makefile.am (autoconf, autoheader, autoreconf, autoupdate) (ifnames, autoscan, autom4te): Since we don't only depend on configure.ac variables (such as VERSION etc.), but also on prefix and so forth, depend on Makefile, not configure.ac. Reported by Alexandre Duret-Lutz. * doc/autoconf.texi (Installation Directory Variables): Adjust. 2002-09-05 Kevin Ryde * doc/autoconf.texi (Limitations of Make): HP-UX trailing backslashes doesn't seem to be confined to ia64, just say "some versions". 2002-09-04 Akim Demaille * Makefile.am, doc/Makefile.am: Remove pdf targets, handled by Automake 1.6c. * Makefile.am (maintainer-clean-local): Remove. (MAINTAINERCLEANFILES): Remove COPYING. 2002-09-03 Paul Eggert * doc/autoconf.texi (Configuration Commands): Remove obsolete example for AC_CONFIG_COMMANDS_PRE. Problem reported by Marcus Brinkmann. 2002-09-03 Akim Demaille * configure.ac: Bump to 2.53d. * Makefile.am (AUTOMAKE_OPTIONS): Require 1.6c, i.e., CVS Automake as of today, on Automake's team suggestion. 2002-09-03 Akim Demaille Version 2.53c. 2002-09-02 Akim Demaille * bin/autom4te.in (parse_args): Don't honor AUTOM4TE_PATH and SITE_MACRO_DIR. * configure.ac: Disable SITE_MACRO_DIR. 2002-09-02 Jim Meyering * doc/autoconf.texi (AC_SYS_POSIX_TERMIOS): Reflect renaming: s/am/ac/, i.e., change am_cv_sys_posix_termios to ac_cv_sys_posix_termios. Also, tweak grammar: s/make sure to/be sure to/. 2002-09-02 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): Explain why logical directory names are generally preferable to physical names. 2002-09-02 Akim Demaille * lib/Autom4te/General.pm (&update_file): s/die/error/. Reported by Raja R. Harinath. * bin/autoheader.in, bin/autoreconf.in, bin/autoscan.in, * bin/autoupdate.in: Use error instead of die. 2002-09-01 Paul Eggert * tests/mktests.sh (ac_exclude_egrep, au_exclude_egrep): Use ordinary shell concatenation rather than echo+tr+sed command that runs afoul of a long-line-related sed bug in Solaris 8. * bin/autoheader.in (parse_args): --warning -> --warnings. * bin/autoconf.as: Work even if "ls" outputs "FOO not found" to stdout, as traditional "ls" does. * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): Likewise. * doc/autoconf.texi (Limitations of Usual Tools): Add "ls". * bin/autoconf.as: Add --prepend-include option. This patch was applied to bin/autoconf.in in the 2002-07-17 patch by Mark D. Roth, but bin/autoconf.in is generated automatically from bin/autoconf.as. * bin/autoconf.in, configure: Regenerate. * doc/autoconf.texi (Special Shell Variables): Mention ENV, MAIL, MAILPATH, PS1, PS2, PS4. Index PWD. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Unset ENV, MAIL, MAILPATH and set PS1, PS2, PS4 to default values, to work around bug in pre-3.0 UWIN ksh reported by Bruce Lilly. For LC_ALL etc, first try to set to "C" as POSIX requires and as the Autoconf documentation specifies; fall back to "unset" only if this fails. Use a shell for-loop for this rather than an m4 loop, to shorten the output script. 2002-08-30 Paul Eggert * doc/autoconf.texi (Special Shell Variables): Mention POSIX 1003.1-2001's requirements for CDPATH. Give a simpler workaround for the CDPATH problem. Document PWD. (Limitations of Builtins): Document the problem that "cd $foo" and "ls $foo" may refer to different directories in shells conforming to POSIX 1003.1-2001. Use PS1 rather than CDPATH for "unset" example, since the old example is now out of date. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Reject FOO if "cd FOO" and "ls FOO" talk about different directories; this catches problems when POSIX 1003.1-2001 "cd" fails due to symlink spaghetti. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use AS_UNSET instead of rolling our own unset. (_AS_PREPARE): $as_unset CDPATH instead of AS_UNSETting it, since in practice we needn't worry about CDPATH if unset doesn't work. * Makefile.in, aclocal.m4, bin/Makefile.in, config/Makefile.in, doc/Makefile.in, lib/Makefile.in, lib/Autom4te/Makefile.in, lib/autoconf/Makefile.in, lib/autoscan/Makefile.in, lib/autotest/Makefile.in, lib/emacs/Makefile.in, lib/m4sugar/Makefile.in, man/Makefile.in, tests/Makefile.in: Regenerate with Automake 1.6.3. * config/config.guess, config/config.sub, config/mkinstalldirs: Update. * configure: Regenerate with self. 2002-08-30 Kevin Ryde * doc/autoconf.texi (Limitations of Usual Tools): Notes on "cc" default output. 2002-08-29 Rainer Orth * bin/autom4te.in (Request::load): Correctly test for "do" read failure. 2002-08-29 Akim Demaille * lib/Autom4te/General.pm (&xqx): New. (&xsystem): Use WIFEXITED and WEXITSTATUS instead of decoding $? by hand, which is not portable. (&error): New. * bin/autom4te.in: Use them. Use &error instead of die. * tests/m4sugar.at (m4_warn, m4_require: circular dependencies): Adjust. 2002-08-17 Paul Eggert * lib/autoconf/fortran.m4 (AC_PROG_F77): Remove fc from the default list of compilers to try, since it was long ago superseded by the ksh fc builtin. Suggested by Steven G. Johnson. 2002-07-31 Alexandre Duret-Lutz * doc/autoconf.texi (Invoking autom4te): End the option table, fixing a bug introduced by the previous patch. (Limitations of Make): Add a 'target lookup' subentry in the 'VPATH' entry. Rewrite all `make' occurences as `@command{make}'. 2002-07-29 Mark D. Roth * bin/autom4te.in: Remove --include-envvar and --site-macro-subdir options and use $AUTOM4TE_PATH. * doc/autoconf.texi: Remove documentation of autom4te --include-envvar and --site-macro-subdir options and document use of $AUTOM4TE_PATH. * lib/autom4te.in: Remove --include-envvar and --site-macro-subdir arguments from each language section. 2002-07-29 Paul Eggert * doc/install.texi: Include copyright symbol in copyright notice. * Makefile.am (MAKEINFO): Remove; it's a user-specified macro. Replace with: (AM_MAKEINFOFLAGS): New macro. * doc/Makefile.am (MAKEINFO, AM_MAKEINFOFLAGS): Likewise. * Makefile.am (INSTALL): Use the new macros. Use -o rather than --output, since "missing" does not grok --output. 2002-07-25 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): Escaped newlines in comments do not always work. Never trust the exit status of `make -k'. 2002-07-24 Kevin Ryde * doc/autoconf.texi (Limitations of Make, Making testsuite Scripts): Untabify, since tabs are not enjoyed by texi2dvi and makeinfo. 2002-07-23 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): Use PATH="/nonexistent;.", not PATH=".;.", as FreeBSD ksh2002 apparently treats PATH="nonexistent" as if it contained ".". Bug reported by Stefan `Sec' Zehl. 2002-07-22 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): Mention the special handling of the obj/ directory by BSD make. 2002-07-20 Kevin Ryde * doc/autoconf.texi (Limitations of Make): Add HP-UX IA-64 trailing backslashes. 2002-07-19 Akim Demaille * doc/autoconf.texi (Function Portability): `exit'. (Programming in M4sh): Ethymology of M4sh. 2002-07-19 Akim Demaille * doc/autoconf.texi (AC_LIBOBJ vs LIBOBJS): More about $U. 2002-07-18 Akim Demaille Version 2.53b. 2002-07-18 Akim Demaille * config/config.guess, config/config.sub: Update. 2002-07-18 Akim Demaille Handle LIBOBJS and LTLIBOBJS once for all, including Libtool's and Automake's parts. * lib/autoconf/general.m4 (_AC_LIBOBJS_NORMALIZE): New. * lib/autoconf/status.m4 (AC_OUTPUT_COMMANDS_PRE): Call it. * tests/semantics.at (AC_REPLACE_FUNCS): Adjust. 2002-07-18 Akim Demaille , Alexandre Duret-Lutz * lib/autoconf/status.m4 (_AC_OUTPUT_HEADERS): Install _AC_AM_CONFIG_HEADER_HOOK for Automake 1.7. 2002-07-17 Russ Allbery * doc/autoconf.texi (Initializing configure): Clarify the description of the tarname default. 2002-07-17 Andreas Buening * lib/autoconf/functions.m4 (AC_FUNC_FORK): Don't set ac_cv_func_fork_works before running _AC_FUNC_FORK, do it if the latter was not run. 2002-07-17 Akim Demaille * lib/Autom4te/General.pm (find_file): Browse the directories in the order they are given. 2002-07-17 Akim Demaille * tests/wrapsh.as, tests/wrappl.as: Merge into... * tests/wrapper.as: this. * tests/Makefile.am, configure.ac: Adjust. 2002-07-17 Mark D. Roth * configure.ac: Add --enable-site-macro-dir option. * bin/Makefile.am: Expand @SITE_MACRO_DIR@. * bin/autom4te.in: Add --prepend-include, --include-envvar, and --site-macro-subdir options. * bin/autoconf.in: Add --prepend-include option. * bin/autoheader.in: Add --prepend-include option. * bin/autoreconf.in: Add --prepend-include option. * bin/autoscan.in: Add --prepend-include option. * bin/autoupdate.in: Add --prepend-include option. * doc/autoconf.texi: Document use of $AC_MACRO_PATH and site macro directory, remove note that include path directories are used in reverse order, and document --prepend-include option. * lib/autom4te.in: Use --prepend-include instead of --include. * tests/wrapsh.in: Use --prepend-include instead of --include. 2002-07-17 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): `_' is allowed in tarnames. * doc/autoconf.texi (Initializing configure): Adjust. 2002-07-17 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_REALLOC, _AC_FUNC_REALLOC) (_AC_FUNC_MALLOC): New. (AC_FUNC_MALLOC): Use the latter. Define HAVE_MALLOC to 0 if broken. * doc/autoconf.texi (Particular Functions): Adjust. 2002-07-16 Akim Demaille * lib/autoconf/c.m4 (AC_C_BACKSLASH_A): New. * doc/autoconf.texi (C Compiler): Adjust. 2002-07-09 Akim Demaille * doc/autoconf.texi: Properly set the ``header'' part. 2002-07-09 Akim Demaille * doc/autoconf.texi (Systemology): Some about Darwin. 2002-07-09 Alexandre Duret-Lutz * lib/autoconf/specific.m4 (AC_CYGWIN, AC_EMXOS2, AC_MINGW32): Don't use AC_REQUIRE in AU_DEFUN. 2002-07-09 Art Haas * doc/autoconf.texi: Use @enddots{} or @dots{} where appropriate. 2002-07-02 Alexandre Duret-Lutz * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, bin/autoupdate.in, bin/ifnames.in, lib/Autom4te/General.pm, lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Add local variables so that Emacs setups GNU style for perl-mode and cperl-mode. 2002-06-27 Paul Eggert * config/install-sh: Quote $src. Prefer || to test's -o option, as per "Limitations of Builtins". * tests/atspecific.m4 (AT_CHECK_ENV): Likewise, for && vs test -a. * tests/semantics.at (AC_C_BIGENDIAN): Likewise. * tests/mktests.sh: Use grep instead of fgrep, as per "Limitations of Builtins". 2002-06-15 Paul Eggert * tests/wrapsh.as (AUTOCONF, AUTOHEADER, AUTOM4TE, AUTOM4TE_CFG, autom4te_perllibdir): Set to top build dir or src dir as appropriate, so that we consistently test the just-built programs. * tests/wrappl.as: Likewise. 2002-06-12 Paul Eggert * bin/autoconf.as (AUTOM4TE): Default to a fully qualified path name, so that symlinks to 'autoconf' work properly. Bug reported by Bruno Haible. * bin/autoheader.in (AUTOM4TE): Likewise. * bin/autoreconf.in (autoconf, autoheader): Likewise. * bin/autoscan.in (autom4te): Likewise. * bin/autoupdate.in (autom4te): Likewise. * lib/autoconf/functions.m4 (_AC_LIBOBJ_FNMATCH): Also check for btowc, to fix a portability bug with diffutils-2.8.2/lib/fnmatch.c on Solaris 2.5.1. 2002-06-11 Andreas Schwab * doc/autoconf.texi: Add more dir entries. 2002-06-10 Alexandre Duret-Lutz * bin/autom4te.in ($cache): Don't define using `$me', the name of the cache should not depend on the name under which autom4te was installed. 2002-06-07 Akim Demaille * tests/tools.at (autoconf: forbidden tokens, basic) (autoconf: forbidden tokens, exceptions): Adjust to the change of words in autom4te.in. 2002-06-07 Peter Eisentraut * lib/autoconf/c.m4 (AC_LANG_PROGRAM(C)): Use _AC_LANG_PROGRAM_C_F77_HOOKS. 2002-06-07 Akim Demaille * lib/autoconf/functions.m4 (AC_REPLACE_FUNC_FNMATCH): Typo, rename as... (AC_REPLACE_FNMATCH): this. * tests/mktests.sh (exclude_list): Exclude AC_REPLACE_FNMATCH, AC_FUNC_FNMATCH_GNU. 2002-06-07 Akim Demaille * doc/autoconf.texi (Systemology): Point to Tru64 docs, and the Rosetta Stone for Unix. 2002-06-07 Akim Demaille * bin/autom4te.in (warn_forbidden): When rejecting a token, suggest m4_pattern_allow. Suggested by Adam J. Richter. 2002-06-07 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Initialize ac_config_libobj_dir. (AC_CONFIG_LIBOBJ_DIR): New. * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): Split into... (_AC_FUNC_FNMATCH_IF, _AC_LIBOBJ_FNMATCH): these. Use ac_config_libobj_dir to find the replacement files. (AC_FUNC_FNMATCH, AC_FUNC_FNMATCH_GNU): Split into... (AC_FUNC_FNMATCH, AC_FUNC_FNMATCH_GNU, AC_REPLACE_FNMATCH) (AC_REPLACE_FNMATCH_GNU): these. (AC_FUNC_GETLOADAVG): Use ac_config_libobj_dir. * doc/autoconf.texi (Particular Functions, Generic Functions): Adjust. * tests/mktests.sh (ac_exclude_list): Don't check AC_FUNC_GETLOADAVG as it requires getloadavg.c which is not shipped. 2002-06-06 Paul Eggert * lib/autoconf/status.m4 (_AC_OUTPUT_LINKS): Fall back on cp if ln doesn't work. * NEWS: Likewise. * doc/autoconf.texi (Configuration Links): Likewise. (Limitations of Usual Tools): Prefer $(LN_S) to ln -s || ln. 2002-06-05 Paul Eggert * config/config.guess, config/config.sub, config/texinfo.tex: Update from masters. 2002-05-29 Paul Eggert * bin/autom4te.in ($m4): Do not assume that egrep and fgrep exist. * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Likewise. * lib/autoconf/general.m4 (_AC_RUN_LOG_STDERR, AC_EGREP_CPP): Likewise. * lib/autoconf/Makefile.am (check-local): Likewise. * lib/autoconf/status.m4 (AC_CONFIG_HEADER): Likewise. * lib/autoconf/types.m4 (commentary only): Likewise. * lib/autotest/general.m4 (AT_INIT, AT_CHECK): Likewise. * lib/autotest/Makefile.am (check-local): Likewise. * lib/m4sugar/Makefile.am (check-local): Likewise. * tests/atspecific.m4 (AT_CONFIGURE_AC, AT_CHECK_DEFINES): Likewise. * tests/mktests.sh (egrep): New var; use it instead of plain egrep. * lib/autoconf/programs.m4 (AC_PROG_EGREP, AC_PROG_FGREP): New macros. * doc/autoconf.texi (Particular Programs): Document them. (Limitations of Usual Tools): Warn that egrep and fgrep may not exist. * NEWS: Likewise. 2002-05-27 Paul Eggert * lib/autoconf/types.m4 (AC_TYPE_MBSTATE_T): New macro. * NEWS, doc/autoconf.texi (Particular Types): Document it. * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): Require it instead of AC_MBSTATE_T, which never existed. 2002-05-23 Akim Demaille * doc/autoconf.texi (Hosts and Cross-Compilation): Specify the version of Autoconf that is discussed. 2002-05-22 Paul Eggert * lib/autoconf/fortran.m4 (AC_PROG_F77): Remove cf77 and cft77 from the default list of compilers to try. Suggested by Kate Hedstrom. * NEWS: Document the above. * doc/autoconf.texi (Fortran 77 Compiler): Don't suggest cf77. 2002-05-17 Paul Eggert * lib/autoconf/types.m4 (AC_CHECK_MEMBER): Work correctly even if the member is itself an aggregate. Bug reported by Sergey Poznyakoff. This improves on an earlier suggestion by H. Peter Anvin. 2002-05-16 Paul Eggert AC_FUNC_FNMATCH now tests only for POSIX compatibility. AC_FUNC_FNMATCH_GNU also tests for GNU extensions. Both macros now accept an optional source-dir arg. New macro AC_GNU_SOURCE to define _GNU_SOURCE. * NEWS: Document this. * doc/autoconf.texi (Particular Functions, UNIX Variants): Likewise. * lib/autoconf/functions.m4 (_AC_FUNC_FNMATCH): New macro. (AC_FUNC_FNMATCH): Use it. Test only for POSIX conformance, not for GNU extensions; this undoes part of the 2000-11-03 change, reverting to 2.13-compatible behavior. Add new optional argument DIR. (AC_FUNC_FNMATCH_GNU): New macro. * lib/autoconf/specific.m4 (AC_GNU_SOURCE): New macro. 2002-05-08 Paul Eggert * lib/autoconf/headers.m4 (AC_HEADER_TIOCGWINSZ): Don't require AC_SYS_POSIX_TERMIOS. The test is unnecessary, and it causes a 'test' syntax error if it fails. Bug reported by Stephen Gildea. * lib/autoconf/functions.m4 (AC_FUNC_SETVBUF_REVERSED): If prototypes are supported, use them to check this at compile-time, instead of trying to check it at run-time. If we must do a run-time check, assume that setvbuf is standard when cross-compiling, as nonstandard setvbuf occurs only on ancient and unlikely hosts. Bug reported by Paul D. Smith. * lib/autoconf/functions.m4 (AC_FUNC_GETLOADAVG): Add optional argument specifying location of getloadavg.c. This removes a FIXME. This idea was taken from Jim Meyering's implementation in textutils. * doc/autoconf.texi (Particular Functions): Document this. Also, mention HAVE_NLIST_H rather than NLIST_STRUCT, since that's what the code does; this fixes a bug reported by Paul D. Smith. 2002-05-03 Akim Demaille * bin/autoreconf.in (autoreconf): Rewrite to use Gettext's autopoint instead of gettextize. ($uses_alocal): Rename as... ($uses_aclocal): this. * doc/autoconf.texi (autoreconf Invocation): Adjust. Suggested by Bruno Haible. 2002-05-03 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_map_sep): New. 2002-04-29 Paul Eggert * bin/autoreconf.in (autoreconf): Don't age aclocal.m4's input files to be 1 second older; just set them to be the same time. Also, sleep 1 second after the first aclocal, to work around problems with sub-second time stamps on the input files. 2002-04-29 Thien-Thi Nguyen * doc/autoconf.texi: Mention "set -e -x" lossage under node "Limitations of Builtins". 2002-04-29 Akim Demaille * doc/install.texi: Better wording for setting variables when running configure. From Christian Cornelssen. 2002-04-29 Akim Demaille * tests/m4sh.at (LINENO): If testsuite itself is rewritten because of lack of $LINENO support, then the test will compare the $LINENO in testsuite vs. the lineno in the test file. This is wrong, of course. Be sure to protect it. Reported by Patrick Welche. 2002-04-25 Akim Demaille * doc/autoconf.texi (Obsolete Macros): Typo. Reported by Vladimir Volovich. 2002-04-25 Akim Demaille * bin/autoreconf.in (autoreconf): Don't let aclocal.m4 be older than some of the input files, hence, on the second run of aclocal, if some of its input are younger, make them older. Suggested by Paul Eggert. 2002-04-25 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools): sed and `!'. Thanks to Paul Eggert. 2002-04-25 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Let ac_subst_files and ac_subst_vars be sh variables containing the list of AC_SUBST_FILES'ed and AC_SUBST'ed identifiers. Output them in the DEFAULT diversion. (_AC_INIT_PREPARE): Use them to log them. (_AC_SUBST, _AC_SUBST_SED_PROGRAM): Remove. (AC_SUBST, AC_SUBST_FILE): Instead of buliding the _AC_SUBST_SED_PROGRAM, store the list of output files/variables in _AC_SUBST_FILES and _AC_SUBST_VARS. * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Adjust. 2002-04-24 Akim Demaille * bin/autoreconf.in (autoreconf): Run automake after autoconf and autoheader, so that automake does not complain about a missing config.h.in that was to be created. 2002-04-23 Akim Demaille * bin/autoheader.in (parse_args): --warning takes an argument. Fixes PR/220. 2002-04-22 Peter Eisentraut * lib/autoconf/general.m4 (_AC_RUN_IFELSE): Remove gmon.out and bb.out when cleaning up. 2002-04-22 Akim Demaille Version 2.53a. 2002-04-22 Akim Demaille * tests/m4sh.at (LINENO): Fix the Zsh skip pattern. 2002-04-22 Akim Demaille * doc/autoconf.texi (Pretty Help Strings): Remove a spurious comma. Reported by Gregory Giannoni. 2002-04-22 Akim Demaille * tests/m4sh.at (LINENO): Skip the test if LINENO cannot be unset. Fixes false failures on Darwin. 2002-04-21 Paul Eggert * TODO, bin/autoupdate.in, doc/autoconf.texi, lib/autoconf/general.m4, lib/autoconf/libs.m4, lib/autoconf/status.m4, lib/m4sugar/m4sugar.m4, tests/m4sh.at, tests/tools.at: Minor spelling and grammar fixes. 2002-04-20 Paul Eggert * doc/autoconf.texi (Shell Substitutions): Fix typos in yesterday's ZSH_VERSION fixes. Bug reported by Raja R Harinath. * lib/autotest/general.m4 (AT_INIT): Likewise. * tests/atgeneral.m4 (AT_INIT): Likewise. 2002-04-19 Paul Eggert * NEWS, TODO, bin/autom4te.in, bin/autoreconf.in, bin/autoupdate.in, doc/autoconf.texi, lib/freeze.mk, lib/Autom4te/Struct.pm, lib/autoconf/autoheader.m4, lib/autoconf/c.m4, lib/autoconf/functions.m4, lib/autoconf/general.m4, lib/autoconf/lang.m4, lib/autoconf/libs.m4, lib/autoscan/identifiers, lib/autotest/general.m4, lib/m4sugar/m4sh.m4, tests/atgeneral.m4, tests/atspecific.m4, tests/semantics.at, tests/torture.at: Minor spelling and grammar fixes. * doc/autoconf.texi: Follow the outline suggested in the GNU Sample Texts sections of the Texinfo 4.2 manual. Most importantly, this makes sure that the copyright notices appear in all output formats. You probably need Texinfo 4.2 to generate the manual now. Fix some bugs when using "$@" when there might be zero positional arguments in cases where this matters. * bin/autoconf.as: Rewrite so that the problem does not come up. * lib/autoconf/programs.m4 (AC_CHECK_PROG): Likewise. * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. * lib/autotest/general.m4 (AT_INIT): Likewise. * bin/autoheader.in: Use 'case' statement to work around problem. * bin/auto4mte.in: Likewise. * bin/autoreconf.in: Likewise. * bin/autoscan.in: Likewise. * bin/autoupdate.in: Likewise. * bin/ifnames.in: Likewise. * doc/autoconf.texi (Shell Substitutions): Document the problem. * lib/autotest/general.m4 (AT_INIT): Use Zsh alias to work around problem. * tests/atgeneral.m4 (AT_INIT): Likewise. * tests/c.at: We can't have zero arguments, so remove workaround that is not portable to Zsh. 2002-04-19 Alexandre Duret-Lutz * bin/autoupdate.in (handle_autoconf_macros): Honor AU_DEFUNs from aclocal.m4 too. 2002-04-12 Akim Demaille * tests/wrappl.as: New, M4sh precursor of wrappl.in. 2002-04-10 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Install the Zsh workaround for ${1+"$@"}. * doc/autoconf.texi (Shell Substitutions): Explain it. From Oliver Kiddle and Peter Stephenson. Have M4sh perform minimal shell sanitizing. * lib/m4sugar/m4sh.at (AS_SHELL_SANITIZE): Split the `_AS_PREPARE_*' part into... (_AS_PREPARE): this new macro. (AS_PREPARE): New. (AS_INIT): Invoke AS_SHELL_SANITIZE. * tests/m4sh.at (AT_DATA_LINENO): Use _AS_PREPARE. Adjust Autoconf and Autotest. * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Don't invoke AS_SHELL_SANITIZE, AS_INIT did it, but invoke AS_PREPARE. * lib/autotest/general.m4 (AT_INIT): Likewise. * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Invoke _AS_PREPARE (not AS_PREPARE) in addition to AS_SHELL_SANITIZE. Use this M4sh to generate Autoconf's shell scripts. * tests/wrapsh.as: New, precursor of wrapsh.in. * tests/Makefile.am: Include lib/freeze.mk to get the dependencies on Autotest and M4sh. ($(TESTSUITE)): Use $(autotest_m4f_dependencies). (wrapsh.in): New target. * bin/autoconf.as: New, precursor of autoconf.in. (autoconf.in): New target. 2002-04-09 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): Mention the issue with indented comments in rules. 2002-04-09 Andreas Schwab * lib/autoconf/status.m4 (_AC_SRCPATHS): Handle empty ac_top_builddir when setting ac_abs_top_builddir. 2002-04-06 Kevin Ryde * doc/autoconf.texi (Systemology): Add link to Unix V7 online docs. (Portable Shell): Cross reference to Systemology. 2002-04-05 Akim Demaille * bin/autoreconf.in (autoreconf): Be sure to accumulate the directories when descending in a SUBDIRS. Reported by Ezra Peisach. 2002-04-04 Andreas Schwab * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Only simplify if path contains no literal separators. 2002-04-03 Akim Demaille * lib/autoconf/status.m4 (_AC_CONFIG_FILE, _AC_CONFIG_HEADER) (_AC_CONFIG_COMMAND, _AC_CONFIG_LINK): New. Use dnl, not the KILL diversion. Extracted from... (AC_CONFIG_FILES, AC_CONFIG_HEADERS, AC_CONFIG_COMMANDS) (AC_CONFIG_LINKS): here. Adjust. Don't use the KILL diversion, as it kills spurious output, which results in failures being hidden. Use m4_defn where appropriate. (AC_CONFIG_IF_MEMBER): Kill the real bug: a spurious parenthesis after the second argument. Use m4_defn. * lib/autom4te.in (Autoconf, Autotest, M4sh): Don't pass --warning syntax, as it is provided by M4sugar. * tests/torture.at (Multiple AC_CONFIG_FILES): New. 2002-04-03 Andreas Schwab * lib/m4sugar/m4sugar.m4 (m4_bmatch): Make sure m4_bregexp is not expanded if $# <= 2. * bin/autoreconf.in (autoreconf): Run automake after rerunning aclocal. 2002-04-03 Akim Demaille * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT_REJECT) (_AC_COMPILER_EXEEXT_REJECT): New. Also recognize *.bb and *.bbg as compilation byproducts. (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O) (_AC_COMPILER_OBJEXT): Use them. Fixes Debian #138666. 2002-04-02 Peter Eisentraut Integrate AC_PROG_CC_STDC into AC_PROG_CC. * lib/autoconf/c.m4 (AC_PROG_CC_STDC): Rename to _AC_PROG_CC_STDC. AU_DEFUN old name. Use _AC_COMPILE_IFELSE. (AC_PROG_CC): Call _AC_PROG_CC_STDC. (AC_C_INLINE): Do not require AC_PROG_CC_STDC. (AC_C_CONST): Same. (AC_C_INLINE): Same. (AC_C_PROTOTYPES): Same. Require AC_PROG_CC instead. * doc/autoconf.texi, NEWS: Document. * tests/mktests.sh (au_exclude_list): Add AC_PROG_CC_STDC and AC_C_CROSS. 2002-04-02 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Invoke _AS_MKDIR_P_PREPARE. 2002-03-28 Kevin Ryde * lib/autoconf/c.m4 (AC_C_INLINE): Test with a typedef return value, to avoid versions of HP C which don't allow that. 2002-03-27 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_BASENAME_PREPARE): New macro. (AS_SHELL_SANITIZE): Invoke it. (AS_BASENAME): AS_REQUIRE it, and use $as_basename. 2002-03-26 Akim Demaille * doc/autoconf.texi (Portable Shell): Add pointers to FAQs. 2002-03-26 Akim Demaille * doc/autoconf.texi (Introduction): The GNATS base moved. 2002-03-25 Paul Eggert * tests/m4sh.at: Don't rely on "PATH=test:$PATH test-1" working as POSIX requires, as it doesn't work with Zsh. * doc/autoconf.texi (Assignments): Document the problem. 2002-03-25 Alexandre Duret-Lutz * doc/autoconf.texi (Limitations of Make): Mention more issue about VPATH, overriding of macros in sub-makes, and handling of SHELL. 2002-03-21 Paul Eggert * doc/autoconf.texi (Here-Documents): Mention Solaris 8 dtksh problem with here-document buffer boundaries. * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Unset ENV and BASH_ENV when reinvoking the shell, to work around problems with installers who put strange things like "cd" commands in their environments. 2002-03-19 Akim Demaille * tests/semantics.at (AC_C_BIGENDIAN): s/unknow/unknown/. From Aaron Ucko. 2002-03-19 Akim Demaille * bin/autoscan.in (scan_file): Specify the location in `&used' invocations. From Nicolas Joly. 2002-03-19 Akim Demaille * doc/autoconf.texi: Adjust @code/@command, @xref/@ref usage. From Nishio Futoshi. 2002-03-19 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_define_default, m4_fst, m4_map): New. 2002-03-18 Paul Eggert * doc/autoconf.texi (Programming in M4sh): Add AS_MKDIR_P. (Limitations of Usual Tools): Add mkdir section. * lib/m4sugar/m4sh.m4 (_AS_MKDIR_P_PREPARE): New macro. (AS_MKDIR_P): Require it. Use mkdir -p if available, falling back on AS_DIRNAME to compute prefixes otherwise; this is roughly what mkinstalldirs does. That way, we need not have our own filename disassembler. The old disassembler did not work with Solaris 8 dtksh, which is ksh Version M-12/28/93d. * lib/autotest/general.m4 (AT_INIT, AT_CLEANUP): Create at_test_all by a series of assignments, not by a single assignment of a long string. The latter causes ksh version 11/16/88g to silently misbehave on OpenServer 5.0.6a, presumably because of a buffer overrun. 2002-03-14 Paul Eggert * lib/autotest/general.m4 (at_times_skip): Renamed from at_times. Now a boolean. ksh93 Version M-12/28/93d doesn't like 'x=times; $x'; it says 'times: not found'. 2002-03-14 Akim Demaille * bin/autoreconf.in (&study_gettextize): New. (&autoreconf): Handle newest gettextize. Rerun aclocal if needed. Suggested by Andreas Schwab. 2002-03-13 Akim Demaille * doc/autoconf.texi (Special Shell Variables): More about IFS. 2002-03-13 Akim Demaille * doc/autoconf.texi (Header Portability): New. Add information about stdint.h and inttypes.h from Paul Eggert. 2002-03-13 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools): Some about `cp -p'. From Bob Proulx. 2002-03-12 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_BASENAME_EXPR): AS_REQUIRE, not m4_require. 2002-03-11 Andreas Schwab * configure.ac: Explicitly check for EMACS since AM_PATH_LISPDIR does not do it if --with-lispdir is given. 2002-03-08 Akim Demaille Version 2.53. 2002-03-08 Akim Demaille * doc/autoconf.texi (Subdirectories): Clarify that the subdirectory should exist. 2002-03-08 Akim Demaille * Makefile.am (AUTOMAKE_OPTIONS): 1.6. 2002-03-08 Akim Demaille * bin/autom4te.in (&handle_m4): Do not foreach with `$_' as it aliases the actual variables, and modifications of the former affect the latter. 2002-03-08 Akim Demaille * bin/autom4te.in (&handle_m4): Protect us from corrupted file because of C-c: have m4 output in tmp files, then mv them. 2002-03-08 Akim Demaille * bin/autoconf.in, bin/autoheader.in, bin/autom4te.in, * bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in, * bin/ifnames.in: Copyright update. 2002-03-08 Akim Demaille * doc/autoconf.texi (Invoking autom4te): New. 2002-03-05 Akim Demaille * doc/autoconf.texi (Specifying Names): Clarification suggested by Kevin Ryde. 2002-03-05 Akim Demaille Version 2.52i. 2002-03-04 Akim Demaille * doc/autoconf.texi (AC_LIBOBJ vs. LIBOBJS): New. * lib/autoconf/general.m4 (AC_INIT): More informative error message for LIBOBJ. 2002-03-04 Akim Demaille * lib/freeze.mk ($(build_libdir)/m4sugar/version.m4): New, for parallel builds. 2002-03-04 Akim Demaille * doc/autoconf.texi (Transforming Names): Equality between target and host is irrelevant. (Specifying Names, Canonicalizing): Remove all references to the backward compatibility hooks. Rather, collect them all into... (Hosts and Cross-Compilation): this new section. * doc/install.texi (System Type): Ditto. * lib/autoconf/general.m4 (AC_CANONICAL_HOST): Explicitly state that `--host' implies cross-compilation. 2002-03-04 Akim Demaille * doc/autoconf.texi (Evaluation Macros): New. * lib/m4sugar/m4sugar.m4 (m4_lquote): Remove, it is totally useless. (_m4_foreach): Define the variant with immediate evaluation so that it contains exactly the items, not an expression which evaluation is the current item. (m4_re_string, m4_re_word): Don't over quote them. 2002-03-04 Akim Demaille Instead of having stacking `shift's evaluated at the end, let `foreach' loops immediately evaluate them. * lib/m4sugar/m4sugar.m4 (m4_quote, m4_dquote): Use $@ rather than $*. This is the n-th time I change my mind, but hopefully this is the last... (m4_lquote): New. (m4_text_wrap): Use m4_foreach, which is finally correct _and_ efficient. (m4_foreach_quoted, m4_car_quoted, _m4_foreach_quoted): Remove, as it was only a hack for m4_text_wrap. (m4_car2): Remove, replaced by... (m4_cdr): New. (_m4_foreach): Adjust. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust, and use m4_bpatsubst for clarification. 2002-03-04 Akim Demaille * doc/autoconf.texi (Changequote is Evil): New. 2002-03-03 Kevin Ryde * doc/autoconf.texi (Portable Shell): Mention 32-byte #! length limit on old systems like SunOS. 2002-03-01 Peter Eisentraut * lib/autoconf/c.m4, lib/autoconf/fortran.m4, lib/autoconf/functions.m4, lib/autoconf/general.m4, lib/autoconf/headers.m4, lib/autoconf/lang.m4, lib/autoconf/programs.m4, lib/autoconf/status.m4: Improve spelling of messages. 2002-02-28 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Suggest a title to the message to be sent. 2002-02-28 Kevin Ryde * doc/autoconf.texi (Function Portability): Add va_copy and va_list. 2002-02-25 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_SETPGRP): Fix the test. From Akinori Musha. 2002-02-13 Alexandre Duret-Lutz * lib/Autom4te/XFile.pm (getline, getlines): New functions, translate \r\n to \n. 2002-02-07 Akim Demaille Version 2.52h. 2002-02-07 Akim Demaille Fix Autoconf PR/209. Also reported by Frank Denis. * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Don't over quote. 2002-02-07 Akim Demaille Fix Autoconf PR/207: AC_PREFIX_PROGRAM fails with dashed program names * lib/autoconf/general.m4 (AC_PREFIX_PROGRAM): Just use a fresh variable when looking for the prefix program. Now it also works for shell variables. 2002-02-07 Akim Demaille * doc/autoconf.texi (Limitations of Builtins): More about case/esac. 2002-02-06 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_COMMANDS): Don't output empty case/esac, some shells don't support it. Reported by Zack Weinberg. * tests/torture.at (AC_CONFIG_COMMANDS with empty commands): New. 2002-02-06 Akim Demaille * lib/autotest/general.m4 (AT_INIT): When handling --keywords, be sure not to introduce newlines in at_groups. * lib/autotest/Makefile.am (autotest.m4f): Typo. 2002-02-06 Akim Demaille * tests/torture.at (Configuring subdirectories): Skip if aclocal is not available. 2002-02-05 Paul Eggert * doc/autoconf.texi (Specific Compiler Characteristics): Describe HP-UX cc bug workaround more accurately. * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Cast to long, not unsigned long. * tests/semantics.at (AC_CHECK_SIZEOF): Check non-GCC cross-compilers, too. This undoes some of the most recent change to this file. 2002-02-05 Akim Demaille * tests/Makefile.am (check_SCRIPTS): Use it, instead of WRAPPERS, to make sure they are up to date when `check' is run. 2002-02-05 Akim Demaille * doc/autoconf.texi (Making testsuite Scripts): Document package.m4. 2002-02-05 Akim Demaille * lib/freeze.mk: New. 2002-02-05 Akim Demaille Implement `autom4te --freeze'. * bin/autom4te.in (&freeze): New. * lib/autoconf/autoconf.m4, lib/autotest/general.m4, * lib/m4sugar/m4sh.m4: Don't include files given by autom4te. 2002-02-05 Akim Demaille * bin/autom4te.in (&parse_args): Implement `frozen files are optional are the sum of the previous files on the command line'. Also, pass `--reload-state=' on them, so... (handle_m4): don't. * lib/autom4te.in (Autotest, Autoconf): Rely on M4sh. (M4sh): Rely on M4sugar. (Autotest, M4sh, M4sugar): Use frozen files. 2002-01-31 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Accept $4. * doc/autoconf.texi (Initializing configure): Adjust. 2002-01-30 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Map non alphanumeric to `-' instead of `_'. 2002-01-30 Akim Demaille * tests/semantics.at (AC_CHECK_SIZEOF): Split into two tests: one for plain code, the other for cross-compilation code. The latter is now run with GCC only. * doc/autoconf.texi (Compilers and Preprocessors): New. 2002-01-30 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Support pre-defined values. * doc/autoconf.texi (Initializing configure): Explain how to change AC_INIT default values. 2002-01-29 Akim Demaille * tests/torture.at (Configuring subdirectories): Use configure.in, so that aclocal 1.4 works. Reported by Alexandre Duret-Lutz and Larry Schmitt. 2002-01-28 Akim Demaille * doc/autoconf.texi (Writing testsuite.at): AT_CLEANUP no longer needs an argument. 2002-01-28 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Don't be ridiculous: adjust AUTOTEST_PATH *after* it was set. Don't put `.' in the PATH: the user should be precise and `./' if needed. In addition, given that the test suite does some `cd', if `.' is in the path, the `tested programs' sections will report programs found in the test suite's directory, while during the tests (performed in their own directory), these programs are no longer visible. In other words, the results is confusing and useless. * tests/m4sh.at: Adjust: don't rely on `.' being in the PATH. 2002-01-24 Akim Demaille Version 2.52g. 2002-01-24 Akim Demaille * bin/autoheader.in, bin/autoconf.in, bin/autoscan.in, * doc/autoconf.texi: Finally add Akim as an author. 2002-01-24 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Use PATH_SEPARATOR. (_AS_PATH_SEPARATOR_PREPARE): Don't expect $SHELL to be Bourne. Use /bin/sh. From Andreas Buening. 2002-01-24 Akim Demaille * config/config.guess, config/config.sub, config/texinfo.tex: Update from masters. 2002-01-24 Akim Demaille * Makefile.am (AUTOMAKE_OPTIONS): 1.5b. * config/auxdir.m4, config/cond.m4, config/depend.m4, * config/init.m4, config/install-sh.m4, config/lispdir.m4, * config/missing.m4, config/sanity.m4, config/select.m4, * config/strip.m4: Remove, to ease sync'ing with any version of Automake. 2002-01-24 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS) (_AC_INIT_PREPARE): Support -n as --no-create, as documented. Reported by Geir Ove Myhr. 2002-01-21 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_MMAP): #Undef malloc. 2002-01-21 Akim Demaille * lib/Autom4te/General.pm (getopt): Use a more GNUish error message on invalid options. * bin/autom4te.in (parse_args): Don't use Autoconf::General::getopt with non valid options. 2002-01-17 Jim Meyering * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Initialize $ac_cv_exeext so we don't use an old, invalid, cached value. 2002-01-11 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_STRNLEN): New, from Jim Meyering. * doc/autoconf.texi (Function Portability): Document the strnlen limitation. (Particular Functions): Document AC_FUNC_STRNLEN. * lib/autoscan/functions: Adjust. 2002-01-06 Akim Demaille * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't create package.m4, since is really depends upon configure.ac, not configure. * doc/autoconf.texi (testsuite Scripts): Adjust. * tests/Makefile.am (package.m4): New. EXTRA_DIST it since its a source. 2002-01-06 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Move the AC_SUBST of PACKAGE_NAME, PACKAGE_TARNAME, PACKAGE_VERSION, PACKAGE_STRING, and PACKAGE_BUGREPORT from here... (_AC_INIT_DEFAULTS): to here, since it is unrelated to the arguments. (_AC_INIT_PREPARE): AC_DEFINE these symbols. * lib/autotest/general.m4: Use AT_PACKAGE_*, not PACKAGE_*. (AT_INIT): No longer catch `^PACKAGE_(BUGREPORT|STRING)$'. * tests/tools.at (autoheader): Adjust. * tests/atspecific.m4 (AT_CHECK_DEFINES): Adjust. 2002-01-06 Akim Demaille * bin/autoscan.in (scan_file): Use `&used'. 2002-01-03 Akim Demaille * doc/autoconf.texi (Output): Improved wording regarding use of AC_OUTPUT. From Olly Betts. 2001-12-18 Kevin Ryde * doc/autoconf.texi (Function Portability): Add notes on sscanf sometimes needing writable input. 2001-12-17 Jim Meyering * doc/autoconf.texi (New Macros): Tweak wording. 2001-12-14 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PREPARE): We cleaning up the trailing files, don't apply `-rf' to files which might not be created by configure (core, core.*, and *.core), but just `rm -f'. Suggested by Jonathan Kamens. 2001-12-14 Aaron M. Ucko * lib/autoconf/general.m4: Avoid duplicates in `$ac_configure_args'. 2001-12-14 Akim Demaille * Makefile.am (MAINTAINERCLEANFILES): Remove configure. 2001-12-13 Peter Eisentraut * lib/autoconf/status.m4 (_AC_SRCPATHS): Rename buildpath to abs_builddir, top_buildpath to abs_top_builddir, srcpath to abs_srcdir, top_srcpath to abs_top_srcdir. (_AC_OUTPUT_FILES): Adjust. * NEWS, doc/autoconf.texi, lib/autoconf/autotest.m4, * tests/atspecific.m4, tests/autoreconf.in, tests/tools.at, * tests/wrappl.in, tests/wrapsh.in: Adjust. 2001-12-12 Steven G. Johnson * lib/autoconf/fortran.m4 (_AC_PROG_F77_V_OUTPUT): Fix failed C/Fortran linking on HP/UX, by extracting the Fortran library search path from the LPATH line in the $F77 -v output. 2001-12-12 Kevin Ryde * doc/autoconf.texi (File Descriptors): Use a clearer layout for the forbidden file descriptors table. 2001-11-26 Akim Demaille * bin/autoscan.in (%c_keywords): Build it at top level. Map to 1 in order to simplify its uses. 2001-11-26 Akim Demaille * bin/autoscan.in (&scan_c_file, &scan_sh_file, &scan_makefile): Remove $filepath, useless. (&scan_makefile): Don't remove the $(FOO), ${FOO} and @FOO@ variables, they are really part of the tokens. Split the input line on spaces and then look for tokens. Now autoscan ceases to ask for AC_PROG_LEX for the package Bison because of `lex$U.$(OBJEXT)'. (&scan_files): Use "@list" instead of join. * doc/Makefile.am (CLEANFILES): Add *.fns. 2001-11-26 Akim Demaille * tests/autoreconf.in, tests/autom4te.in, tests/autoupdate.in: Remove, replaced by... * tests/wrappl.in: Be common for all the Perl executables. In particular autoscan and autoheader want -I. * configure.ac: Adjust. * lib/autoscan/headers: errno.h is portable. 2001-11-26 Akim Demaille * bin/autoscan.in (used): New. Use it. 2001-11-26 Akim Demaille * bin/autoscan.in (&scan_c_file): Better parsing of CPP directives. (&scan_sh_file): Remove a duplicate pattern. (&check_configure_ac): Use long options. * lib/autoscan/headers (alloca.h): Check with AC_FUNC_ALLOCA. 2001-11-26 Akim Demaille * bin/autoscan.in (scan_c_file): Fix the handling of C comments. Before, having a line containing the opening of a multi line comment made the whole line be ignored. 2001-11-26 Akim Demaille * doc/autoconf.texi (Using an Autotest Test Suite): New. (testsuite Scripts): Be one of its subsection. (Autotest Logs): New. 2001-11-26 Akim Demaille Test groups are now run two directories deeper. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Replace srcdir, top_srcdir and top_builddir with at_srcdir, at_top_srcdir and at_top_builddir. * lib/autotest/general.m4 (AT_INIT): Compute srcdir, top_srcdir, builddir and top_builddir. Use `at_*dir' relatively to the directory containing the suite, use `*dir' when relatively to the current group dir. 2001-11-25 Joseph S. Myers * doc/autoconf.texi, TODO, lib/autoconf/fortran.m4, lib/autoconf/functions.m4, lib/autoconf/headers.m4, tests/atgeneral.m4, tests/tools.at, tests/atspecific.m4: Fix spelling errors. 2001-11-22 Alexandre Duret-Lutz * doc/autoconf.texi (Using System Type): Add an example of `case $host' usage so people quit using `case $target' everywhere. 2001-11-22 Akim Demaille * doc/autoconf.texi (Installation Directory Variables): Englishoes spotted by Jim Meyering. 2001-11-16 Paul Eggert This patch implements a `long double' suggestion by Oliver Kiddle. * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Make the array static, to catch errors if the value isn't known at compile-time and the compiler supports dynamic arrays. Change its name from `_array_' to `test_array' to avoid potential name clashes. (AC_C_LONG_DOUBLE): Make it a compile-time test, not a run-time test. Do not define HAVE_LONG_DOUBLE if `long double' is no better than double. Catch a bug in GCC 2.95.2 x86. * doc/autoconf.texi (C Compiler): Document the above. * NEWS: Likewise. 2001-11-13 Akim Demaille * tests/m4sh.at (LINENO): Protect from autom4te's substitution by hand. * tests/tools.at: Don't protect dnl, AT_DATA_M4SH does. 2001-11-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): After having run the test group, go back to the initial directory, not to at_suite_dir. 2001-11-13 Akim Demaille * tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH) (AT_DATA_AUTOCONF): Also protect @&t@ from autom4te. (AT_CHECK_AUTOCONF, AT_CHECK_AUTOHEADER): Pass no --include option. (AT_CHECK_CONFIGURE): Use absolute paths. (_AT_CHECK_AC_MACRO): Create aclocal.m4 with AC_STATE_SAVE in it. The problem is still the old one: there is no means in M4 (that I know about) to create a defining macro, because there is no means to create `$1' etc., therefore, the defining macro ``swallows'' all the arguments meant to the defined macro. 2001-11-13 Akim Demaille * tests/atspecific.m4 (AT_DATA_AUTOCONF): New. (AT_CONFIGURE_AC): Output the definition of AC_STATE_SAVE in configure.ac. * tests/aclocal.m4: Remove, as it is no longer used. 2001-11-13 Akim Demaille * lib/autotest/general.m4: Change `tests?' into `groups?' in variable names when referring to a single test group, or to `suite' when referring to the whole test suite. `at_last_test' is removed: m4 compute at_format itself. (at_stdout, at_stder1, at_stderr): New variables. (AT_CHECK): Use them. 2001-11-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Be sure to put `.', relative, in PATH. Create `testsuite.dir/003/run' instead of `testsuite.003'. Do it as soon as a test fails, don't wait till the end of the test suite. Don't remove $as_me.[0-9]*, since these files no longer exist. 2001-11-13 Akim Demaille * tests/tools.at: Use absolute paths, since we are no longer run in place. 2001-11-13 Akim Demaille Now that tests are running in their own private dir, there is no need to list the files to remove at the end of tests groups. * lib/autotest/general.m4 (_AT_CLEANUP_FILE, AT_CLEANUP_FILES): (AT_data_files, at_data_files): Remove. (AT_CLEANUP, AT_DATA): Simplify. (AT_INIT): Adjust. Remove the group dir if !debug && !failed. * tests/atspecific.m4: Adjust. 2001-11-13 Akim Demaille Start a new layout for Autotest: `testsuite' creates `testsuite.dir' in which the at-check-line etc. files are to be found, and `testsuite.dir/003' where the test group 3 is run. * lib/autotest/general.m4 (AT_INIT): at_tests_dir, at_check_line_file, at_format, at_test_normalized, at_group_dir are new variables. Create the directories. Use absolute paths for at- files. (AT_CHECK): Adjust. 2001-11-11 Michael Matz * m4sugar.m4 (_m4_foreach): Make it linear instead quadratic. (m4_car2): New. (m4_car): Properly quote arguments. 2001-11-13 Akim Demaille * tests/aclocal.m4 (AC_STATE_SAVE): s/LIBOBJS/LIB@&t@OBJS/ to cope with stricter rules on LIBOBJS. 2001-11-12 Paul Eggert * lib/autoconf/c.m4 (AC_C_PROTOTYPES): Define __PROTOTYPES too. * doc/autoconf.texi (C Compiler): AC_C_PROTOTYPES now defines __PROTOTYPES too. 2001-11-12 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_GETMNTENT): Use AC_CHECK_FUNCS. 2001-11-12 Akim Demaille * lib/autoconf/c.m4, lib/autoconf/fortran.m4, * lib/autoconf/functions.m4, lib/autoconf/general.m4, * lib/autoconf/headers.m4, lib/autoconf/libs.m4, * lib/autoconf/programs.m4, lib/autoconf/specific.m4, * lib/autoconf/types.m4: When invoking AC_DEFINE and friends, specify to what the macro should be defined (typically to 1). 2001-11-12 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_STRTOD): AC_SUBST POW_LIB. From Jim Meyering. 2001-11-12 Akim Demaille * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Use AC_TRY_EVAL to run $LEX, not AC_TRY_COMMAND. This validates the definition used by Automake where LEX is +/- "${missing} lex" and `missing' itself contains variables. 2001-11-12 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Push KILL at the end. Now that M4sh pushes BODY, the comments were output at the end of the test suites. 2001-11-08 Akim Demaille * bin/autoreconf.in (&autoreconf): Run aclocal before tracing, so that we can trace macros from aclocal.m4. Trace AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL, since the latter is obsoleted, and redirect to the former anyway. Reported by Ralf Corsepius. 2001-11-08 Akim Demaille * bin/autoreconf.in (&autoreconf): AC_CONFIG_SUBIDRS are to be processed only if present. * tests/torture.at (Configuring subdirectories): Use autoreconf instead of successive calls to autoconf. Add a nonexistent subdirectory to exercise the patch above. Reported by Ralf Corsepius. 2001-11-08 Kevin Ryde * doc/autoconf.texi (Limitations of Usual Tools): Note HP-UX cc doesn't accept .S files. 2001-11-07 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_pattern_forbid): Accepts $2. * lib/autoconf/general.m4 (AC_INTI): Forbid LIBOBJS. (_AC_LIBOBJ): s/LIBOBJS/LIB@&t@OBJS/. * bin/autom4te.in (warn_forbidden): New. (handle_output): Use it. Read m4_pattern_forbid with messages. 2001-11-05 Akim Demaille * bin/autom4te.in (--normalize): Remove. * lib/autom4te.in: Adjust. 2001-11-05 Akim Demaille * tests/Makefile.am (testsuite): Rename this target as... ($(TESTSUITE)): this. From Nicolas Joly. 2001-11-05 Alexandre Duret-Lutz * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS): When removing the --prefix option, also remove it's argument. 2001-11-05 Akim Demaille * doc/autoconf.texi (testsuite Invocation): Update. (Writing testsuite.at): Update. 2001-11-03 Akim Demaille * doc/autoconf.texi: s/@code/@command/ where appropriate. 2001-11-03 Akim Demaille * lib/Autom4te/General.pm: (&catfile, &canonfile) (&file_name_is_absolute): New, wrappers around routines from File::Spec. Use and export them. (&find_configure_ac): Optionally take a directory where to look at. * bin/autoreconf.in (&parse_args): Trim the configure.ac part of the arguments. Default @ARGV to `.', not find_configure_ac. (&autoreconf): Argument is a directory. Trace AC_CONFIG_SUBDIRS and schedule the subdirs for autoreconf'ing. * doc/autoconf.texi (autoreconf Invocation): Update. 2001-11-03 Akim Demaille * lib/Autom4te/General.pm (@export_vars, @export_subs) (@export_forward_subs): New. Add basename, dirname, and fileparse. (@EXPORT): Adjust. * bin/autoreconf.in (&autoreconf): Fix call to fileparse. Don't look for aclocal flags if we already know aclocal is not used. Move aclocal.m4t only if it exists. Reported by Ezra Peisach. 2001-11-03 Akim Demaille * bin/autoreconf.in (&parse_args): Work only on the configure.ac passed on command line, defaulting to ./configure.ac if present. (&maybe_autoreconf, File::Find): Remove, unused. (&autoreconf): If autoconf is not used, don't try to trace. 2001-11-02 Akim Demaille * configure.ac: Bump to 2.52g. 2001-11-02 Akim Demaille Version 2.52f. 2001-11-02 Akim Demaille * config/config.guess, config/config.sub, doc/standards.texi: * config/lispdir.m4: Update from masters. * configure.ac: Bump to 2.52f. 2001-11-02 Akim Demaille * bin/autoreconf.in (&autoreconf): Set `$aclocal_flags' to ''. Don't run aclocal when aclocal.m4 is not from aclocal. From Ezra Peisach. Don't run libtoolize and gettextize if --install is not given. 2001-11-01 Paul Eggert * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): _AS_CR_PREPARE needs to be invoked before _AS_LINENO_PREPARE. (_AS_LINENO_PREPARE): Use as_cr_digits and as_cr_alnum rather than character ranges. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix NLS before invoking AS_BASENAME. Set the locale variables to 'C' if possible, as POSIX requires this to get the traditional behavior. * doc/autoconf.texi (Special Shell Variables): Describe the above. 2001-10-31 Paul Eggert * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Do not surround body with {}, as that triggers a bug in Bash 2.05. (_AS_LINENO_PREPARE): Use Sed rather than Awk. Fix the sed prepass to work even if there are multiple instances of $LINENO on the same line. Do not substitute for other variables like $LINENOT. Do not check file dates; such a check is unreliable on sufficiently fast machines, and removing the check makes the code simpler and more reliable. Check for output and chmod failures. * doc/autoconf.texi (Special Shell Variables): Document the above. 2001-10-31 Akim Demaille * tests/Makefile.am (atconfig): Remove this target, Automake handles it now. 2001-10-31 Akim Demaille * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Do not AC_CONFIG_FILES(atlocal) as it means a file atlocal.in *must* be provided, while it is optional. * configure.ac: Adjust. 2001-10-26 Paul Eggert * NEWS, README, configure.ac, lib/Autom4te/General.pm, lib/Autom4te/Struct.pm: Require Perl 5.005_03 instead of just 5.005, as some tests fail with 5.005_02. * doc/autoconf.texi (Special Shell Variables): Document some more LINENO gotchas, particularly with respect to the Awk+Sed hack. * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): New macro. (_AS_LINENO_PREPARE): Use it instead of shell eval, since eval $LINENO is not portable in practice. 2001-10-24 Akim Demaille * lib/Autom4te/General.pm (backname): New. 2001-10-24 Akim Demaille * m4/: Remove, merged into... * config/: here. 2001-10-23 Tim Van Holder * doc/autoconf.texi (Shellology): Mention the problems with bash 2.05's use of ANSI quoting in its `set' builtin. 2001-10-22 Paul Eggert * lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p, and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since POSIX decided to standardize on the int flavor of strerror_r. Always do char* test, as there's no reason not to. Assign to a char* var, to catch strerror_r that returns int*. * doc/autoconf.texi (Particular Functions): Document the above changes. Also, document the fact that AC_FUNC_STRERROR_R defines HAVE_DECL_STRERROR_R. * NEWS: Mention HAVE_WORKING_STRERROR_R -> STRERROR_R_CHAR_P. 2001-10-20 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): The name of the executable was missing from the log. 2001-10-20 Akim Demaille * lib/Autom4te/General.pm (&update_file): If destination is unchanged, remove the source. (&up_to_date_p): Don't be verbose, be debug. * bin/autoreconf.in: No longer support --m4dir. (&autoreconf): Display the full path of the configure.ac we are studying. Trace it only once. Be sure to honor --force with gettextize. Always run aclocal. * doc/autoconf.texi: Adjust. 2001-10-20 Akim Demaille * bin/autoheader.in ($localdir, $m4, $SIMPLE_BACKUP_SUFFIX): Remove, dead. * bin/autoreconf.in (&autoreconf): Do not run gettextize when `intl' is already present, as it refuses unless --force. (&parse_args): Use -I, --include instead of the old Autoconf options. ($localdir, $autoconf_dir): Remove. (@include): New. (&maybe_autoreconf): New, to preserve $_ for File::Find. 2001-10-19 Jens Petersen * lib/autoconf/programs.m4 (AC_PROG_AWK): Prefer gawk to mawk. * doc/autoconf.texi (Particular Programs): Likewise. 2001-10-19 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_FILES): Name the generated file in @configure_input@. Don't mention `automatically' in addition to `generated'. * tests/torture.at (#define header templates): Adjust. 2001-10-19 Akim Demaille * lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el: In a comment, explain how to install automatic mode selection. From Russ Allbery. 2001-10-19 Ezra Peisach * bin/autoreconf.in (autoreconf): Display the path to the configure.ac being studied. 2001-10-18 Paul Eggert * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Cast sizeof to unsigned long, to work around a bug in the HP C compiler version HP92453-01 B.11.11.23709.GP. * lib/m4sugar/m4sh.m4 (AS_DIRNAME): Use 'dirname' if that works. (AS_BASENAME_EXPR): New macro. (AS_BASENAME_SED): Do not assume GNU sed semantics. (AS_BASENAME): Use 'basename' if that works; then try 'expr'; and fall back on 'sed' only if the other two fail. This makes AS_BASENAME act more like AS_DIRNAME. (as_me): Shell-quote the argument of AS_BASENAME, in case $0 contains white space. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Use AS_DIRNAME, since I think it's now DOS-friendly. * tests/m4sh.at (DIRNAME_TEST): New arg $3. Allow "dirname //FOO" to return either / or //, as POSIX allows either behavior. 2001-10-10 Akim Demaille * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Recognize `a_out.exe' for OpenVMS 7.1, DEC C 5.5 compiler, via GNV. From Eric Sharkey. 2001-10-10 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_ECHO_N_PREPARE): m4_defun, not m4_define, since... (_AS_ECHO_N): AS_REQUIREs it. 2001-10-10 Akim Demaille * lib/autoconf/general.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS) (AC_INCLUDES_DEFAULT): Move to... * lib/autoconf/headers.m4: here. * lib/autoconf/types.m4: Comment changes. * doc/autoconf.texi: Specify where the default includes are used in the macro prototypes. 2001-10-09 Akim Demaille * lib/autoconf/autoconf.m4 (m4_patsubst, m4_regexp): New transition code. 2001-10-08 Akim Demaille * bin/autoreconf.in (&autoreconf): Remove debugging code. (&parse_args): Pass verbosity/debugging options to subtools when --debug, not when --verbose. * lib/autom4te.in (Autoreconf-preselections): New. (Autoconf): Use it. 2001-10-08 Akim Demaille * bin/autoreconf.in (autoreconf): Run libtoolize when appropriate. 2001-10-08 Akim Demaille * doc/autoconf.texi (autoreconf Invocation): Adjust. * bin/autoreconf.in (autoreconf): Run gettextize when appropriate. 2001-10-08 Akim Demaille * tests/tools.at (AT_CHECK_PERL_SYNTAX): Check autoreconf. (Syntax of the shell scripts): Don't. * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in: Don't bother with $force since... * lib/Autom4te/General.pm: does. 2001-10-08 Akim Demaille * bin/autoreconf.in: Rewrite in Perl. * configure.ac: Adjust. * lib/Autom4te/General.pm (&up_to_date_p): New. * bin/autom4te.in (&up_to_date_p): Use it. Rename as... (&up_to_date): this. 2001-10-08 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_case, m4_bmatch, m4_normalize) (m4_list_cmp): Use $0 to reinvoke yourself. (m4_patsubsts): New. (m4_strip, m4_version_unletter): Use it. * tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH): Likewise. 2001-10-08 Akim Demaille * lib/autoconf/autoconf.m4, lib/autoconf/general.m4, * lib/autoconf/libs.m4, lib/autoconf/status.m4, * lib/autoconf/types.m4, lib/autotest/general.m4, * lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, tests/atspecific.m4, * tests/torture.at: Rename m4_regexp, m4_patsubst, and m4_match to m4_bregexp, m4_bpatsubst, and m4_bmatch. * doc/autoconf.texi (Redefined M4 Macros): Adjust. 2001-10-08 Akim Demaille * lib/m4sugar/m4sh.m4: Use AS_REQUIRE. 2001-10-08 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_DIRNAME_EXPR): Use AS_REQUIRE. * tests/tools.at (AT_DATA_FORBIDDEN): Rename/move/duplicate to... * tests/atspecific.m4 (AT_DATA_M4SUGAR, AT_DATA_M4SH): here. * tests/tools.at, tests/m4sh.at: Use it. * tests/m4sh.at: Don't rely on Autoconf macros. (DIRNAME_TEST): Also exercise the expr variant. * tests/m4sugar.at, tests/atspecific.m4 (AT_CHECK_M4SUGAR): The preferred M4sugar extension is now `.4s'. * tests/README: Remove. 2001-10-08 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_provide_ifelse): Rename as... (m4_provide_if): this. * lib/m4sugar/m4sh.m4 (AS_REQUIRE): New. * lib/autoconf/general.m4 (AS_DEFUN, AC_DEFUN_ONCE, AC_BEFORE) (AC_REQUIRE, AC_PROVIDE, AC_PROVIDE_IFELSE): Be exact copy of the M4sugar peer, i.e., drop the `AC_PROVIDE_$1' broken marker. 2001-10-08 Akim Demaille Use `add-log-current-defun-function' for ChangeLog creation. Suggested by Tom Tromey. * lib/emacs/autotest-mode.el (autotest-mode-map): New. (autotest-mode): Adjust. * lib/emacs/autoconf-mode.el (autoconf-mode-map): Modernize, map 'comment-region onto `C-c ;'. Comments are `#', not `dnl'. (autoconf-current-defun): New. (autoconf-font-lock-keywords): Recognize `m4_defun'. 2001-10-08 Akim Demaille * lib/autoconf/general.m4 (_m4_divert(BODY)): Move to... * lib/m4sugar/m4sh.m4: here. (AS_INIT): Push the BODY diversion, set the #! /bin/sh line. * lib/autoconf/general.m4 (AC_PLAIN_SCRIPT) : Remove. (AT_INIT): Replace AC_PLAIN_SCRIPT with AS_INIT invocation, include handle the m4_pattern_*, no longer push the BODY diversion nor set the /bin/sh line, AS_INIT does it. * lib/autotest/general.m4 (AT_INIT): Likewise. * tests/base.at: Adjust the tests to use AS_INIT. * tests/tools.at (AT_DATA_FORBIDDEN): New. (autoconf: forbidden tokens): Adjust to work on M4sh instead of Autoconf. 2001-10-07 Paul Eggert * doc/autoconf.texi (config.status Invocation): CONFIG_SHELL defaults to a shell that supports LINENO if available. * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): If the current shell does not support LINENO, and if CONFIG_SHELL is unset or empty, and if we can find a shell that does support LINENO, then set CONFIG_SHELL to that shell and then re-execute ourselves with CONFIG_SHELL. 2001-10-05 Paul Eggert * tests/Makefile.am (clean-local): Don't invoke $(TESTSUITE) if it doesn't exist. Remove *.tmp, as a .tmp file is created during the build of $(TESTSUITE). 2001-10-05 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Look in the path iff we are a bareword. Reported by Raja R Harinath. 2001-10-05 Akim Demaille * tests/m4sh.at (LINENO): New. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Be sure to set PATH_SEPARATOR before using it. Fix the absolute path case/esac pattern. Provide $0 as fallback for as_myself. Reported by Raja R Harinath. 2001-10-05 Akim Demaille * Makefile.am, config/Makefile.am, lib/emacs/Makefile.am, * m4/Makefile.am, man/Makefile.am: Add/adjust MAINTAINERCLEANFILES. 2001-10-05 Akim Demaille * lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): New, extracted from... (AS_SHELL_SANITIZE): here. Use it. (_AS_LINENO_PREPARE): Preserve the exit status of $0.lineno. From Paul Eggert. 2001-10-04 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Use a portable combination of Awk and sed to replace $LINENO. 2001-10-02 Paul Eggert * doc/autoconf.texi (Limitations of Builtins): You can't use "source"; it's not portable. Remove confusing and somewhat-incorrect example involving "." and "/". * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): "source" -> ".", for compatibility with POSIX shells. 2001-10-02 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Just source 40.lineno instead of exec'ing to preserve $0 and $@. 2001-10-01 Akim Demaille * tests/testsuite (AT_INIT) : New. Don't run twice the same test. 2001-10-01 Akim Demaille * lib/autotest/general.m4 (AT_INIT) <--help>: Catch up with reality. No longer output the list of tests. <--list>: New option. <--full-help>: Remove. Complete the short/long options duality. Various small adjustments. 2001-10-01 Akim Demaille * doc/autoconf.texi: Use @kbd for user input. Always use `$' as shell prompt. 2001-09-30 Paul Eggert * lib/autoconf/status.m4 (AC_OUTPUT_MAKE_DEFS): Don't use nested parenthesization. This patch was originally suggested to bug-autoconf by Philippe De Muyter on 2000-05-28, but somehow it didn't get incorporated then. * doc/autoconf.texi (Limitations of Usual Tools): Clarify remark about sed and nested parenthesization. * lib/autoconf/types.m4 (AC_CHECK_SIZEOF): Report an error if the size cannot be determined even though the type exists. * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): Check for `expr' arithmetic overflow, and for compilation failure, and invoke a new argument $4 if either is discovered. This makes _AC_COMPUTE_INT_COMPILE more like _AC_COMPUTE_INT_RUN. (_AC_COMPUTE_INT): Pass IF-FAILS arg to _AC_COMPUTE_INT_COMPILE. 2001-09-28 Akim Demaille * lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el: New. * m4/lispdir.m4: New. * aclocal.m4, configure.ac: Adjust. 2001-09-28 Akim Demaille * lib/autotest/general.m4 (AT_VICTIMS): Rename as... (AT_TESTED): this. (AT_INIT): More the wrapped section to where it will be expanded. Output `AT_tested' only when existing. Catch unexpanded PACKAGE_STRING and PACKAGE_BUGREPORT. 2001-09-27 Akim Demaille Fix the passing of $? to ACTION-IF-FAILED in AC_TRY_RUN, that generates too many bug reports. * lib/autoconf/general.m4 (_AC_RUN_IFELSE): Pass the right exit status when executing the ACTION-IF-FALSE. * tests/base.at (AC_TRY_*): Rename as... (AC_TRY_COMMAND): this. (AC_RUN_IFELSE): New. * tests/compile.at (Extensions, C keywords) (AC_PROG_CPP requires AC_PROG_CC, GNU Fortran 77) (Broken/missing compilers, AC_PROG_CPP with warnings) (AC_PROG_CPP without warnings, AC_PROG_CPP via CC): Move to... * tests/c.at (Extensions, C keywords) (Broken/missing compilers, AC_PROG_CPP with warnings) (AC_PROG_CPP without warnings, AC_PROG_CPP via CC) (AC_PROG_CPP requires AC_PROG_CC): here and... * tests/fortran.at (GNU Fortran 77): there. * doc/autoconf.texi (autoconf Invocation): Fix the example: AC_TRY_RUN is about compilation, not shell commands. (Test Programs): AC_TRY_RUN works as used to be advertised. 2001-09-27 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Fix bugs spotted by Raja R Harinath: Be sure to detect when $LINENO always returns the same value. Look for the original script, basename($0) is certainly not enough. Pass the CLI arguments to `$as_me.lineno'. 2001-09-25 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Dump the whole config.log. Be sure the close and reopen the LOG fd before and after using tee to extend the log. : Adjust to the new format of at_help_all. 2001-09-23 Akim Demaille * bin/autom4te.in (parse_args): There can be several invocations of --language now. 2001-09-23 Akim Demaille * doc/autoconf.texi (Top): Wrap in @ifnottex. 2001-09-23 Akim Demaille * lib/autoconf/status.m4 (_AC_SRCPATHS): Compute and provide ac_buildpath, ac_top_buildpath, ac_srcpath, and ac_top_srcpath. (_AC_OUTPUT_FILES): Also substitute srcpath, top_srcpath, builddir, buildpath, top_builddir, and top_buildpath. (_AC_OUTPUT_SUBDIRS): Compute the dir variables *before* changing the current directory. * lib/autoconf/general.m4 (_AC_INIT_HELP): Compute the dir variables *before* changing the current directory. Skip nonexistent dirs. * doc/autoconf.texi (Preset Output Variables): Document these variables. * lib/autotest/general.m4: Do not reset AT_victims. Don't compute at_srcdir nor at_top_srcdir. * tests/tools.at: Hence use top_srcdir. * tests/Makefile.am, tests/autoconf, tests/autoheader, * tests/autom4te, tests/autoreconf, tests/autoupdate, tests/ifnames: Remove. * tests/autoreconf.in, tests/wrappl.in, tests/autom4te.in, * tests/wrapsh.in, tests/autoupdate.in: New. * tests/Makefile.am (DISTCLEANFILES, EXTRA_DIST): Adjust. * configure.ac: Build the position independent wrappers. * man/Makefile.am: Now that test wrappers are position independent, use them and drop dark envvar magic. 2001-09-23 Akim Demaille * doc/autoconf.texi (Common Shell Constructs): Rename as... (Programming in M4sh): this. Promote to @section. 2001-09-23 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Dump config.log last. Pass $at_debug_args to the rerun test suite. * lib/m4sugar/Makefile.am (DISTCLEANFILES): New. * bin/Makefile.am (ETAGS_SH): Don't use characters ranges. From Paul Eggert. 2001-09-23 Akim Demaille * bin/autom4te.in (@my_warning): Remove, handled by `autom4te.cfg'. 2001-09-23 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix shell over-escaping. 2001-09-23 Akim Demaille * lib/Autom4te/General.pm (&debug): New. * bin/autom4te.in ($language): Move to... (parse_args): here. Handle --language in languages. * lib/autom4te.in (Automake-selections, Autoheader-selections) (Autoscan-selections): New. (Autoconf): Adjust. 2001-09-23 Tim Van Holder * m4/auxdir.m4, m4/cond.m4, m4/depend.m4, m4/init.m4, * m4/install-sh.m4, m4/missing.m4, m4/sanity.m4, m4/strip.m4: Updated to match current versions from CVS Automake. 2001-09-23 Alexandre Duret-Lutz * doc/autoconf.texi (Special Shell Variables): Add pdksh output for $LINENO. 2001-09-22 Akim Demaille * lib/autoconf/autotest.m4: Create `package.m4'. * tests/Makefile.am (package.m4): Remove. 2001-09-22 Akim Demaille Rely on `$LINENO' when possible instead of `__oline__'. * lib/m4sugar/m4sh.m4 (AS_SHELL_SANITIZE): Provide some form of `$LINENO' support replacement when not supported. (_AS_CR_PREPARE, _AS_TR_CPP_PREPARE, _AS_TR_SH_PREPARE): Invoke them explicitly to be sure they are not output before this section (via m4_require). Cosmetic only. * lib/autoconf/c.m4, lib/autoconf/general.m4, * lib/autoconf/programs.m4: Replace all the occurrences of `__oline__' with `$LINENO'. * doc/autoconf.texi (Special Shell Variables): Document LINENO. 2001-09-21 Tim Van Holder * lib/autoconf/functions.m4 (_AC_FUNC_FORK): Replaceded an 8-bit character (u: -> ue) in a code comment. (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Only run 'ln -s' if we know it works. 2001-09-21 Akim Demaille * Makefile.maint (AUTOM4TE): Neutralize autom4te. Suggested by Jim Meyering. 2001-09-20 Tim Van Holder * lib/autoconf/programs.m4: Use extensions listed in $ac_executable_extensions when looking for programs. 2001-09-20 Tim Van Holder * lib/autoconf/general.m4: Fix a small Englisho. * lib/autoconf/status.m4: Fix a small typo. Handle DOS paths when setting up ac_dir_suffix and ac_top_builddir. * lib/m4sugar/m4sh.m4: Default CDPATH to $PATH_SEPARATOR, not ':'. 2001-09-20 Tim Van Holder * doc/autoconf.texi (File System Conventions): Clarify the use of PATH_SEPARATOR. (Special Shell Variables[PATH_SEPARATOR]): Ditto. (Special Shell Variables[CDPATH]): Mention that $PATH_SEPRATOR should be used instead of ':'. * lib/autotest/general.m4: Replace occurrences of ':' in AUTOTEST_PATH with $PATH_SEPARATOR at test suite startup. 2001-09-20 Tim Van Holder * tests/atgeneral.m4: Add basic support for test ranges (e.g. 7-34) as arguments. Fixed a typo. 2001-09-20 Tim Van Holder * man/Makefile.am (.x.1): Use @PATH_SEPARATOR@, not ':' to set up $PATH. Also set AUTOM4TE_CFG, so we can process autom4te properly. 2001-09-20 Tim Van Holder * bin/autoscan.in: Add 'exec-perl-if-not-run-by-perl'. * bin/autoupdate.in: Ditto. * bin/autoheader.in: Reworded a few comments. * bin/autoconf.in: Reworded help text for a few options. * bin/autoheader.in, bin/autom4te.in, bin/autoreconf.in, * bin/autoscan.in, bin/autoupdate.in: Ditto. 2001-09-20 Tim Van Holder * lib/Autom4te/XFile.pm (open): Simplified the error message (we already have $file). Set output files to binary mode (helps avoid CR issues on DOSish systems). 2001-09-19 Akim Demaille * lib/autotest/general.m4: Englishoes. From Tim Van Holder and Alexey Mahotkin. 2001-09-18 Paul Eggert * doc/autoconf.texi (Common Shell Constructs): New node, documenting AS_DIRNAME. (Limitations of Usual Tools): Refer to it when discussing dirname. Also, update discussion of POSIX standard to reflect latest draft. * lib/autoconf/c.m4: (AC_LANG_INT_SAVE(C)): Also support negative values, down to LONG_MIN. * lib/autoconf/general.m4 (_AC_COMPUTE_INT_COMPILE): Do not pass a first argument with leading '-' to expr, by parenthesizing initial integers that might be negative. * doc/autoconf.texi (Particular Functions): AC_FUNC_GETPGRP now merely checks whether it is an error to pass an argument to getpgrp. * lib/autoconf/functions.m4 (_AC_FUNC_GETPGRP_TEST): Remove. (AC_FUNC_GETPGRP): Don't bother with a runtime test. Just check whether it is a (compile-time) error to pass an argument to getpgrp. This simpler test supports the revised documentation, and is all that AC_FUNC_GETPGRP's users really need. 2001-09-18 Akim Demaille * doc/autoconf.texi (Limitations of Make) <$<>: New. 2001-09-18 Akim Demaille * doc/autoconf.texi (Limitations of Usual Tools) : More about `{}'. * lib/autotest/general.m4 (AT_INIT): Adjust. 2001-09-18 Paul Wagland * tests/m4sh.at: Ensure that AS_DIRNAME handles '/', '//' and '///' correctly. Add test for AS_BASENAME. * lib/m4sugar/m4sh.m4: Fix AS_BASENAME so that it passes the previous added test. It now correctly handles /1/2/3/, returning '3' not ''. Added AS_BASENAME_SED to make the interface the same as AS_DIRNAME. * tests/base.at: Fixed the expected responses. The old ones were one line out... * lib/autoconf/general.m4: Fixed AC_PREFIX_PROGRAM, it now behaves as the documentation claims it should (and how it behaved in 2.13). 2001-09-18 Akim Demaille * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): No INIT-CMDS in the AC_CONFIG_COMMANDS invocation. This also solves the name clash problems. Don't set the package's ID. * lib/m4sugar/Makefile.am (version.m4): Revamp. No longer to be shipped. (version.in): Remove. * lib/m4sugar/m4sugar.m4, lib/autoconf/general.m4, * lib/autoconf/status.m4: Adjust. Use `m4_PACKAGE_STRING'. * lib/autotest/general.m4 (AT_INIT): N-th signature change: now the only optional argument is the name of the test suite. Expect `package.m4' to define the package signature. * lib/autom4te.in (Autotest): Add `package.m4?'. * tests/Makefile.am (package.m4): New. * tests/suite.at: ifnames is a victim. 2001-09-18 Akim Demaille * lib/autom4te.in (Autoconf): Preselect AM_CONDITIONAL, AC_LIBSOURCE, AC_CONFIG_FILES. * lib/autotest/general.m4 (AT_INIT): Don't abort when a tested program version string doesn't match the package's. * lib/autoconf/general.m4 (AC_CACHE_VAL): Reestablish the space after `(cached)'. 2001-09-17 Paul Eggert * lib/autoconf/c.m4: (AC_LANG_INT_SAVE(C)): Allow expression to return any value that can fit into unsigned long (not int, as before). Check for output errors. 2001-09-17 Bruno Haible * lib/autoconf/c.m4: (AC_LANG_INT_SAVE(C)): Always include and . Evaluate the expression in an extra function before these includes. Call fprintf "%d" only after ensuring the argument is of type 'int'. Reported by Wayne Chapeskie . 2001-09-17 Paul Eggert Fix bug reported by Paul Townsend on AIX 4.3.3.0 with CFLAGS=-O4 or CFLAGS=-O5. In that case, the linker has a relaxed view of fatal errors, and AC_CHECK_LIB causes it to include libraries even when they don't exist. * lib/autoconf/headers.m4 (AC_HEADER_DIRENT): Use AC_SEARCH_LIBS, not AC_CHECK_LIB, so that we don't use -ldir or -lx if we don't need it. * lib/autoconf/specific.m4 (AC_ISC_POSIX): Replace the old, crufty version with the version used by fileutils 4.1, except use AC_SEARCH_LIBS, not AC_CHECK_LIB, so that we don't use -lcposix if we don't need it. * doc/autoconf.texi (AC_ISC_POSIX): Describe new behavior. 2001-09-13 Akim Demaille * tests/base.at, tests/m4sh.at: Be sure to issue the bangshe line _first_. Reported by Gerrit P. Haase. 2001-09-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Reset `AT_victims' so that m4_defn'ing is valid. 2001-09-13 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_append_uniq): New. * lib/autotest/general.m4 (AT_VICTIMS, AT_KEYWORDS, _AT_CLEANUP_FILE): Use it. 2001-09-13 Akim Demaille * lib/m4sugar/m4sugar.m4 (_AS_QUOTE_IFELSE, _AS_BOX_INDIR): Use m4_match. (m4_re_escape): New. * lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER): Use it. * lib/autoconf/general.m4 (AC_CACHE_SAVE): Use m4_match. * lib/autoconf/status.m4 (AC_CONFIG_IF_MEMBER, AC_CONFIG_LINKS): Likewise. * lib/autoconf/types.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P) (_AC_CHECK_TYPE_MAYBE_TYPE_P, AC_CHECK_MEMBER): Likewise. * lib/autotest/general.m4 (AT_INIT): Rename AT_TESTS_ALL as AT_tests_all for consistency. Set at_victims. (AT_VICTIMS): Similar to AT_KEYWORDS. (_AT_CLEANUP_FILE_IF): Use m4_match and m4_re_escape. 2001-09-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Fix stupid bugs. 2001-09-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Create and remove `$as_me.[0-9]+' instead of `debug-[0-9]+.sh', so that multiple test suites can cohabit. 2001-09-13 Akim Demaille * tests/mktests.sh: Don't output banners for empty test files. 2001-09-13 Akim Demaille Test suites can be run independently of configure. * lib/m4sugar/m4sh.m4 (_AS_ECHO, _AS_ECHO_N_PREPARE): New. * lib/autoconf/programs.m4 (_AC_PROG_ECHO): Remove. * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Adjust: AC_SUBST ECHO_N etc. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't ask for at_n and at_c. * lib/autotest/general.m4: Use ECHO_*. 2001-09-13 Akim Demaille * bin/ifnames.in: Rewrite in Perl. * configure.ac: Don't look for AWK. * tests/tools.at (AWK portability): Remove. (Syntax of the shell scripts): Don't check ifnames. (AT_CHECK_PERL_SYNTAX): New. (Syntax of the Perl scripts): Check ifnames. * tests/ifnames: New. 2001-09-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Let --keywords also match test group titles. * tests/atspecific.m4 (AT_CHECK_AU_MACRO): AT_KEYWORDS(autoupdate). Remove all the other keywords. 2001-09-10 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Remove the diversion HELP and SETUP: no longer used. Support -k, --keywords. : Be `no', `short', or `long'. : New variable. (AT_KEYWORDS): New. (AT_CLEANUP_FILE_IFELSE, AT_CLEANUP_FILE): Rename as... (_AT_CLEANUP_FILE_IF, _AT_CLEANUP_FILE): these. (_AT_CLEANUP_FILE_IF): Simplify the regexp. (AT_SETUP): Reset AT_line, AT_keywords, AT_description. No longer fill the HELP diversion. (AT_CLEANUP): Use them. * lib/m4sugar/m4sugar.m4 (m4_append): Support a separator. (m4_list_append): Remove. Spread a few keywords in the Autoconf test suite. 2001-09-10 Akim Demaille * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Don't pass PATH_SEPARATOR, let M4sh compute it. * lib/m4sugar/m4sh.m4 (_AS_PATH_SEPARATOR_PREPARE): New. * lib/autoconf/programs.m4 (AC_SHELL_PATH_WALK): Use PATH_SEPARATOR. Move to... * lib/m4sugar/m4sh.m4 (_AS_PATH_WALK): Here. Simplify when the path is not a literal. (AS_UNAME): Use it to report PATH. * lib/autoconf/general.m4 (_AC_INIT_PREPARE_FS_SEPARATORS): Remove. (_AC_INIT_DEFAULTS): AC_SUBST PATH_SEPARATOR. * lib/autoconf/programs.m4 (AC_PROG_INSTALL): Use _AS_PATH_WALK. * lib/autotest/general.m4 (AT_INIT): Use _AS_PATH_WALK to normalize the path, and to look for victims. * tests/semantics.at (AC_PATH_PROG & AC_PATH_PROGS) (AC_CHECK_PROG & AC_CHECK_PROGS): Use PATH_SEPARATOR. 2001-09-07 Akim Demaille * bin/autom4te.in (&handle_m4): `< /dev/null' so that GNU M4 1.5 doesn't neutralize SIGINT, making autoconf etc. non interruptible. * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Move the package related variables into `at_package_*'. * lib/autotest/general.m4 (AT_VICTIMS): New. (AT_INIT): Adjust for stand-alone/embedded test suites. (AS_MESSAGE_LOG_FD): Define and use it. * tests/suite.at (AT_VICTIMS): Use it. * tests/tools.at (autoupdating AC_PREREQ): Don't depend upon at_version. 2001-09-07 Akim Demaille Move toward possibly stand-alone test suites. * lib/autotest/general.m4: Stop displaying srcdir everywhere as, in addition, it introduces useless differences in logs. (AT_INIT): Let atconfig and atlocal be both optional. Adjust PATH computation. * lib/m4sugar/m4sh.m4 (AS_UNAME): More readable display of PATH. 2001-09-07 Akim Demaille * lib/autoconf/Makefile.am (autoconf.m4f): Depends upon m4sugar/version.m4. 2001-09-05 Akim Demaille * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use `_array_' to avoid GCC warnings. From Uwe Seimet. 2001-09-05 Akim Demaille * bin/autom4te.in: --language is -l, not -s. 2001-09-05 Akim Demaille Be ready to handle filenames as stupid as `dnl.at', for if even the maintainer is dumb enough to do that... * lib/autotest/general.m4 (AT_SETUP, AT_LINE): Demonstrates your excellence in M4 quotation: consider `__file__' is active. And BTW, when invoking m4, pass the --include in the right order: the wrong one. * bin/autom4te.in, bin/autoupdate.in: Use reverse when kingtal to 4m. 2001-09-05 Akim Demaille * lib/Autom4te/XFile.pm: New lib file. * bin/autoupdate.in, bin/autoscan.pl, bin/autom4te.in, * bin/autoheader.in: Use it. 2001-09-05 Akim Demaille * bin/autoupdate.in (&handle_m4_macros) : Undefine iff defined. 2001-09-05 Akim Demaille * lib/Autom4te/General.pm (&getopt): Work around the `-' Getopt bug. * bin/autoheader.in, bin/autoupdate.in (&parse_args): Adjust. * bin/autoscan.in: Use `getopt' and `find_files' etc. Add -I, --include support. * doc/autoconf.texi (autoscan Invocation): Adjust. 2001-09-05 Akim Demaille CVS GNU M4 doesn't like `undefine(undefined)'. * bin/autoupdate.in (&handle_m4_macros, &handle_autoconf_macros): New, extracted from main. Use IO::File wherever possible. (input.m4): Be constant, use -I instead of hard coding $tmp. Therefore be a quoted heredoc. Don't invoke `_au_disable', since ac was not loaded, but just `unm4.m4'. 2001-08-31 Akim Demaille Version 2.52d. 2001-08-31 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Fix the previous patch. * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Can create `config.hin~'. 2001-08-31 Akim Demaille * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): DU 5.0 has serious problems handling heredocs in heredocs. Reported by Nicolas Joly. 2001-08-31 Akim Demaille * doc/autoconf.texi: Don't promote non `m4_*' M4 macros. (Making testsuite Scripts): Update. 2001-08-31 Akim Demaille * lib/Makefile.am (CLEANFILES): Add autom4te.cfg. 2001-08-31 Akim Demaille * doc/autoconf.texi (Quadrigraphs): Document `@&t@'. (testsuite Scripts): There is no such thing as `atconfig.in'. And actually one diagram is missing: test suite runtime. 2001-08-31 Akim Demaille * lib/Autom4te/General.pm (&find_file): Browse the includes in the inverse order. 2001-08-31 Akim Demaille * bin/autoupdate.in (@include): `installcheck' revealed the path to m4sugar was lacking! 2001-08-31 Akim Demaille * man/Makefile.am (.x.1): We really have to pass autom4te_perllibdir. 2001-08-31 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Don't pass all the args to debug scripts, in particular passing explicitly listed tests to run is stupid. 2001-08-31 Akim Demaille * bin/autom4te.in (&parse_args): Strip `.' from `@include'. * bin/autoupdate.in: Use --include, -I, and --force, -f, too. Use directly autom4te, not autoconf. * tests/autoupdate: $top_srcdir/lib is needed too for melt files. 2001-08-31 Akim Demaille * tests/semantics.at (AC_C_BIGENDIAN): Missing eol. * bin/autoheader.in (%symbol): Strip arguments of macros. 2001-08-31 Akim Demaille * doc/autoconf.texi: Catch up -I, --include changes. 2001-08-31 Akim Demaille * bin/autom4te.in (&parse_args): Die on unknown languages. * bin/autoheader.in: Run directly autom4te --mode=autoconf, no need for autoconf. Promote --include over --macrodir and other obsolete options. 2001-08-31 Akim Demaille * lib/Autom4te/General.pm ($version, $help, &getopt): New. * bin/autoupdate.in, bin/autoheader.in, bin/autom4te.in: Use them. * bin/autom4te.in ($autoconf): Pass --force. `print $out' doesn't print `$_' but `$out'. * tests/tools.at (Syntax of the Perl scripts): Pass the lib dir. (autoheader): Pass --force since the test suite goes too fast for the time stamps. Adjust to the new autoheader messages. 2001-08-31 Akim Demaille * bin/autoheader.in: Handle the acconfig.h etc. junk files. Check the completeness of the #template. * lib/Autom4te/General.pm (&update_file): s/remove/unlink/. * tests/semantics.at (AC_C_BIGENDIAN): Adjust AT_CHECK_AUTOHEADER invocation. 2001-08-31 Akim Demaille * lib/Autom4te/General.pm (&find_file, &update_file): New. * bin/autoupdate.in, bin/autoheader.in: Adjust. Drop AC_MACRODIR dead for real. * tests/atspecific.m4 (AT_CHECK_AUTOHEADER): Now autoheader says `autoheader: `config.hin' is created'. * tests/tools.at (Syntax of the Perl scripts): Check autoheader. 2001-08-31 Akim Demaille * bin/autoheader.in: Rewrite in Perl. * tests/autoheader: Adjust. 2001-08-31 Akim Demaille * bin/autoconf.in (--include, -I): New option. Map --localdir, --autoconf-dir onto it. Forward autom4te's options instead of interpreting them. * bin/autoconf.in, bin/autoheader.in (AC_MACRODIR, autoconf_dir): There is no such envvar since the inception of autom4te.cfg. * bin/autom4te.in (&parse_args): Uniquify `@include'. * bin/autoupdate.in: Adjust, and perform more control. * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Adjust. * tests/autoconf: Dittowise. 2001-08-31 Akim Demaille * bin/autoconf.in: Don't bother with `acsite.m4' and `aclocal.m4'. * bin/autom4te.in (&find_file): Support `FILE?' standing for optionally `FILE'. Use -e, not -f, since /dev/null for instance is OK. (&parse_args): Adjust. * lib/autom4te.in (Autoconf): Add `acsite.m4?' and `aclocal.m4?'. 2001-08-31 Akim Demaille * configure.ac: Also find tested executables in bin. * bin/autoconf.in, bin/autoheader.in, bin/autoreconf.in, * bin/autoscan.in, autoupdate.in: Use exclusively the name of the installed peer executables, only PATH is allowed to resolve it. Pass `autoconf_dir' via options, not via invisible envvars. * lib/Autom4te/General.pm (&find_peer): Remove. * lib/autotest/general.m4 (AT_INIT): `AUTOTEST_PATH=a:b' gives `abuild:asrc:bbuild:bsrc', not `abuild:bbuild:asrc:bsrc'. * man/Makefile.am: Let help2man rely on PATH instead of trying to find the executables for it. * tests/Makefile.am: Major cleanup. Too lazy to document... * tests/atlocal.in: Remove all the obscure envvar manipulations. We only need PERL. * tests/atspecific.m4, tests/tools.at: Passing --localdir is indeed related to running the test suite, while passing --autoconf-dir and others is related to running non installed Autoconf executables. So don't do that, leave it to... * tests/autoconf, tests/autoheader, tests/autom4te, tests/autoupdate, * tests/autoscan: New. * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): Don't refer to library files: rely on --language. 2001-08-29 Akim Demaille * bin/autom4te.in, lib/autom4te.in, bin/autoconf.in: s/--set/--language/. 2001-08-29 Akim Demaille * doc/autoconf.texi: Strip the @nodes. Suggested by Paul Eggert. (Initializing configure): Typo. 2001-08-29 Akim Demaille * bin/autom4te.in (&handle_output): s/@__@/@&t@/. Suggested by Paul Eggert. 2001-08-29 Akim Demaille * Makefile.maint (do-po-update): Wget refuses to overwrite files: download in a tmp dir. 2001-08-29 Akim Demaille * lib/autotest/general.m4: s/AT-devnull/devnull/ since there are case insensitive OSes out there :( From Tim Van Holder. 2001-08-29 Akim Demaille * lib/autom4te.in: New. * lib/Makefile.am (edit, autom4te.cfg): New. * bin/autom4te.in (BEGIN): Simplify. Rely on `AC_MACRODIR' in addition of `autom4te_perllibdir'. (&load_configuration): New. Use it. (&parse_args): Support --mode, --set, and --melt. * bin/autoconf.in: Simplify and adjust. * tests/Makefile.am (AUTOMAKE): Use --set. * tests/atlocal.in: Adjust. * BUGS: distcheck and check are weak. 2001-08-29 Akim Demaille * lib/autotest/general.m4: Use foo=`(command) 2>/dev/null` not foo=`command` 2>/dev/null (at-devnull): Rename as... (AT-devnull): this. (--clean): Remove AT-* files too. * doc/autoconf.texi (Limitations of Usual Tools): Document `date'. Reported by Nicolas Joly. 2001-08-28 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PREPARE): Don't use single quotes inside single quotes. Reported by Nicolas Joly. 2001-08-28 Kevin Ryde * doc/autoconf.texi (Function Portability): Mention C right shifts. 2001-08-27 Tim Van Holder * lib/autotest/general.m4: Reword some messages. (AT_INIT): Check for the `times' builtin before using it. Support test ranges as arguments to the testsuite. Have -e imply -d as the help text suggested. 2001-08-27 Akim Demaille * Makefile.maint: Formatting changes. (do-po-update, po-update, cvs-update, update): New targets. (AMTAR): Remove. 2001-08-27 Akim Demaille * lib/autotest/general.m4 (AT_INIT) : Remove. : New. Pass it to debug-*.sh scripts. : May contain absolute dir names. 2001-08-27 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Log the command line. Support `VAR=VAL' as arguments. Compute PATH _after_ the options processing, so that AUTOTEST_PATH may be set via the command line. 2001-08-27 Akim Demaille * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): $2 defaults to $1. * lib/autotest/autotest.m4 (AT_INIT): Expand AUTOTEST_PATH into first the build dirs, then the src dirs. * configure.ac (AC_CONFIG_TESTDIR): Adjust. 2001-08-27 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Output the definition of at_data_files earlier. (--clean, -c): New option. * tests/Makefile.am: Use this option. 2001-08-27 Akim Demaille * lib/autoconf/status.m4 (_AC_SRCPATHS): Rename `ac_dots' as `ac_top_builddir' to mimic Automake's vocabulary, which much more readable. Adjust callers. * doc/autoconf.texi (Configuration Actions): Document the vars available in commands. Emphasize the risks of collisions in init-cmds. 2001-08-27 Akim Demaille * doc/autoconf.texi (Input) : Move to.. (Initializing configure): this new node. 2001-08-27 Akim Demaille * Makefile.am (EXTRA_DIST): INSTALL.txt is a dead hack. 2001-08-27 Akim Demaille * m4/atconfig.m4 (AT_CONFIG): Remove, replaced by... * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): this. New file. * m4/Makefile.am (EXTRA_DIST): Oops, adjust... 2001-08-27 Akim Demaille * lib/autoconf/general.m4 (AU_DEFINE, AU_DEFUN, AU_ALIAS): Move to... * lib/autoconf/autoheader.m4: this new file. * lib/autoconf/general.m4 (AH_OUTPUT, AH_VERBATIM) (_AH_VERBATIM_OLD, AH_TEMPLATE, _AH_TEMPLATE_OLD, AH_TOP, AH_BOTTOM): Move to... * lib/autoconf/autoupdate.m4: this new file. 2001-08-27 Akim Demaille * lib/autoconf/status.m4 (_AC_SRCPATHS): New. (_AC_OUTPUT_LINKS, _AC_OUTPUT_FILES, _AC_OUTPUT_SUBDIRS): Use it. Standardize the var names (ac_sub_srcdir -> ac_srcdir, ac_subdir -> ac_dir). (_AC_OUTPUT_HEADERS): AS_DIRNAME always return a dir name. * lib/autoconf/general.m4 (_AC_INIT_HELP): Ditto. 2001-08-27 Akim Demaille * lib/autoconf/autoconf.m4 (AC_CONFIG_COMMANDS) (AC_CONFIG_COMMANDS_POST, AC_CONFIG_COMMANDS_PRE, AC_CONFIG_FILES) (AC_CONFIG_HEADER, AC_CONFIG_HEADERS, AC_CONFIG_IF_MEMBER) (AC_CONFIG_LINKS, AC_CONFIG_SUBDIRS, AC_FILE_DEPENDENCY_TRACE) (AC_LINK_FILES, AC_LIST_COMMANDS, AC_LIST_COMMANDS_COMMANDS) (AC_LIST_FILES, AC_LIST_FILES_COMMANDS, AC_LIST_HEADERS) (AC_LIST_HEADERS_COMMANDS, AC_LIST_LINKS, AC_LIST_LINKS_COMMANDS) (AC_OUTPUT, AC_OUTPUT_COMMANDS, AC_OUTPUT_COMMANDS_POST) (AC_OUTPUT_COMMANDS_PRE, AC_OUTPUT_MAKE_DEFS) (_AC_CONFIG_COMMANDS_INIT, _AC_CONFIG_DEPENDENCIES) (_AC_CONFIG_DEPENDENCY, _AC_CONFIG_UNIQUE, _AC_LINK_FILES_CNT) (_AC_LIST_SUBDIRS, _AC_OUTPUT_COMMANDS, _AC_OUTPUT_COMMANDS_CNT) (_AC_OUTPUT_COMMANDS_INIT, _AC_OUTPUT_CONFIG_STATUS) (_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_OUTPUT_LINKS) (_AC_OUTPUT_SUBDIRS): Move to... * lib/autoconf/status.m4: this new file. * lib/autoconf/general.m4, lib/autoconf/Makefile.am: Adjust. * tests/Makefile.am, tests/suite.at: Adjust. 2001-08-27 Akim Demaille Automake 1.5. * Makefile.am (AUTOMAKE_OPTIONS): Add 1.5 and dist-bzip2. (AMTAR): Help automake define it. (INSTALL, install-data-hook): The INSTALL.txt trick is no longer needed, 1.5 can have a macro and a target with the same name. * m4/auxdir.m4, m4/cond.m4, m4/depend.m4, m4/install-sh.m4, * m4/strip.m4: New. * m4/init.m4, m4/sanity.m4: Update. * doc/Makefile.am (CLEANFILES): 1.5 knows the texi2dvi files. * lib/autoconf/Makefile.am, lib/autotest/Makefile.am, * lib/m4sugar/Makefile.am, lib/autoscan/Makefile.am, * lib/Autom4te/Makefile.am, man/Makefile.am: Use dist/nodist. 2001-08-27 Akim Demaille Provide a mean to ``AC_PREREQ'' for M4sugar, M4sh and Autotest. * lib/autoconf/version.in: Remove. * lib/m4sugar/version.in: New. * lib/m4sugar/m4sugar.m4 (m4_acversion, m4_version_prereq): New. Adjust callers. * bin/autoupdate.in: Distinguish M4sugar vs. Autoconf macros by the name of the directory they're in, instead of the filename, since version.m4 is now in m4sugar, but m4_acversion must not be classified as an Autoconf macro. ($input_m4): Don't qualify the path to m4sugar. Rather, pass autoconf_dir to m4. * tests/Makefile.am (testsuite): Remove -I top_srcdir, unneeded. * tests/suite.at: Require 2.52c. 2001-08-27 Akim Demaille testsuite.log should include config.log. * lib/autotest/autotest.m4: New. * lib/autotest/general.m4, tests/atspecific.m4: Adjust. * tests/suite.at : Adjust. (AT_INIT): Log config.log. * lib/m4sugar/m4sugar.m4 (m4_text_box): New. * lib/m4sugar/m4sh.m4 (_AS_BOX_LITERAL): Adjust. * lib/autoconf/general.m4 (_AC_INIT_CONFIG_LOG): Use them. (_AC_INIT_PREPARE): Fix the incredibly messy and buggy completion of config.log on traps. (_AC_OUTPUT_CONFIG_STATUS): Use AS_BOX. Use consistently `_ACEOF' for configure's here docs, and `_CSEOF' for config.status'. Open the log as soon as possible. Use the same log introduction as configure's. 2001-08-22 Paul Eggert * doc/autoconf.texi (Indices): New node. Move indices out of the top level menu and into this submenu. 2001-08-22 Akim Demaille * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Use AC_TRY_COMMAND. (AC_DECL_YYTEXT): Fix the previous patch: it points to AC_PROG_LEX. 2001-08-22 Akim Demaille * lib/autoconf/general.m4 (AC_SHELL_PATH_WALK, AC_CHECK_PROG) (AC_CHECK_PROGS, AC_PATH_PROG, AC_PATH_PROGS, AC_CHECK_TOOL_PREFIX) (AC_PATH_TOOL, AC_CHECK_TOOL, AC_CHECK_TOOLS): Move to... * lib/autoconf/programs.m4: here. * lib/autoconf/specific.m4 (_AC_PROG_ECHO, AC_PROG_MAKE_SET) (AC_PROG_RANLIB, AC_PROG_YACC, AC_PROG_LEX, _AC_DECL_YYTEXT) (AC_PROG_INSTALL, AC_PROG_LN_S, AC_RSH): Move to... * lib/autoconf/programs.m4: here. (_AC_DECL_YYTEXT): Rename as... (_AC_PROG_LEX_YYTEXT_DECL): this. * lib/autoconf/autoconf.m4, lib/autoconf/Makefile.am * tests/Makefile.am, tests/suite.am: Adjust. 2001-08-22 Akim Demaille * lib/autoconf/general.m4 (AC_LIST_MEMBER_OF, AC_LINKER_OPTION): Move to... * lib/autoconf/fortran.m4 (_AC_LIST_MEMBER_IF, _AC_LINKER_OPTION): here. * lib/autoconf/general.m4 (AC_TRY_LINK_FUNC): Move to... * lib/autoconf/functions.m4: here. * lib/autoconf/general.m4 (AC_SEARCH_LIBS, AC_CHECK_LIB) (AH_CHECK_LIB): Move to... * lib/autoconf/libs: this new file. * lib/autoconf/specific.m4 (_AC_PATH_X_XMKMF, _AC_PATH_X_DIRECT) (_AC_PATH_X, AC_PATH_X, AC_PATH_XTRA): Move to... * lib/autoconf/libs.m4: here. * lib/autoconf/autoconf.m4, lib/autoconf/Makefile.am: Adjust. 2001-08-22 Akim Demaille * lib/m4sugar/m4sh.m4 (AS_MKDIR_P): Fail if fails. * lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Adjust. (AC_SITE_LOAD): Better logging of config.site. 2001-08-20 Akim Demaille * configure.ac (AT_CONFIG): Fix the path. * m4/atconfig.m4 (AT_CONFIG): Don't use EOF but ATEOF so that 2.52 can be used. 2001-08-20 Alexandre Duret-Lutz * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Prepare the cross-compile program with AC_LANG_PROGRAM before feeding it to AC_COMPILE_IFELSE. Cleanup grep usage. 2001-08-20 Akim Demaille * ChangeLog, ChangeLog.0, ChangeLog.1, ChangeLog.2, AUTHORS, BUGS, * NEWS, README, README-alpha, TODO, tests/README: This package is `Autoconf', not `autoconf' (the executable). 2001-08-20 Akim Demaille Info readers seem to need `Index' in the index node title :( * doc/autoconf.texi: Reverse the 2001-08-15 change which simplified index node names. 2001-08-20 Akim Demaille * lib/autoconf/general.m4 (_AC_INIT_PACKAGE): Warn if the arguments are not literals. * doc/autoconf.texi (Input) : Arguments must be literals. Specify the output variables, and macros defined. 2001-08-20 Akim Demaille * doc/autoconf.texi (Examining Declarations) : (Examining Syntax) (Examining Libraries) (Test Programs) : These macros double quote some of their arguments. Reported by Werner Lemberg. 2001-08-20 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Compute top_builddir, top_srcdir and srcdir from at_topbuild_2_topsrc and at_testdir. Load atlocal late enough to dump it in the log. * m4/atconfig.m4 (AT_CONFIG): Pass them to atconfig. 2001-08-20 Akim Demaille * tests/torture.at (Configuring subdirectories): New test. * lib/autoconf/general.m4 (_AC_INIT_SRCDIR): Say what you are looking for. * m4/atconfig.m4: Be sure the let $[0] be expandable. (top_srcdir): Fix its computation. 2001-08-20 Akim Demaille * lib/autoconf/general.m4 (_AC_OUTPUT_COMMANDS): Say what you do. * m4/atconfig.m4 (AT_CONFIG): $1 is now the directory where the test suite lives. Create `atconfig' automagically. Configure atlocal.in if present. * tests/atconfig.in: Remove. * tests/atlocal.in: New. * tests/Makefile.am: Adjust. 2001-08-20 Akim Demaille Huh!?!?! There are still some user EOF tags used, which prevents their use in AC_CONFIG_COMMANDS for instance... * lib/autoconf/general.m4, lib/autoconf/specific.m4, * lib/autotest/general.m4: Rename the EOF tags as `_ACEOF', `_CSEOF', or `_ATEOF', as appropriate. * lib/m4sugar/Makefile.am, lib/autoconf/Makefile.am, * lib/autotest/Makefile.am (check-local): Enforce this constraint. 2001-08-20 Akim Demaille * tests/base.at, tests/m4sh.at, tests/m4sugar.at, * tests/semantics.at, tests/tools.at, tests/torture.at: s/^AT_DATA\(([^][]+),/AT_DATA([$1],/. 2001-08-20 Akim Demaille Autotest invokes M4sh's initialization. * lib/autotest/general.m4: Adjust the diversion names. (AT_INIT): Run AS_INIT. Use the BINSH diversion to invoke /bin/sh. * tests/base.at, tests/m4sh.at, tests/m4sugar.at, tests/tools.at: * tests/torture.at: Respect M4sugar and M4sh macro name spaces. 2001-08-20 Akim Demaille Let M4sh have its own diversions. * lib/autoconf/general.m4 (_m4_divert(BINSH), _m4_divert(REVISION)) (_m4_divert(NOTICE)): Rename as... * lib/m4sugar/m4msh.m4 (_m4_divert(BINSH), _m4_divert(HEADER-REVISION)) (_m4_divert(HEADER-COMMENT)): these. (_m4_divert(HEADER-COPYRIGHT), _m4_divert(HEADER-COPYRIGHT)): New. (_m4_divert(NOTICE)): New, for Libtool. * lib/autoconf/general.m4 (_m4_divert(PREPARE)): Remove, replaced long ago with `_m4_divert(GROW)'. (AC_COPYRIGHT, AC_REVISION, _AC_INIT_NOTICE): Adjust. 2001-08-20 Akim Demaille * tests/base.at, tests/compile.at, tests/foreign.at, * tests/m4sh.at, tests/m4sugar.at, tests/mktests.sh, * tests/semantics.at, tests/suite.at, tests/tools.at, * tests/torture.at: Ask Autotest mode, not Autoconf mode. 2001-08-20 Akim Demaille * bin/autom4te.in (handle_output): Handle @__@. 2001-08-20 Akim Demaille * lib/autoconf/autoconf.m4, lib/autoconf/oldnames.m4, * lib/autotest/general.m4: Adjust the license. 2001-08-17 Paul Eggert * doc/autoconf.texi (Function Portability): Mention snprintf, following up on a suggestion by Kevin Ryde. 2001-08-17 Akim Demaille * doc/install.texi, doc/autoconf.texi: Use `autoconf', not `autoconf_manual', as texinfo.tex 2001-06-21.10 chokes on it. 2001-08-17 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Refer to `$as_me.log', not `$0.log' as for projects where testsuite is in src, we'd have testsuite.log created in src. 2001-08-17 Akim Demaille * bin/autom4te.in (&parse_args): Recognize --normalize. 2001-08-17 Akim Demaille Start implementing the AC_CHECK_HEADER transition scheme. * lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW) (_AC_CHECK_HEADER_OLD, _AC_CHECK_HEADER_MONGREL): New. (AC_CHECK_HEADER): Use them. 2001-08-17 Akim Demaille * doc/autoconf.texi: Work around Texinfo buglets. (Transformation Rules): One example is enough, users are expected to have their brains on. And BTW, use DESTDIR. (dvar): New macro. Use it. 2001-08-17 Akim Demaille * doc/autoconf.texi (Writing testsuite.at) : Complete. * lib/autotest/general.m4 (AT_INIT): Use the relative dir when looking for ChangeLogs. 2001-08-17 Akim Demaille * bin/autom4te.in: --normalize is a new option. * bin/autoconf.in: Use it. 2001-08-17 Akim Demaille * bin/Makefile.am, lib/Autom4te/Makefile.am, lib/autoconf/Makefile.am * lib/autotest/Makefile.am, lib/m4sugar/Makefile.am: Add TAGS support. 2001-08-16 Paul Eggert * doc/autoconf.texi, doc/install.texi: Put copyright notice at start, not at end. 2001-08-15 Akim Demaille * doc/Makefile.am (fu): New index, can't use fn because of defmac. Use it. 2001-08-15 Akim Demaille * doc/autoconf.texi (pr): New index. (prindex, findex): Use, merge, and output them. (Environment Variable Index, Output Variable Index) (Preprocessor Symbol Index, Autoconf Macro Index, M4 Macro Index) (Autotest Macro Index): Rename as... (Environment Variables, Output Variables,Preprocessor Symbols) (Autoconf Macros, M4 Macros, Autotest Macros): these. * doc/install.texi: Use @command. (Environment Variables): Rename as... (Defining Variables): this. 2001-08-15 Akim Demaille * doc/autoconf.texi (Function Portability): sprintf's return value. From Kevin Ryde. 2001-08-15 Akim Demaille * Makefile.maint (CVS): New. (local-check): Run changelog-check. last. (alpha): Don't depend upon local-check, since... (cvs-dist): depends upon it. 2001-08-15 Tim Van Holder * tests/Makefile.am: Use a clean-local rule to remove autom4te.cache (it's a directory, not a file. * Makefile.am: Ditto (but maintainer-clean-local). 2001-08-15 Akim Demaille * bin/autom4te.in (@m4_warning): New. (&handle_m4): Use it. * tests/m4sugar.at (m4_warn): Pass `-f' to autom4te to ensure the warnings are issued at each run. * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): M4sugar is in the src tree. 2001-08-15 Akim Demaille * tests/atspecific.m4 (AT_CHECK_AUTOUPDATE): Perl is now required: don't waste time running `autoupdate --version' works. * tests/tools.at (autoupdating AC_PREREQ): Likewise. 2001-08-13 Akim Demaille * doc/autoconf.texi (ma): Rename this index as... (ac): this. 2001-08-13 Akim Demaille * Makefile.am: Remove dead code and dead comments. (pdf, html): New targets. * doc/autoconf.texi (Using Autotest): New chapter. * doc/Makefile.am (pdf): New targets. (CLEANFILES): Adjust. 2001-08-13 Akim Demaille * lib/autotest/general.m4 (AT_INIT): Log the start/stop dates and duration of the test suite. 2001-08-12 Alexandre Duret-Lutz * tests/semantics.at (AC_C_BIGENDIAN): Explicitelly save and load endianness for comparison instead of relying on AT_CHECK_ENV. 2001-08-11 Paul Eggert * doc/autoconf.texi, doc/install.texi: Add a copyright notice to the INSTALL file. 2001-08-11 Paul Eggert * NEWS: The autoconf manual now is distributed under the terms of the GNU Free Documentation License. * doc/autoconf.texi: Switch from old style copyright notice to FDL. Add an appendix "Copying This Manual" for the FDL. * doc/fdl.texi: New file, from . * doc/Makefile.am (autoconf_TEXINFOS): Add fdl.texi. 2001-08-10 Paul Eggert * AUTHORS, BUGS, ChangeLog, ChangeLog.0, ChangeLog.1, ChangeLog.2, GNUmakefile, Makefile.maint, NEWS, README, README-alpha, TODO, configure.ac, lib/autoconf/Makefile.am, m4/atconfig.m4, m4/init.m4, m4/m4.m4, m4/missing.m4, m4/sanity.m4, tests/README, tests/aclocal.m4, tests/atspecific.m4, tests/base.at, tests/compile.at, tests/foreign.at, tests/m4sh.at, tests/m4sugar.at, tests/semantics.at, tests/suite.at, tests/tools.at, tests/torture.at: Add copyright notice. * tests/mktests.sh: Update year in copyright notice. 2001-08-12 Alexandre Duret-Lutz * tests/semantics.at (AC_C_BIGENDIAN): New test. 2001-08-11 Alexandre Duret-Lutz * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Handle ACTION-IF-TRUE, ACTION-IF-FALSE, and ACTION-IF-UNKNOWN. * doc/autoconf.texi (C Compiler Characteristics): Update documentation for AC_C_BIGENDIAN. 2001-08-11 Alexandre Duret-Lutz * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Guess endianness by grep'ing magic values from an object file when cross-compiling. Based on code by Guido Draheim . 2001-08-10 Akim Demaille * bin/autom4te.in (&handle_output): Don't use `grep' with side effects. Suggested by Russ Allbery. 2001-08-10 Ralf Corsepius * lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Propagate the current $prefix to the sub-configures. 2001-08-09 Tim Van Holder * lib/autoconf/lang.m4: Ignore *.xSYM when looking for an executable extension (needed on BeOS). Reported by Guido van Rossum. 2001-08-09 Akim Demaille * bin/autom4te.in ($icache): Load it only if older than autom4te. 2001-08-07 Akim Demaille * lib/autotest/general.m4 (AT_INIT): All the `at-*' are to be removed. (at-setup-line): Huh? Be a variable `at_setup_line', not a file. No need to remove the files before and after the each test, before each test and at the end of the suite is enough. Display only the children `times', not the shell's. If the test failed or was skipped, at-times is not available. 2001-08-07 Akim Demaille Always produce testsuite.log, including when there are no failures. This helps getting information on skipped tests, and duration of the tests. Err, implement the latter btw. * lib/autotest/general.m4 (AT_INIT): Set up fd 6 for the log. Dump information on the first run of each test. (AT_CLEANUP): Create `at-times' containing the duration of the test group. 2001-08-07 Akim Demaille The use of `dumpstat' revealed that `len' was used although it should not. m4_text_wrap was using it, but in the Autoconf world where it is legal. Hence (i) test M4sh in its own world, not Autoconf's, and (ii), ahem, fix the bug :) * lib/autotest/general.m4: Be sure the set good quotes, as tracing does not like `' instead of []. (AT_INIT): Forbid `^_?AT_'. And don't output such tokens. * tests/Makefile.am (CLEANFILES): Add `script', `script.s4g', `script.as', and `autom4te.cache'. Remove `empty' and `macro' which are no longer used. * tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): New. * tests/m4sugar.at: Use it. * lib/m4sugar/m4sugar.m4: Use `m4_len' not `len'. 2001-08-07 Akim Demaille * bin/autoconf.in, bin/autoheader.in: --force, -f is a new option. 2001-08-07 Alexandre Duret-Lutz * bin/autom4te.in (handle_output): Typo in quadrigraph substitution. 2001-08-04 Akim Demaille * lib/autoconf/functions.m4 (AC_FUNC_ALLOCA, AC_FUNC_ERROR_AT_LINE) (AC_FUNC_FSEEKO, AC_FUNC_OBSTACK): Use AC_LANG_IFELSE, not AC_TRY_LINK. * lib/autoconf/headers.m4 (AC_HEADER_MAJOR): Likewise. * lib/autoconf/fortran.m4 (_AC_LANG_PROGRAM_C_F77_HOOKS) (AC_F77_MAIN): Likewise. 2001-08-04 Akim Demaille Don't rely on M4sugar outputting the patterns in files, since we might process the output _without_ running m4, hence without these files. * lib/m4sugar/m4sugar.m4 (m4_init): No need for `m4_tmpdir'. * bin/autom4te.in (@Request::includes): Remove, unused. (@Request::source): Rename as... (@Request::input): this. (@preselect): Add `m4_pattern_forbid' and `m4_pattern_allow'. (&handle_output): Fetch the patterns from the traces. `$forbidden' and `$allowed' are constant: use m//o. (&handle_m4): M4sugar no longer wants `m4_tmpdir'. (m4_pattern_forbid, m4_pattern_allow): Adjust for tracing only. 2001-08-04 Akim Demaille `autoconf && autoheader' is sped up. Now, speed up `autoheader && autoconf', i.e., in addition to caching traces, cache the output. * bin/autom4te.in (Request::cache): Rename as... (Request::id): this. ($cache, $icache, $tcache, $ocache): New. (&handle_m4): Save M4 output in the cache instead of $tmp. (&handle_output): Adjust. (&up_to_date_p): Check that the output cache is up to date too. (top level): Run `&handle_m4' iff force or the cache is invalid. Run `&handle_output' if the output cache is more recent. 2001-08-04 Akim Demaille * bin/autom4te.in ($force): New. (&parse_args, &print_usage): -f, --force is a new option. (&handle_output): CPP directives might have spaces after `#'. (&parse_args): The first file only can be frozen. 2001-08-04 Akim Demaille Don't let autom4te compute the `include' traces several times: first check that the trace cache file is up to date, and then compare its timestamp with that of the output. * bin/autom4te.in, bin/autoupdate.in, bin/autoscan.in: Normalize the preamble. Don't require 5.005 as Autom4te::General does it, and better yet (use `use', not `require'!). * lib/Autom4te/Struct.pm: Rename the last occurrences of Class::Struct as Autom4te::Struct. * lib/Autom4te/General.pm (File::stat): Use it. (&mtime): New, export it. * bin/autom4te.in: Use it. Declare `$req' is invalid if it is outdated. Don't declare it valid before saving it if something went wrong. 2001-08-04 Akim Demaille Autom4te shall not encode Autoconf data, and preselecting traces must be proposed to the users. * bin/autom4te.in (@required_trace): Remove. (@preselect): New. (&parse_args, &print_usage): -p, --preselect is a new option. (&up_to_date_p): Adjust. * bin/autoconf.in: Preselect some Autoconf macros. 2001-08-04 Akim Demaille * tests/tools.at (autoconf --trace: user macros): Check traces on macros invoked without arguments, and macros invoked with multiple lines arguments. 2001-08-03 Alexandre Duret-Lutz * bin/autom4te.in (handle_traces): Fix rewriting of traces without arguments. 2001-08-03 Akim Demaille * bin/autoconf.in ($@): Work around the usual sh bug. From Nicolas Joly. 2001-08-03 Akim Demaille Clean up the handling of the M4 builtins tracing exception. * bin/autom4te.in (Request::request): Don't complete M4 builtins trace requests. (@m4_builtins): Rename as... (@m4_builtin): this. (%m4_builtin_alternate_name): New. (&parse_args): Complete the trace requests with alternate names. (&handle_traces): Hence no longer do it here. (&trace_requests): Remove, unused. 2001-08-03 Akim Demaille * doc/autoconf.texi (Redefined M4 Macros): Document m4_exit, m4_if, and m4_wrap. 2001-08-03 Akim Demaille * lib/m4sugar/m4sugar.m4 (m4_init): Also forbid `_m4_*' tokens. (m4_divert_pop): Dump the whole diversion stack when a diversion mismatch happens. * bin/autom4te.in (&handle_output): Remember of the first occurrence of a possibly undefined macro, not the last. Complain about the possibly undefined macros in the same order as the appear in the output. * lib/autoconf/Makefile.am (autoconf.m4f): List its dependencies. * tests/tools.at (autoconf: forbidden tokens, basic) (autoconf: forbidden tokens, exceptions): No longer sort autoconf's stderr, as it is now deterministic. Check that `dnl' is caught. 2001-08-01 Akim Demaille * configure.ac: Bump to 2.52c. 2001-08-01 Akim Demaille Version 2.52b. * lib/Autom4te/Makefile.am (perllibdir): s/Autoconf/Autom4te/. 2001-08-01 Akim Demaille Version 2.52a. 2001-08-01 Akim Demaille * lib/Autom4te/General.pm: Use `carp' and `croak', not `warn' and `die'. (&END): New. * bin/autoconf.in, bin/autom4te.in, bin/autoupdate.in: Remove your `END', as `Autom4te::General::END' will be triggered. * bin/autoupdate.in, bin/autoscan.in: Improve error messages accuracy. * bin/autoupdate.in (File::Compare, File::Copy): Use them instead of system to run `mv', `rm', and `cmp'. 2001-08-01 Akim Demaille * lib/Autom4te/General.pm (&unique): New. * bin/autoscan.in (&output): Use it to issue trace requests once. 2001-08-01 Akim Demaille * lib/Autom4te/General.pm: New. * bin/autom4te.in (Autom4te::General): Use it. ($me, $tmp, $verbose, $debug, &mktmpdir, &verbose, &xsystem) (&find_configure_ac, &find_slave): Remove. * bin/autoscan.in: Likewise. * bin/autoupdate.in: Likewise. 2001-08-01 Akim Demaille * autoconf.in, autom4te.in, autoscan.in, ifnames.in, * autoheader.in, autoreconf.in, autoupdate.in: Move to... * bin: here, new directory. * lib/Autoconf: Rename as... * lib/Autom4te: this, to please case insensitive junkie OSes. 2001-08-01 Akim Demaille * autom4te.in ($m4): Handle the --nesting-limit. * autoconf.in (M4): Remove. 2001-08-01 Akim Demaille * autoconf.in ($AWK): Remove, no longer used. * test/tools.at: Use AT_CHECK_AUTOCONF. (AWK portability): Remove, for autoconf no longer uses AWK. (Syntax of the Perl scripts): New. * configure.ac: autoconf no longer needs an AWK with a good regexp engine. Use a static test on AC_PACKAGE_VERSION. * autom4te.in (&up_to_date_p): Output depends on the arguments. * lib/autoconf/Makefile.am: Ship version.m4, maintainer file. * tests/atconfig.in (PERL): New. 2001-08-01 Akim Demaille * lib/autoconf/lang.m4 (AC_LANG(C), AC_LANG_C, _AC_LANG_ABBREV(C)) (AC_LANG(C++), AC_LANG_CPLUSPLUS, _AC_LANG_ABBREV(C++)) (AC_LANG_SOURCE(C), AC_LANG_PROGRAM(C), AC_LANG_CALL(C)) (AC_LANG_FUNC_LINK_TRY(C), AC_LANG_BOOL_COMPILE_TRY(C)) (AC_LANG_INT_SAVE(C), _AC_ARG_VAR_CPPFLAGS, _AC_ARG_VAR_LDFLAGS) (AC_LANG_PREPROC(C), _AC_PROG_PREPROC_WORKS_IFELSE, AC_PROG_CPP) (AC_LANG_COMPILER(C), ac_cv_prog_gcc, AC_PROG_CC, _AC_PROG_CC_G) (AC_PROG_GCC_TRADITIONAL, AC_PROG_CC_C_O, AC_LANG_PREPROC(C++)) (AC_PROG_CXXCPP, AC_LANG_COMPILER(C++), ac_cv_prog_gxx) (AC_PROG_CXX, _AC_PROG_CXX_G, _AC_PROG_CXX_EXIT_DECLARATION) (AC_PROG_CC_STDC, AC_C_CROSS, AC_C_CHAR_UNSIGNED, AC_C_LONG_DOUBLE) (AC_C_BIGENDIAN, AC_C_INLINE, AC_C_CONST, AC_C_VOLATILE) (AC_C_STRINGIZE, AC_C_PROTOTYPES): Move to... * lib/autoconf/c.m4: here, new file. * lib/autoconf/lang.m4 (AC_LANG(Fortran 77), AC_LANG_FORTRAN77) (_AC_LANG_ABBREV(Fortran 77), AC_LANG_SOURCE(Fortran 77)) (AC_LANG_PROGRAM(Fortran 77), AC_LANG_CALL(Fortran 77)) (AC_LANG_PREPROC(Fortran 77), AC_LANG_COMPILER(Fortran 77)) (ac_cv_prog_g77, AC_PROG_F77, _AC_PROG_F77_G, AC_PROG_F77_C_O) (_AC_PROG_F77_V_OUTPUT, _AC_PROG_F77_V, AC_F77_LIBRARY_LDFLAGS) (AC_F77_DUMMY_MAIN, _AC_LANG_PROGRAM_C_F77_HOOKS, AC_F77_MAIN) (_AC_F77_NAME_MANGLING, AC_F77_NAME_MANGLING, AC_F77_WRAPPERS) (AC_F77_FUNC): Move to... * lib/autoconf/fortran.m4: here, new file. 2001-08-01 Akim Demaille * acfunctions.m4: Rename as... * lib/autoconf/functions.m4: this. * acgeneral.m4: Rename as... * lib/autoconf/general.m4: this. * acheaders.m4: Rename as... * lib/autoconf/headers.m4: this. * aclang.m4: Rename as... * lib/autoconf/lang.m4: this. * acoldnames.m4: Rename as... * lib/autoconf/oldnames.m4: this. * acspecific.m4: Rename as... * lib/autoconf/specific.m4: this. * actypes.m4: Rename as... * lib/autoconf/types.m4: this. * autoconf.m4: Rename as... * lib/autoconf/autoconf.m4: this. * m4sugar.m4: Rename as... * lib/m4sugar/m4sugar.m4: this. * m4sh.m4: Rename as... * lib/m4sugar/m4sh.m4: this. * tests/atgeneral.m4: Rename as... * lib/autotest/general.m4: this. * acfunctions: Rename as... * lib/autoscan/functions: this. * acheaders: Rename as... * lib/autoscan/headers: this. * acidentifiers: Rename as... * lib/autoscan/identifiers: this. * aclibraries: Rename as... * lib/autoscan/libraries: this. * acmakevars: Rename as... * lib/autoscan/makevars: this. * acprograms: Rename as... * lib/autoscan/programs: this. 2001-08-01 Akim Demaille * doc/autoconf.texi: Moving/deleting open files is not portable. Portability issues for `.' (source), and more information about sed. 2001-07-25 Steven G. Johnson * aclang.m4 (AC_F77_LIBRARY_LDFLAGS): Ignore -libmil (on Solaris), which has a special meaning and is not a reference to libibmil.a. Reported by Matteo Frigo. 2001-07-25 Pavel Roskin * autom4te.in (mktmpdir): Strip trailing newline from mktemp output. 2001-07-25 Akim Demaille * autoconf.in: Try to define the variables before using them. * autom4te.in ($perllibdir): Use `$autom4te_perllibdir' as envvar instead of `$perllibdir'. * tests/atconfig.in ($autom4te_perllibdir): Export it. 2001-07-25 Akim Demaille * autoconf.in (ac_LF_and_DOT): Remove, unused. 2001-07-24 Akim Demaille Let autoconf use autom4te for traces. * autoconf.in ($task, task trace): Remove, merely pass --trace to autom4te. * autoheader.in: Don't pass `-' to autoconf, rather, a tmp file. (Because I found no way for autom4te to accept `-'). * autom4te.in (&Request::request): Beware of M4 builtins. (END): Don't try to remove the content of an empty dir. (&parse_args): Default is `$f:$l:$n:$%', not `$f:$l:$n:$*'. (&handle_output): Set a default value to `$forbidden'. * autoupdate.in (&verbose, &xsystem): New, from autom4te.in. ($autoconf): Pass --debug and --verbose. * tests/atspecific.m4 (AT_CHECK_AUTOCONF): Clean up autom4te's cache. 2001-07-24 Akim Demaille Let autoconf use autom4te to create configure. * autoconf.in ($automate): New var. (task script): Use autom4te. * autom4te.in (File::Spec): Use it. (&find_file): New. (&parse_args): --warning is -W, not -w. Find the top level files. (&handle_m4): Pass the warnings flags. Don't report verbosely m4's failures, unless requested. (&handle_output): Don't complain for forbidden tokens in comments. Be sure to report all the forbidden tokens within a single line. (&trace_format_to_m4): Preserve `$_'. (&handle_traces): Sort the output macros. (&up_to_date_p): Find the files before trying to get its time stamp. 2001-07-24 Akim Demaille * Makefile.am: Ship, build and install Autom4te. (SUBDIRS): Add lib. * lib/Autoconf/Struct.pm: New, from Automake 1.5. * configure.in: Require Perl. * man/autom4te.in: New. 2001-07-19 Paul Eggert * doc/autoconf.texi (Cache Checkpointing): Use AC_MSG_ERROR in example, rather than (exit 1); exit (which isn't portable). 2001-07-18 Akim Demaille Version 2.52. 2001-07-18 Akim Demaille The C-Fortran 77 hooks are available only once AC_F77_DUMMY_MAIN was run, while they are needed also when it is expanded. Reported by Nicolas Joly. * aclang.m4 (AC_F77_DUMMY_MAIN): Define _AC_LANG_PROGRAM_C_F77_HOOKS. (AC_LANG_PROGRAM(C)): Use it instead of depending upon AC_F77_DUMMY_MAIN being expanded. 2001-07-18 Akim Demaille * configure.in: Bump to 2.51a. 2001-07-17 Akim Demaille Version 2.51. 2001-07-17 Akim Demaille * aclang.m4 (AC_F77_DUMMY_MAIN): Let the interface be more Autoconfy: $1 = action-if-found, $2 = action-if-not-found. 2001-07-17 Akim Demaille The runtime test for AC_FUNC_GETPGRP fails when prototypes are used. Well, then use the prototypes when you can, and runtime as a last resort. Reported by Artur Frysiak * acfunctions.m4 (_AC_FUNC_GETPGRP_TEST): New. (AC_FUNC_GETPGRP): Use it. First try to compile with 0-ary or 1-ary calls. 2001-07-17 Akim Demaille * actypes.m4 (_AC_CHECK_TYPE_REPLACEMENT_TYPE_P): `foo_t' is a replacement type. From Paul Eggert. 2001-07-17 Akim Demaille * Makefile.maint: Sync. with cppi 1.10. 2001-07-17 Akim Demaille * aclang.m4 (AC_LANG_PROGRAM(C)): Output F77_DUMMY_MAIN only when AC_F77_DUMMY_MAIN has been run. From Pavel Roskin and Steven G. Johnson. 2001-07-17 Akim Demaille * configure.in: Rename as... * configure.ac: this. 2001-07-17 Akim Demaille * Makefile.am (INSTALL.txt): Don't use $@ and $< in non suffix rules. From Marc Espie. * Makefile.maint (release-archive-dir): Rename as... (release_archive_dir): this, so that it can be specialized in Makefile. 2001-07-14 Akim Demaille * configure.in: Bump to 2.50d. 2001-07-14 Akim Demaille Version 2.50c. * Makefile.maint (alpha): Typo. 2001-07-14 Akim Demaille * doc/autoconf.texi (Limitations of Make): Macro names and underscore. 2001-07-14 Akim Demaille * config/config.guess, config/config.sub, config/texinfo.tex * doc/standards.texi, doc/make-stds.texi: Update. 2001-07-14 Akim Demaille * Makefile.maint (cvs-check, cvs-tag-check, cvs-diff-check): New. 2001-07-14 Akim Demaille * Makefile.maint (maintainer-check): Rename as... (maintainer-distcheck): this. (changelog-check, static-check): New. Use them. 2001-07-14 Kevin Ryde * doc/autoconf.texi (C++ Compilers Characteristics): Last resort for CXX is g++, not gcc. 2001-07-14 Akim Demaille * doc/autoconf.texi (Files): New subsection. 2001-07-14 Akim Demaille * doc/autoconf.texi (C Compiler, Fortran 77 Compiler): Be subsections of... (Generic Compiler Characteristics): this. (C++ Compiler): New subsection. 2001-07-14 Akim Demaille * autoscan.in: Use IO::File. Adjust all the routines to use it. ($log): New file (autoscan.log). (output): Dump detailed logs into $log, and a shortened version to stderr. (&scan_makefile): Refine the regexp catching tokens in the code. * doc/autoconf.texi (autoscan Invocation): Document `autoscan.log' and the `configure.ac' checking feature. 2001-07-12 Akim Demaille For some AWK, such as on HPUX 11, `xfoo' does not match `foo|^bar'. Reported by Michael Elizabeth Chastain. * autoconf.in: Refuse such AWK. * configure.in: Likewise. * Makefile.am (acversion.m4): Do not use move-if-change this file has dependencies. * doc/autoconf.texi (Fortran 77 Compiler): Some typos. 2001-07-10 Jens Petersen * autoscan.in (&scan_makefile): Improve programs regexp to parse things like "g++", "file.c" and "some-conf" as tokens. (&scan_file): Match C++ files extensions. If the filename extension is C++ then ask for c++. 2001-07-05 Steven G. Johnson * aclang.m4 (AC_F77_DUMMY_MAIN): Use AC_TRY_LINK, not AC_TRY_LINK_FUNC, to check whether defining a dummy main-like routine is needed for linking with F77 libs. 2001-07-05 Pavel Roskin * aclocal.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Remove conftest* after using break. (_AC_PROG_F77_V_OUTPUT): Remove conftest*, not conftest.* after linking. 2001-07-05 Akim Demaille * Makefile.am (move_if_change): New. Use it instead of `mv'. (acversion.m4): Name it `$(srcdir)/acversion.m4' to ease broken Makes' lives. Reported by Nicolas Joly. 2001-07-04 Akim Demaille * acgeneral.m4 (_AC_RUN_IFELSE): Remove conftest.o when cleaning up. * acfunctions.m4 (AC_FUNC_WAIT3): Use `break' to silent some warnings from compilers. * aclang.m4 (_AC_LANG_COMPILER_GNU): Log the version information for all the compilers, not only GNU. Hence move from here... (AC_PROG_CC, AC_PROG_CXX, AC_PROG_F77): to here. 2001-07-04 Akim Demaille * acfunctions.m4 (AC_FUNC_STRTOD, AC_FUNC_STRERROR_R) (AC_FUNC_STRCOLL, AC_FUNC_WAIT3): Use AC_RUN_IFELSE and AC_COMPILE_IFELSE. 2001-07-04 Akim Demaille * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Actually apply the ``strings.h'' change claimed below. 2001-07-04 Akim Demaille * aclang.m4 (_AC_LANG_COMPILER_GNU): s/-dumpspecs/-v/. 2001-07-04 Akim Demaille * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Include strings.h if usable with string.h. Suggested by Paul Eggert. 2001-07-04 Akim Demaille * autoscan.in (&scan_file): Skip FILE if there is FILE.in. From Jens Petersen. 2001-07-03 Akim Demaille * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Specify CONFIG_FILES etc. in the log. 2001-07-03 Akim Demaille * acheaders.m4 (AC_CHECK_HEADER): When INCLUDES are set, use the compiler, not the preprocessor. * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): No longer use dedicated code to check for inttypes.h, as AC_CHECK_HEADERS does the right thing. * Makefile.am (.m4.m4f): Emphasize M4 error messages and fail earlier if there are. 2001-07-03 Akim Demaille * autoscan.in ($initfile): Remove. (&find_file): Rename as... (&scan_file): this. Immediately scan the current file, instead of gathering them, and later having them handled by &scan_files. (&scan_files): Merely invoke Find::File. Adjust. 2001-07-02 Akim Demaille * autoscan.in: Formatting changes, matching the invocation order. (File::Find): Use it instead of Perl 4's `find.pl'. (&wanted): Rename as... (&find_file): this. 2001-07-01 Pavel Roskin * aclang.m4 (AC_F77_DUMMY_MAIN): Remove conftest* after using break in the argument to AC_TRY_LINK_FUNC. (AC_F77_MAIN): Remove conftest* after using break in the argument to AC_TRY_LINK. 2001-07-01 Steven G. Johnson Add alternate 'main' routine detection for linking C/C++ with Fortran, fixing link failures for e.g. AC_F77_WRAPPERS on NetBSD. * aclang.m4 (AC_F77_DUMMY_MAIN): New macro to detect whether a dummy alternate main is required even if the user provides her own 'main'. (AC_F77_MAIN): New macro to detect whether it is possible to provide an alternate 'main' function name, using the 'main' from the Fortran libraries. (AC_LANG_PROGRAM(C)): Use F77_DUMMY_MAIN, if it is defined, so that cross-language link tests can be performed successfully. (_AC_F77_NAME_MANGLING): Require AC_F77_DUMMY_MAIN. Also put $FLIBS after $LIBS, for consistency; this should be the general rule since the user may want to link to Fortran libraries that require $FLIBS. * doc/autoconf.texi: Document AC_F77_DUMMY_MAIN and AC_F77_MAIN. 2001-06-29 Pavel Roskin * atgeneral.m4 (AT_CHECK): Add a newline to the end of at-stdout and at-stderr instead of removing the newline from the echo output, which is not guaranteed to work. 2001-06-28 Jens Petersen * aclang.m4 (_AC_PROG_CXX_EXIT_DECLARATION): Only add declaration to confdefs.h when non-zero. 2001-06-28 Akim Demaille * configure.in: Bump to 2.50c. 2001-06-26 Akim Demaille Version 2.50b. 2001-06-26 Akim Demaille Version 2.50a. 2001-06-25 Pavel Roskin * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more argument, AUTOCONF-FLAGS. * tests/mktests.sh (update_exclude_list): Add AC_SYS_RESTARTABLE_SYSCALLS and AC_FUNC_WAIT3. * tests/semantics.at: Test AC_SYS_RESTARTABLE_SYSCALLS and AC_FUNC_WAIT3 with "-W no-obsolete". 2001-06-25 Akim Demaille * tests/foreign.at (libtool): Fix the `libtoolize --version' decoding. 2001-06-25 Akim Demaille * autoscan.in (%macro): Now maps from word to list of macros. (&init_tables): Die when a word which is already handled by explicit macros is mapped to the default macro. (&print_unique): Remove, inlined in... (&output_kind): here. (File::Basename): Use it. (&output): Sort the CONFIG_FILES. * acheaders: Normalize. * acfunctions: Likewise. 2001-06-25 Akim Demaille * aclang.m4 (_AC_LANG_COMPILER_GNU): If GNU, dump the compiler characteristics in the logs. Suggested by Mo DeJong. 2001-06-24 Akim Demaille * acfunctions.m4 (AM_FUNC_ERROR_AT_LINE, AM_FUNC_FNMATCH) (AM_FUNC_MKTIME, AM_FUNC_OBSTACK, AM_FUNC_STRTOD): Reactivated. * doc/autoconf.texi (Autoconf 2.13): New section. 2001-06-24 Akim Demaille * autoconf.in (Task traces): Separate the error messages from the traces to improve robustness. 2001-06-23 Akim Demaille * tests/torture.at (AC_ARG_VAR): Make it a single test instead of three as failures are unlikely, and speed matters. 2001-06-23 Akim Demaille * doc/autoconf.texi (Redefined M4 Macros): New. 2001-06-23 Akim Demaille * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Consider inttypes.h is missing if it conflicts with sys/types.h, as on IRIX 5.3. 2001-06-23 Paolo Bonzini * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Defer parsing of config.status targets to after the evaluation of the INIT-CMDS. Double quote config.status targets (used to be single quoted). 2001-06-23 Akim Demaille * tests/torture.at (CONFIG_FILES, HEADERS, LINKS and COMMANDS): Check the content of the created file. Check the ./config.status command line invocation. 2001-06-23 Akim Demaille * tests/foreign.at (Libtool): Reject prehistoric versions. 2001-06-23 Akim Demaille * aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Try to be robust to preexisting files matching a.*. 2001-06-23 Akim Demaille * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Output error messages on stderr. * doc/autoconf.texi (AC_ARG_VAR): Update. 2001-06-21 Akim Demaille * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Die instead of warning when precious variables have changed. * tests/torture.at (AC_ARG_VAR): Adjust. 2001-06-21 Akim Demaille ./configure --program-suffix=foo produces `transform=s,$$,foo,;', but some sed choke on multiple `;', and other tools (e.g., Automake), include the separator themselves. * acgeneral.m4 (AC_ARG_VAR): Be sure not to leave extra `;'. 2001-06-19 Tim Van Holder * doc/autoconf.texi (Functions Portability): Rename as... (Function Portability): this. (Function Portability): Document potential problems with unlink(). 2001-06-19 Paul Eggert * NEWS, doc/autoconf.texi: Document quadrigraphs. 2001-06-18 Akim Demaille * acfunctions.m4 (AC_FUNC_FORK): Fix typos. 2001-06-18 Ruediger Kuhlmann * acfunctions.m4: (AC_FUNC_VFORK) rename as... (_AC_FUNC_VFORK): this. Remove AC_DEFINEs and don't guess cross-compilation values. (_AC_FUNC_FORK): New, check whether fork() isn't just a stub. (AC_FUNC_FORK): New, use _AC_FUNC_VFORK and _AC_FUNC_FORK to define HAVE_WORKING_FORK, HAVE_WORKING_VFORK; and vfork to fork if vfork doesn't work. Guess values if cross-compiling, but warn. * acfunctions: Add AC_FUNC_FORK. * doc/autoconf.texi: Document AC_FUNC_FORK. Give example to define and vfork appropriately. 2001-06-18 Akim Demaille * doc/autoconf.texi (Functions Portability): New section. 2001-06-18 Akim Demaille * autoconf.in (M4): Pass --nesting-limit=1024, unless already set in $M4. Suggested by Andreas Schwab. 2001-06-18 Akim Demaille * acfunctions.m4 (AC_FUNC_CHOWN, AC_FUNC_CLOSEDIR_VOID) (AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK) (AC_FUNC_MMAP, AC_FUNC_SELECT_ARGTYPES, _AC_FUNC_STAT) (AC_FUNC_UTIME_NULL): Use AC_INCLUDES_DEFAULT. Don't use AC_TRY_RUN, which double quotes, prefer AC_RUN_IFELSE, and either AC_LANG_SOURCE or AC_LANG_PROGRAM. (AC_FUNC_CLOSEDIR_VOID): Protect C++ from `int closedir ();' (or the converse). 2001-06-18 Akim Demaille * doc/autoconf.texi (ms): New index. (Macro Index): Rename as... (Autoconf Macro Index): this. (M4 Macro Index): New appendix. (Programming in M4): New chapter. Define M4sugar, M4sh, m4_pattern_forbid, and m4_pattern_allow. (Quoting): Rename as... (M$ Quotation): this. Be part of `Programming in M4). 2001-06-18 Nicolas Joly * tests/torture.at (AC_ARG_VAR): Set variables and export them in separate statements for compatibility with Tru64 v5.1. 2001-06-17 Akim Demaille * acgeneral.m4 (_AC_ARG_VAR_VALIDATE): Be sure to cache the current values of the precious variables, not the previously cached values. Pass precious variables which are set to config.status. * doc/autoconf.texi (Setting Output Variables): Document AC_ARG_VAR. * tests/torture.at (AC_ARG_VAR): New. 2001-06-15 Paul Eggert * doc/autoconf.texi: Move AC_FUNC_WAIT3 and AC_SYS_RESTARTABLE_SYSCALLS to the obsolete section, and explain why and how to replace them. * acfunctions.m4 (AC_FUNC_WAIT3): Warn as obsolete. * acspecific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise. 2001-06-15 Akim Demaille `build_alias', `host_alias', and `target_alias' are not AC_SUBST'd. Reported by Bruno Haible. * acgeneral.m4 (AC_ARG_VAR): Move the AC_SUBST, from here... (_AC_ARG_VAR_PRECIOUS): to here. 2001-06-15 Pavel Roskin * acheaders.m4 (_AC_CHECK_HEADER_DIRENT): Instead of defining an unused pointer use cast to this type and `if' statement to avoid warnings from the compiler. (AC_HEADER_TIME): Likewise. * actypes.m4 (AC_CHECK_MEMBER): s/foo/ac_aggr/. Use the member in `if' statement to avoid warnings from the compiler. Declare ac_aggr static to avoid the need to initialize it. 2001-06-14 Akim Demaille * doc/autoconf.texi (Portable Shell): Move to follow `Writing Macros'. 2001-06-13 Akim Demaille * m4/missing.m4, config/missing: Updated to Automake 1.4g's. Suggested by Alexander Mai. 2001-06-13 Akim Demaille * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Guard sys/types.h and sys/stat.h, and check for them. 2001-06-13 Akim Demaille * acheaders.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS): Support $4 = INCLUDES. 2001-06-12 Maciej W. Rozycki * acspecific.m4 (AC_PATH_XTRA): Check if linking against libX11 succeeds and only try adding libdnet upon a failure. 2001-06-12 Akim Demaille * autoscan.in (&output_kind): Output the comment only if it exists. (%kind_comment): Add entry for `programs'. (&output_programs): Use &output_kind. (&output_functions, &output_identifiers, &output_headers) (&output_programs): Inline, and remove. 2001-06-12 Akim Demaille * autoscan.in (%kind_comment): New. (output_kind): New. (output_functions, output_identifiers, output_headers): Use it. 2001-06-12 Akim Demaille * autoscan.in (&print_unique): Take `$kind' and `$word' as arguments, to factor indirections into `%macro' and `%used'. (%generic_macro): Fix a typo. 2001-06-12 Akim Demaille * aclibraries: New. * autoscan.in (@kinds): Add `libraries'. Use `@kinds' instead of hard coded lists. (%programs, %headers, %identifiers, %makevars, %libraries, %functions): Remove, replaced by... (%used): this. 2001-06-12 Akim Demaille * autoscan.in (%functions_macros %headers_macros) (%identifiers_macros %programs_macros %makevars_macros): Remove, replaced by... (%macro): New. 2001-06-11 Raja R Harinath * aclang.m4 (AC_NO_EXECUTABLES): Override _AC_COMPILER_EXEEXT_WORKS, not _AC_LANG_COMPILER_WORKS. 2001-06-11 Akim Demaille * aclang.m4 (AC_NO_EXECUTABLES): Define the macros with their trailing new line. Reported by Andreas Schwab. 2001-06-11 Akim Demaille * Makefile.am, Makefile.maint: Typos. 2001-06-09 Akim Demaille * doc/autoconf.texi (Here-Documents): New section, gathering documentation about here-documents. Use `href', not `uref', and other changes. 2001-06-09 Akim Demaille * doc/autoconf.texi (Portable Shell Programming): Promoted as a chapter. 2001-06-09 Akim Demaille * doc/autoconf.texi (Limitations of Builtins): Complete the description of the here-docs penalties with Alexandre Oliva's explanations. 2001-06-01 Paul Eggert * doc/autoconf.texi: Talk about here documents and speedups. Do not use "echo" on arbitrary strings. Spell "here-documents" consistently with the standard. 2001-06-09 Akim Demaille * doc/autoconf.texi (Concept Index): Introduce it. Regenerate the menus. 2001-06-09 Akim Demaille * Makefile.maint, GNUmakefile: New, from Jim Meyering. * config/prev-version.txt: New. * config/move-if-change: New, for GNU libc. 2001-06-06 Pavel Roskin * tests/atgeneral.m4 (AT_INIT): Remove "/bin/sh" after $SHELL. 2001-06-06 Akim Demaille * acgeneral.m4 (AC_CHECK_LIB): Fix the cache var name to work properly when $1 is not a literal. Fixes PR Autoconf/187, reported by Bram Moolenaar. 2001-06-06 Akim Demaille Invoking AC_COPYRIGHT before AC_INIT fails. * Makefile.am (.m4.m4f): Pass --fatal-warnings to m4. * acgeneral.m4 (_m4_divert(VERSION_FSF)) (_m4_divert(VERSION_USER)): New. (AC_COPYRIGHT): $2 is the diversion to use. (_AC_INIT_COPYRIGHT): Use the FSF diversion. (AC_INIT): Remove dead comments as now it's commutative. 2001-06-06 Akim Demaille * tests/semantics.at (AC_CHECK_LIB): Strengthen to reflect PR autoconf/187. 2001-06-05 Akim Demaille * acgeneral.m4 (_AC_INIT_PARSE_ARGS): `prefix' and `exec_prefix' can be empty. `*dir' variables cannot be NONE. Reported by Mark Kettenis. 2001-06-05 Paul Eggert * doc/autoconf.texi: Fix references to Solaris and SunOS versions. 2001-06-04 Akim Demaille * acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET) (AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP) (AC_TR_SH): Move as... * m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET) (AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP) (AS_TR_SH): these. (_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE) (_AS_TR_SH_PREPARE): New. (AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE. * tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified. 2001-06-02 Akim Demaille * Makefile.am (.m4.m4f): Pass the options first. Fixes PR autoconf/182. 2001-06-02 Nathan Sidwell GNU getopt, when POSIXLY_CORRECT does not permute options and arguments. So pass the options first. Fixes PR autoconf/184. * autoconf.sh (m4_prefiles, m4f_prefiles): New variables. (run_m4): Remove files. (run_m4f): Remove. Update remainder of script to use them. (for warning in): Do not use a literal comma as it will not be split by IFS. 2001-06-02 Christian Marquardt * aclang.m4 (AC_PROG_F77): Add Fujitsu's "frt" to the list of Fortran compilers to check. (_AC_PROG_F77_V): Add '-###' as a possible option to print information on library and object files. (AC_PROG_CXX): Add Fujitsu's "FCC" to the list of C++ compilers to check. 2001-06-02 Akim Demaille * autom4te.in (Request::@request): Declare with `vars', not `my', as it prevents updates via `do FILENAME'. 2001-06-02 Akim Demaille * configure.in (standards_texi): Remove, dead code. 2001-06-02 Akim Demaille * autom4te.in: New. 2001-06-02 Pavel Roskin * acgeneral.m4 (_AC_INIT_PREPARE): Don't rely on $? in the traps for signals other than 0 - exit with code 1. * m4sh.m4 (AS_TMPDIR): Likewise. * autoconf.in: Likewise. Also don't rely on exit == exit $?. * autoheader.in: Likewise. * autoreconf.in: Likewise. * tests/torture.at (Signal handling): New test for the above. 2001-06-01 Akim Demaille * m4sugar.m4 (m4_defn, m4_undefine, m4_popdef): Clarify the error message. 2001-05-31 Akim Demaille * acfunctions, acheaders, acidentifiers, acmakevars, acprograms: Add copyright and comments. * acheaders: Add stdint.h. Suggested by Paul Eggert. 2001-05-31 Akim Demaille * atgeneral.m4 (AT_INIT): Use $SHELL. * atspecific.m4 (AT_CHECK_DEFINES): Skip HAVE_STDINT_H. 2001-05-31 Akim Demaille * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Include stdint.h. From Paul Eggert and Lars Hecking. 2001-05-31 Akim Demaille * tests/base.at: Adjust line numbers in error messages. 2001-05-31 Akim Demaille * tests/base.at, tests/m4sh.at: When using AC_PLAIN_SCRIPT be sure to emit the bangshe line. Reported by David Carter. 2001-05-30 Steven G. Johnson * aclang.m4 (AC_PROG_F77): Add Compaq's "fort" to the list of Fortran (95) compilers to check. 2001-05-29 Alexandre Duret-Lutz * doc/autoconf.texi (Introduction, Pointers): Update the Autoconf Macro Archive URL. 2001-05-23 Pavel Roskin * aclang.m4 (AC_PROG_CPP): Use `break' instead of `break 2' since _AC_PROG_PREPROC_WORKS_IFELSE expands arguments outside the loop. (AC_PROG_CXXCPP): Likewise. 2001-05-22 Akim Demaille * config: New directory. * configure.in: AC_CONFIG_AUX_DIR it. * tests/atspecific.m4 (AT_CONFIGURE_AC): Adjust. 2001-05-22 Akim Demaille * autoconf.in, autoreconf.in, autoheader.in, autoscan.in, ifnames.in, * autoupdate.in: Specify the Emacs mode. * acversion.m4.in: Rename as... * acversion.m4: this. * tests/Makefile.am (CLEANFILES): More garbage. 2001-05-22 Akim Demaille * autoconf.sh, autoreconf.sh, autoheader.sh, autoscan.pl, ifnames.sh: Rename as... * autoconf.in, autoreconf.in, autoheader.in, autoscan.in, ifnames.in: these. 2001-05-21 Akim Demaille * configure.in: Bump to 2.50a. ----- Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Autoconf. GNU Autoconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Autoconf is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with autoconf; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. autoconf2.59-2.59+dfsg/bin/0000755000175000017500000000000012067673013014615 5ustar taffittaffitautoconf2.59-2.59+dfsg/bin/Makefile.am0000644000175000017500000001026307734532213016654 0ustar taffittaffit## Process this file with automake to create Makefile.in. -*-Makefile-*- ## Makefile for Autoconf. ## Copyright (C) 1999, 2000, 2001, 2002 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. include ../lib/freeze.mk bin_SCRIPTS = autom4te \ autoconf autoheader autoreconf ifnames autoscan autoupdate EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \ autoscan.in autom4te.in \ autoconf.as # Files that should be removed, but which Automake does not know. CLEANFILES = $(bin_SCRIPTS) ## ------------- ## ## The scripts. ## ## ------------- ## edit = sed \ -e 's,@SHELL\@,$(SHELL),g' \ -e 's,@PERL\@,$(PERL),g' \ -e 's,@bindir\@,$(bindir),g' \ -e 's,@datadir\@,$(pkgdatadir),g' \ -e 's,@prefix\@,$(prefix),g' \ -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \ -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \ -e 's,@autom4te-name\@,'`echo autom4te | sed '$(transform)'`',g' \ -e 's,@M4\@,$(M4),g' \ -e 's,@AWK\@,$(AWK),g' \ -e 's,@VERSION\@,$(VERSION),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ -e 's,@configure_input\@,Generated from $<; do not edit by hand.,g' # autoconf is written in M4sh. AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh --cache '' $(srcdir)/autoconf.in: $(srcdir)/autoconf.as # FIXME: $(m4sh_m4f_dependencies) $(AUTOM4SH) $(srcdir)/autoconf.as -o $@ ## All the files below depend on Makefile so that they are rebuilt ## when the prefix etc. changes. It took quite a while to have these ## rules correct, don't break them! In particular, we believe there is ## no solution to factor the code. ## Use chmod -w to prevent people from editing the wrong file by accident. autoconf: $(srcdir)/autoconf.in Makefile rm -f autoconf autoconf.tmp $(edit) $(srcdir)/autoconf.in >autoconf.tmp chmod +x autoconf.tmp chmod -w autoconf.tmp mv -f autoconf.tmp autoconf autoheader: $(srcdir)/autoheader.in Makefile rm -f autoheader autoheader.tmp $(edit) $(srcdir)/autoheader.in >autoheader.tmp chmod +x autoheader.tmp chmod -w autoheader.tmp mv -f autoheader.tmp autoheader autom4te: $(srcdir)/autom4te.in Makefile rm -f autom4te autom4te.tmp $(edit) $(srcdir)/autom4te.in >autom4te.tmp chmod +x autom4te.tmp chmod -w autom4te.tmp mv -f autom4te.tmp autom4te autoreconf: $(srcdir)/autoreconf.in Makefile rm -f autoreconf autoreconf.tmp $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp chmod +x autoreconf.tmp chmod -w autoreconf.tmp mv -f autoreconf.tmp autoreconf autoscan: $(srcdir)/autoscan.in Makefile rm -f autoscan autoscan.tmp $(edit) $(srcdir)/autoscan.in >autoscan.tmp chmod +x autoscan.tmp chmod -w autoscan.tmp mv -f autoscan.tmp autoscan autoupdate: $(srcdir)/autoupdate.in Makefile rm -f autoupdate autoupdate.tmp $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp chmod +x autoupdate.tmp chmod -w autoupdate.tmp mv -f autoupdate.tmp autoupdate ifnames: $(srcdir)/ifnames.in Makefile rm -f ifnames ifnames.tmp $(edit) $(srcdir)/ifnames.in >ifnames.tmp chmod +x ifnames.tmp chmod -w ifnames.tmp mv -f ifnames.tmp ifnames ## --------------- ## ## Building TAGS. ## ## --------------- ## TAGS_DEPENDENCIES = $(EXTRA_DIST) letters = abcdefghijklmnopqrstuvwxyz LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ DIGITS = 0123456789 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]* ETAGS_PERL = --lang=perl \ autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \ ifnames.in ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \ autoconf.in ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH) autoconf2.59-2.59+dfsg/bin/Makefile.in0000644000175000017500000003663707752412546016710 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/../lib/freeze.mk $(srcdir)/Makefile.in \ Makefile.am subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = am__installdirs = $(DESTDIR)$(bindir) binSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(bin_SCRIPTS) SOURCES = DIST_SOURCES = ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUFFIXES = .m4 .m4f # Do not use AUTOM4TE here, since Makefile.maint (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. But we _ship_ tests/autom4te, so it doesn't # apply to us. MY_AUTOM4TE = $(top_builddir)/tests/autom4te AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Factor the dependencies between all the frozen files. # Some day we should explain to Automake how to use autom4te to compute # the dependencies... src_libdir = $(top_srcdir)/lib build_libdir = $(top_builddir)/lib m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG) m4sugar_m4f_dependencies = \ $(m4f_dependencies) \ $(src_libdir)/m4sugar/m4sugar.m4 \ $(build_libdir)/m4sugar/version.m4 m4sh_m4f_dependencies = \ $(m4sugar_m4f_dependencies) \ $(src_libdir)/m4sugar/m4sh.m4 autotest_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autotest/autotest.m4 \ $(src_libdir)/autotest/general.m4 autoconf_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autoconf/autoscan.m4 \ $(src_libdir)/autoconf/general.m4 \ $(src_libdir)/autoconf/autoheader.m4 \ $(src_libdir)/autoconf/autoupdate.m4 \ $(src_libdir)/autoconf/autotest.m4 \ $(src_libdir)/autoconf/status.m4 \ $(src_libdir)/autoconf/oldnames.m4 \ $(src_libdir)/autoconf/specific.m4 \ $(src_libdir)/autoconf/lang.m4 \ $(src_libdir)/autoconf/c.m4 \ $(src_libdir)/autoconf/fortran.m4 \ $(src_libdir)/autoconf/functions.m4 \ $(src_libdir)/autoconf/headers.m4 \ $(src_libdir)/autoconf/types.m4 \ $(src_libdir)/autoconf/libs.m4 \ $(src_libdir)/autoconf/programs.m4 \ $(src_libdir)/autoconf/autoconf.m4 ETAGS_FOR_M4 = \ --lang=none \ --regex='/\(m4_define\|define\)(\[\([^]]*\)\]/\2/' ETAGS_FOR_M4SUGAR = \ $(ETAGS_FOR_M4) \ --regex='/m4_defun(\[\([^]]*\)\]/\1/' ETAGS_FOR_AUTOCONF = \ $(ETAGS_FOR_M4SUGAR) \ --regex='/\(A[CU]_DEFUN\|AU_ALIAS\)(\[\([^]]*\)\]/\2/' \ --regex='/AN_\(FUNCTION\|HEADER\|IDENTIFIER\|LIBRARY\|MAKEVAR\|PROGRAM\)(\[\([^]]*\)\]/\2/' bin_SCRIPTS = autom4te \ autoconf autoheader autoreconf ifnames autoscan autoupdate EXTRA_DIST = autoconf.in autoheader.in autoreconf.in autoupdate.in ifnames.in \ autoscan.in autom4te.in \ autoconf.as # Files that should be removed, but which Automake does not know. CLEANFILES = $(bin_SCRIPTS) edit = sed \ -e 's,@SHELL\@,$(SHELL),g' \ -e 's,@PERL\@,$(PERL),g' \ -e 's,@bindir\@,$(bindir),g' \ -e 's,@datadir\@,$(pkgdatadir),g' \ -e 's,@prefix\@,$(prefix),g' \ -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \ -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \ -e 's,@autom4te-name\@,'`echo autom4te | sed '$(transform)'`',g' \ -e 's,@M4\@,$(M4),g' \ -e 's,@AWK\@,$(AWK),g' \ -e 's,@VERSION\@,$(VERSION),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' \ -e 's,@configure_input\@,Generated from $<; do not edit by hand.,g' # autoconf is written in M4sh. AUTOM4SH = $(top_builddir)/tests/autom4te --language M4sh --cache '' TAGS_DEPENDENCIES = $(EXTRA_DIST) letters = abcdefghijklmnopqrstuvwxyz LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ DIGITS = 0123456789 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]* ETAGS_PERL = --lang=perl \ autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \ ifnames.in ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \ autoconf.in ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH) all: all-am .SUFFIXES: .SUFFIXES: .m4 .m4f $(srcdir)/Makefile.in: Makefile.am $(srcdir)/../lib/freeze.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bin/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu bin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done uninstall-info-am: tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/../lib @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binSCRIPTS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binSCRIPTS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ ctags distclean distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binSCRIPTS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binSCRIPTS uninstall-info-am $(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg # When processing the file with diversion disabled, there must be no # output but comments and empty lines. # If freezing produces output, something went wrong: a bad `divert', # or an improper paren etc. # It may happen that the output does not end with a end of line, hence # force an end of line when reporting errors. .m4.m4f: $(MY_AUTOM4TE) \ --language=$* \ --freeze \ --output=$@ # For parallel builds. $(build_libdir)/m4sugar/version.m4: cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4 check-forbidden-patterns: if (cd $(srcdir) && \ grep $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ sed "s,^,$*.m4: ," &2; \ echo >&2; \ exit 1; \ else \ rm -f forbidden.log; \ fi $(srcdir)/autoconf.in: $(srcdir)/autoconf.as # FIXME: $(m4sh_m4f_dependencies) $(AUTOM4SH) $(srcdir)/autoconf.as -o $@ autoconf: $(srcdir)/autoconf.in Makefile rm -f autoconf autoconf.tmp $(edit) $(srcdir)/autoconf.in >autoconf.tmp chmod +x autoconf.tmp chmod -w autoconf.tmp mv -f autoconf.tmp autoconf autoheader: $(srcdir)/autoheader.in Makefile rm -f autoheader autoheader.tmp $(edit) $(srcdir)/autoheader.in >autoheader.tmp chmod +x autoheader.tmp chmod -w autoheader.tmp mv -f autoheader.tmp autoheader autom4te: $(srcdir)/autom4te.in Makefile rm -f autom4te autom4te.tmp $(edit) $(srcdir)/autom4te.in >autom4te.tmp chmod +x autom4te.tmp chmod -w autom4te.tmp mv -f autom4te.tmp autom4te autoreconf: $(srcdir)/autoreconf.in Makefile rm -f autoreconf autoreconf.tmp $(edit) $(srcdir)/autoreconf.in >autoreconf.tmp chmod +x autoreconf.tmp chmod -w autoreconf.tmp mv -f autoreconf.tmp autoreconf autoscan: $(srcdir)/autoscan.in Makefile rm -f autoscan autoscan.tmp $(edit) $(srcdir)/autoscan.in >autoscan.tmp chmod +x autoscan.tmp chmod -w autoscan.tmp mv -f autoscan.tmp autoscan autoupdate: $(srcdir)/autoupdate.in Makefile rm -f autoupdate autoupdate.tmp $(edit) $(srcdir)/autoupdate.in >autoupdate.tmp chmod +x autoupdate.tmp chmod -w autoupdate.tmp mv -f autoupdate.tmp autoupdate ifnames: $(srcdir)/ifnames.in Makefile rm -f ifnames ifnames.tmp $(edit) $(srcdir)/ifnames.in >ifnames.tmp chmod +x ifnames.tmp chmod -w ifnames.tmp mv -f ifnames.tmp ifnames # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/bin/ifnames.in0000644000175000017500000000741707741534670016610 0ustar taffittaffit#! @PERL@ -w # -*- perl -*- # @configure_input@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; # ifnames - print the identifiers used in C preprocessor conditionals # Copyright (C) 1994, 1995, 1999, 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Reads from stdin if no files are given. # Writes to stdout. # Written by David MacKenzie # and Paul Eggert . BEGIN { my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@'; unshift @INC, $datadir; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); } use Autom4te::General; use Autom4te::XFile; # $HELP # ----- $help = "Usage: $0 [OPTION] ... [FILE] ... Scan all of the C source FILES (or the standard input, if none are given) and write to the standard output a sorted list of all the identifiers that appear in those files in `#if', `#elif', `#ifdef', or `#ifndef' directives. Print each identifier on a line, followed by a space-separated list of the files in which that identifier occurs. -h, --help print this help, then exit -V, --version print version number, then exit Report bugs to . "; # $VERSION # -------- $version = "ifnames (@PACKAGE_NAME@) @VERSION@ Written by David J. MacKenzie and Paul Eggert. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; # &parse_args () # -------------- # Process any command line arguments. sub parse_args () { getopt (); } # %OCCURRENCE # ----------- my %occurrence; # &scan_file ($FILENAME) # ---------------------- sub scan_file ($) { my ($filename) = @_; my $file = new Autom4te::XFile ($filename); while ($_ = $file->getline) { # Continuation lines. $_ .= $file->getline while (s/\\$//); # Preprocessor directives. if (s/^\s*\#\s*(if|ifdef|ifndef|elif)\s+//) { # Remove comments. Not perfect, but close enough. s(/\*.*?\*/)(); s(/\*.*)(); s(//.*)(); foreach my $word (split (/\W+/)) { next if $word eq 'defined' || $word !~ /^[a-zA-Z_]/; $occurrence{$word}{$filename} = 1; } } } } ## ------ ## ## Main. ## ## ------ ## parse_args(); foreach (@ARGV) { scan_file ($_); } foreach (sort keys %occurrence) { print "$_ ", join (' ', sort keys %{$occurrence{$_}}), "\n"; } ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: autoconf2.59-2.59+dfsg/bin/autoreconf.in0000755000175000017500000004510612067673013017323 0ustar taffittaffit#! @PERL@ -w # -*- perl -*- # @configure_input@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; # autoreconf - install the GNU Build System in a directory tree # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Written by David J. MacKenzie. # Extended and rewritten in Perl by Akim Demaille. BEGIN { my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@'; unshift @INC, $datadir; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); } use Autom4te::ChannelDefs; use Autom4te::Channels; use Autom4te::Configure_ac; use Autom4te::FileUtils; use Autom4te::General; use Autom4te::XFile; # Do not use Cwd::chdir, since it might hang. use Cwd 'cwd'; use strict; ## ----------- ## ## Variables. ## ## ----------- ## # $HELP # ----- $help = "Usage: $0 [OPTION] ... [CONFIGURE-AC or DIRECTORY] ... Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' (formerly `gettextize'), and `libtoolize' where appropriate) repeatedly to remake the GNU Build System files in the DIRECTORIES or the directory trees driven by CONFIGURE-AC (defaulting to `.'). By default, it only remakes those files that are older than their predecessors. If you install new versions of the GNU Build System, running `autoreconf' remakes all of the files by giving it the `--force' option. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files -f, --force consider all files obsolete -i, --install copy missing auxiliary files -s, --symlink with -i, install symbolic links instead of copies -m, --make when applicable, re-run ./configure && make -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] " . Autom4te::ChannelDefs::usage . " The environment variable \`WARNINGS\' is honored. Some subtools might support other warning types, using \`all' is encouraged. Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL, AUTOPOINT, LIBTOOLIZE are honored. Report bugs to . "; # $VERSION # -------- $version = "autoreconf (@PACKAGE_NAME@) @VERSION@ Written by David J. MacKenzie and Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; # Lib files. my $autoconf = $ENV{'AUTOCONF'} || '@bindir@/@autoconf-name@'; my $autoheader = $ENV{'AUTOHEADER'} || '@bindir@/@autoheader-name@'; my $automake = $ENV{'AUTOMAKE'} || 'automake'; my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; my $autopoint = $ENV{'AUTOPOINT'} || 'autopoint'; # --install -- as --add-missing in other tools. my $install = 0; # symlink -- when --install, use symlinks instead. my $symlink = 0; # Does aclocal support --force? my $aclocal_supports_force = 0; my @prepend_include; my @include; # List of command line warning requests. my @warning; # Rerun `./configure && make'? my $make = 0; ## ---------- ## ## Routines. ## ## ---------- ## # parse_args () # ------------- # Process any command line arguments. sub parse_args () { my $srcdir; getopt ("W|warnings=s" => \@warning, 'I|include=s' => \@include, 'B|prepend-include=s' => \@prepend_include, 'i|install' => \$install, 's|symlink' => \$symlink, 'm|make' => \$make); # Split the warnings as a list of elements instead of a list of # lists. @warning = map { split /,/ } @warning; parse_WARNINGS; parse_warnings '--warnings', @warning; # Even if the user specified a configure.ac, trim to get the # directory, and look for configure.ac again. Because (i) the code # is simpler, and (ii) we are still able to diagnose simultaneous # presence of configure.ac and configure.in. @ARGV = map { /configure\.(ac|in)$/ ? dirname ($_) : $_ } @ARGV; push @ARGV, '.' unless @ARGV; if ($verbose && $debug) { for my $prog ($autoconf, $autoheader, $automake, $aclocal, $autopoint, $libtoolize) { xsystem ("$prog --version | sed 1q >&2"); print STDERR "\n"; } } $aclocal_supports_force = `$aclocal --help` =~ /--force/; # Dispatch autoreconf's option to the tools. # --include; $autoconf .= join (' --include=', '', @include); $autoconf .= join (' --prepend-include=', '', @prepend_include); $autoheader .= join (' --include=', '', @include); $autoheader .= join (' --prepend-include=', '', @prepend_include); # --install and --symlink; if ($install) { $automake .= ' --add-missing'; $automake .= ' --copy' unless $symlink; $libtoolize .= ' --copy' unless $symlink; } # --force; if ($force) { $aclocal .= ' --force' if $aclocal_supports_force; $autoconf .= ' --force'; $autoheader .= ' --force'; $automake .= ' --force-missing'; $autopoint .= ' --force'; $libtoolize .= ' --force'; } else { # The implementation of --no-force is bogus in all implementations # of Automake up to 1.8, so we avoid it in these cases. (Automake # 1.8 is the first version where aclocal supports force, hence # the condition.) $automake .= ' --no-force' if $aclocal_supports_force; } # --debug; if ($debug) { $autoconf .= ' --verbose --debug'; $autoheader .= ' --verbose --debug'; $automake .= ' --verbose'; $aclocal .= ' --verbose'; $libtoolize .= ' --debug'; } # --warnings; if (@warning) { my $warn = ' --warnings=' . join (',', @warning); $autoconf .= $warn; $autoheader .= $warn; $automake .= $warn if `$automake --help` =~ /--warnings/; } } # &run_aclocal ($ACLOCAL, $FLAGS) # ------------------------------- # Update aclocal.m4 as lazily as possible, as aclocal pre-1.8 always # overwrites aclocal.m4, hence triggers autoconf, autoheader, automake # etc. uselessly. aclocal 1.8+ does not need this. sub run_aclocal ($$) { my ($aclocal, $flags) = @_; # aclocal 1.8+ does all this for free. It can be recognized by its # --force support. if ($aclocal_supports_force) { xsystem ("$aclocal $flags"); } else { xsystem ("$aclocal $flags --output=aclocal.m4t"); # aclocal may produce no output. if (-f 'aclocal.m4t') { update_file ('aclocal.m4t', 'aclocal.m4'); # Make sure that the local m4 files are older than # aclocal.m4. # # Why is not always the case? Because we already run # aclocal at first (before tracing), which, for instance, # can find Gettext's macros in .../share/aclocal, so we may # have had the right aclocal.m4 already. Then autopoint is # run, and installs locally these M4 files. Then # autoreconf, via update_file, sees it is the _same_ # aclocal.m4, and doesn't change its timestamp. But later, # Automake's Makefile expresses that aclocal.m4 depends on # these local files, which are newer, so it triggers aclocal # again. # # To make sure aclocal.m4 is no older, we change the # modification times of the local M4 files to be not newer # than it. # # First, where are the local files? my $aclocal_local_dir = '.'; if ($flags =~ /-I\s+(\S+)/) { $aclocal_local_dir = $1; } # All the local files newer than aclocal.m4 are to be # made not newer than it. my $aclocal_m4_mtime = mtime ('aclocal.m4'); for my $file (glob ("$aclocal_local_dir/*.m4"), 'acinclude.m4') { if ($aclocal_m4_mtime < mtime ($file)) { debug "aging $file to be not newer than aclocal.m4"; utime $aclocal_m4_mtime, $aclocal_m4_mtime, $file; } } } } } # &autoreconf_current_directory # ----------------------------- sub autoreconf_current_directory () { my $configure_ac = require_configure_ac; # ---------------------- # # Is it using Autoconf? # # ---------------------- # my $uses_autoconf; my $uses_gettext; my $configure_ac_file = new Autom4te::XFile $configure_ac; while ($_ = $configure_ac_file->getline) { s/#.*//; s/dnl.*//; $uses_autoconf = 1 if /AC_INIT/; # See below for why we look for gettext here. $uses_gettext = 1 if /^AM_GNU_GETTEXT_VERSION/; } if (!$uses_autoconf) { verb "$configure_ac: not using Autoconf"; return; } # ------------------- # # Running autopoint. # # ------------------- # # Gettext is a bit of a problem: its macros are not necessarily # visible to aclocal, so if we start with a completely striped down # package (think of a fresh CVS checkout), running `aclocal' first # will fail: the Gettext macros are missing. # # Therefore, we can't use the traces to decide if we use Gettext or # not. I guess that once Gettext move to 2.5x we will be able to, # but in the meanwhile forget it. # # We can only grep for AM_GNU_GETTEXT_VERSION in configure.ac. You # might think this approach is naive, and indeed it is, as it # prevents one to embed AM_GNU_GETTEXT_VERSION in another *.m4, but # anyway we don't limit the generality, since... that's what # autopoint does. Actually, it is even more restrictive, as it # greps for `^AM_GNU_GETTEXT_VERSION('. We did this above, while # scanning configure.ac. if (!$uses_gettext) { verb "$configure_ac: not using Gettext"; } elsif (!$install) { verb "$configure_ac: not running autopoint: --install not given"; } else { xsystem "$autopoint"; } # ----------------- # # Running aclocal. # # ----------------- # # Run it first: it might discover new macros to add, e.g., # AC_PROG_LIBTOOL, which we will trace later to see if Libtool is # used. # # Always run it. Tracking its sources for up-to-dateness is too # complex and too error prone. The best we can do is avoiding # nuking the time stamp. my $uses_aclocal = 1; # Nevertheless, if aclocal.m4 exists and is not made by aclocal, # don't run aclocal. if (-f 'aclocal.m4') { my $aclocal_m4 = new Autom4te::XFile 'aclocal.m4'; $_ = $aclocal_m4->getline; $uses_aclocal = 0 unless defined ($_) && /generated.*by aclocal/; } # If there are flags for aclocal in Makefile.am, use them. my $aclocal_flags = ''; if ($uses_aclocal && -f 'Makefile.am') { my $makefile = new Autom4te::XFile 'Makefile.am'; while ($_ = $makefile->getline) { if (/^ACLOCAL_[A-Z_]*FLAGS\s*=\s*(.*)/) { $aclocal_flags = $1; last; } } } if (!$uses_aclocal) { verb "$configure_ac: not using aclocal"; } else { # Some filesystems have sub-second time stamps, and if so we may # run into trouble later, after we rerun autoconf and set the # time stamps of input files to be no greater than aclocal.m4, # because the time-stamp-setting operation (utime) has a # resolution of only 1 second. Work around the problem by # ensuring that there is at least a one-second window before the # time stamp of aclocal.m4t in which no file time stamps can # fall. sleep 1; run_aclocal ($aclocal, $aclocal_flags); } # We might have to rerun aclocal if Libtool (or others) imports new # macros. my $rerun_aclocal = 0; # ------------------------------- # # See what tools will be needed. # # ------------------------------- # # Perform a single trace reading to avoid --force forcing a rerun # between two --trace, that's useless. If there is no AC_INIT, then # we are not interested: it looks like a Cygnus thingy. my $aux_dir; my $uses_gettext_via_traces; my $uses_libtool; my $uses_autoheader; my @subdir; verb "$configure_ac: tracing"; my $traces = new Autom4te::XFile ("$autoconf" . join (' --trace=', '', # If you change this list, update the # `Autoreconf-preselections' section of autom4te.in. 'AC_CONFIG_AUX_DIR:AC_CONFIG_AUX_DIR:\$1', 'AC_CONFIG_HEADERS', 'AC_CONFIG_SUBDIRS:AC_CONFIG_SUBDIRS:\$1', 'AC_INIT', 'AC_PROG_LIBTOOL', 'AM_GNU_GETTEXT', ) . ' |'); while ($_ = $traces->getline) { $aux_dir = $1 if /AC_CONFIG_AUX_DIR:(.*)/; $uses_autoconf = 1 if /AC_INIT/; $uses_gettext_via_traces = 1 if /AM_GNU_GETTEXT/; $uses_libtool = 1 if /AC_PROG_LIBTOOL/; $uses_autoheader = 1 if /AC_CONFIG_HEADERS/; push @subdir, split (' ', $1) if /AC_CONFIG_SUBDIRS:(.*)/; } # The subdirs are *optional*, they may not exist. foreach (@subdir) { if (-d) { verb "$configure_ac: subdirectory $_ to autoreconf"; autoreconf ($_); } else { verb "$configure_ac: subdirectory $_ not present"; } } # Gettext consistency checks... error "$configure_ac: AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION" if $uses_gettext_via_traces && ! $uses_gettext; error "$configure_ac: AM_GNU_GETTEXT_VERSION is used, but not AM_GNU_GETTEXT" if $uses_gettext && ! $uses_gettext_via_traces; # ---------------------------- # # Setting up the source tree. # # ---------------------------- # # libtoolize, automake --add-missing etc. will drop files in the # $AUX_DIR. But these tools fail to install these files if the # directory itself does not exist, which valid: just imagine a CVS # repository with hand written code only (there is not even a need # for a Makefile.am!). if (defined $aux_dir && ! -d $aux_dir) { verb "$configure_ac: creating directory $aux_dir"; mkdir $aux_dir or error "cannot create $aux_dir: $!"; } # -------------------- # # Running libtoolize. # # -------------------- # if (!$uses_libtool) { verb "$configure_ac: not using Libtool"; } elsif ($install) { xsystem ($libtoolize); $rerun_aclocal = 1; } else { verb "$configure_ac: not running libtoolize: --install not given"; } # ------------------- # # Rerunning aclocal. # # ------------------- # # If we re-installed Libtool or Gettext, the macros might have changed. # Automake also needs an up-to-date aclocal.m4. if ($rerun_aclocal) { if (!$uses_aclocal) { verb "$configure_ac: not using aclocal"; } else { run_aclocal ($aclocal, $aclocal_flags); } } # ------------------ # # Running autoconf. # # ------------------ # # Don't try to be smarter than `autoconf', which does its own up to # date checks. # # We prefer running autoconf before autoheader, because (i) the # latter runs the former, and (ii) autoconf is stricter than # autoheader. So all in all, autoconf should give better error # messages. xsystem ($autoconf); # -------------------- # # Running autoheader. # # -------------------- # # We now consider that if AC_CONFIG_HEADERS is used, then autoheader # is used too. # # Just as for autoconf, up to date ness is performed by the tool # itself. # # Run it before automake, since the latter checks the presence of # config.h.in when it sees an AC_CONFIG_HEADERS. if (!$uses_autoheader) { verb "$configure_ac: not using Autoheader"; } else { xsystem ($autoheader); } # ------------------ # # Running automake. # # ------------------ # # Assumes that there is a Makefile.am in the topmost directory. if (!-f 'Makefile.am') { verb "$configure_ac: not using Automake"; } else { # We should always run automake, and let it decide whether it shall # update the file or not. In fact, the effect of `$force' is already # included in `$automake' via `--no-force'. xsystem ($automake); } # -------------- # # Running make. # # -------------- # if ($make) { if (!-f "config.status") { verb "no config.status: cannot re-make"; } else { xsystem ("./config.status --recheck"); xsystem ("./config.status"); if (!-f "Makefile") { verb "no Makefile: cannot re-make"; } else { xsystem ("make"); } } } } # &autoreconf ($DIRECTORY) # ------------------------ # Reconf the $DIRECTORY. sub autoreconf ($) { my ($directory) = @_; my $cwd = cwd; # The format for this message is not free: taken from Emacs, itself # using GNU Make's format. verb "Entering directory `$directory'"; chdir $directory or error "cannot chdir to $directory: $!"; autoreconf_current_directory; # The format is not free: taken from Emacs, itself using GNU Make's # format. verb "Leaving directory `$directory'"; chdir $cwd or error "cannot chdir to $cwd: $!"; } ## ------ ## ## Main. ## ## ------ ## # When debugging, it is convenient that all the related temporary # files be at the same place. mktmpdir ('ar'); $ENV{'TMPDIR'} = $tmp; parse_args; # Autoreconf all the given configure.ac. A while loop, not a for, # since the list can change at runtime because of AC_CONFIG_SUBDIRS. for my $directory (@ARGV) { autoreconf ($directory); } ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: autoconf2.59-2.59+dfsg/bin/autoheader.in0000644000175000017500000001761107741534670017304 0ustar taffittaffit#! @PERL@ # -*- Perl -*- # @configure_input@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; # autoheader -- create `config.h.in' from `configure.ac' # Copyright (C) 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Written by Roland McGrath. # Rewritten in Perl by Akim Demaille. BEGIN { my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@'; unshift @INC, "$datadir"; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); } use Autom4te::ChannelDefs; use Autom4te::Channels; use Autom4te::Configure_ac; use Autom4te::FileUtils; use Autom4te::General; use Autom4te::XFile; use strict; # Using `do FILE', we need `local' vars. use vars qw ($config_h %verbatim %symbol); # Lib files. my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; local $config_h; my $config_h_in; my @prepend_include; my @include; # $HELP # ----- $help = "Usage: $0 [OPTION] ... [TEMPLATE-FILE] Create a template file of C \`\#define\' statements for \`configure\' to use. To this end, scan TEMPLATE-FILE, or \`configure.ac\' if present, or else \`configure.in\'. -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don\'t remove temporary files -f, --force consider all files obsolete -W, --warnings=CATEGORY report the warnings falling in CATEGORY " . Autom4te::ChannelDefs::usage () . " Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Report bugs to . "; # $VERSION # -------- $version = "autoheader (@PACKAGE_NAME@) @VERSION@ Written by Roland McGrath and Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ---------- ## ## Routines. ## ## ---------- ## # parse_args () # ------------- # Process any command line arguments. sub parse_args () { my $srcdir; parse_WARNINGS; getopt ('I|include=s' => \@include, 'B|prepend-include=s' => \@prepend_include, 'W|warnings=s' => \&parse_warnings); if (! @ARGV) { my $configure_ac = require_configure_ac; push @ARGV, $configure_ac; } } ## -------------- ## ## Main program. ## ## -------------- ## mktmpdir ('ah'); switch_warning 'obsolete'; parse_args; # Preach. my $config_h_top = find_file ("config.h.top?", reverse (@prepend_include), @include); my $config_h_bot = find_file ("config.h.bot?", reverse (@prepend_include), @include); my $acconfig_h = find_file ("acconfig.h?", reverse (@prepend_include), @include); if ($config_h_top || $config_h_bot || $acconfig_h) { my $msg = << "END"; Using auxiliary files such as \`acconfig.h\', \`config.h.bot\' and \`config.h.top\', to define templates for \`config.h.in\' is deprecated and discouraged. Using the third argument of \`AC_DEFINE\' and \`AC_DEFINE_UNQUOTED\' allows to define a template without \`acconfig.h\': AC_DEFINE([NEED_FUNC_MAIN], 1, [Define if a function \`main\' is needed.]) More sophisticated templates can also be produced, see the documentation. END $msg =~ s/^ /WARNING: /gm; msg 'obsolete', $msg; } # Set up autoconf. my $autoconf = "$autom4te --language=autoconf "; $autoconf .= join (' ', map { "--include=$_" } @include); $autoconf .= join (' ', map { "--prepend-include=$_" } @prepend_include); $autoconf .= ' --debug' if $debug; $autoconf .= ' --force' if $force; $autoconf .= ' --verbose' if $verbose; # ----------------------- # # Real work starts here. # # ----------------------- # # Source what the traces are trying to tell us. verb "$me: running $autoconf to trace from $ARGV[0]"; xsystem ("$autoconf" # If you change this list, update the # `Autoheader-preselections' section of autom4te.in. . ' --trace AC_CONFIG_HEADERS:\'$$config_h ||= \'"\'"\'$1\'"\'"\';\'' . ' --trace AH_OUTPUT:\'$$verbatim{\'"\'"\'$1\'"\'"\'} = \'"\'"\'$2\'"\'"\';\'' . ' --trace AC_DEFINE_TRACE_LITERAL:\'$$symbol{\'"\'"\'$1\'"\'"\'} = 1;\'' . " $ARGV[0] >$tmp/traces.pl"); local (%verbatim, %symbol); debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $tmp/traces.pl`; do "$tmp/traces.pl"; warn "couldn't parse $tmp/traces.pl: $@" if $@; error "error: AC_CONFIG_HEADERS not found in $ARGV[0]" unless $config_h; # We template only the first CONFIG_HEADER. $config_h =~ s/ .*//; # Support "outfile[:infile]", defaulting infile="outfile.in". ($config_h, $config_h_in) = split (':', $config_h, 2); $config_h_in ||= "$config_h.in"; # %SYMBOL might contain things like `F77_FUNC(name,NAME)', but we keep # only the name of the macro. %symbol = map { s/\(.*//; $_ => 1 } keys %symbol; my $out = new Autom4te::XFile (">$tmp/config.hin"); # Don't write "do not edit" -- it will get copied into the # config.h, which it's ok to edit. print $out "/* $config_h_in. Generated from $ARGV[0] by autoheader. */\n"; # Dump the top. if ($config_h_top) { my $in = new Autom4te::XFile ($config_h_top); while ($_ = $in->getline) { print $out $_; } } # Dump `acconfig.h', except for its bottom portion. if ($acconfig_h) { my $in = new Autom4te::XFile ($acconfig_h); while ($_ = $in->getline) { last if /\@BOTTOM\@/; next if /\@TOP\@/; print $out $_; } } # Dump the templates from `configure.ac'. foreach (sort keys %verbatim) { print $out "\n$verbatim{$_}\n"; } # Dump bottom portion of `acconfig.h'. if ($acconfig_h) { my $in = new Autom4te::XFile ($acconfig_h); my $dump = 0; while ($_ = $in->getline) { print $out $_ if $dump; $dump = 1 if /\@BOTTOM\@/; } } # Dump the bottom. if ($config_h_bot) { my $in = new Autom4te::XFile ($config_h_bot); while ($_ = $in->getline) { print $out $_; } } $out->close; # Check that all the symbols have a template. { my $in = new Autom4te::XFile ("$tmp/config.hin"); my $suggest_ac_define = 1; while ($_ = $in->getline) { my ($symbol) = /^\#\s*\w+\s+(\w+)/ or next; delete $symbol{$symbol}; } foreach (sort keys %symbol) { msg 'syntax', "warning: missing template: $_"; if ($suggest_ac_define) { msg 'syntax', "Use AC_DEFINE([$_], [], [Description])"; $suggest_ac_define = 0; } } exit 1 if keys %symbol; } update_file ("$tmp/config.hin", "$config_h_in"); ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: autoconf2.59-2.59+dfsg/bin/autom4te.in0000755000175000017500000007273407747426544016745 0ustar taffittaffit#! @PERL@ -w # -*- perl -*- # @configure_input@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; # autom4te - Wrapper around M4 libraries. # Copyright (C) 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. BEGIN { my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@'; unshift @INC, $datadir; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); } use Autom4te::C4che; use Autom4te::ChannelDefs; use Autom4te::Channels; use Autom4te::FileUtils; use Autom4te::General; use Autom4te::XFile; use File::Basename; use strict; # Data directory. my $datadir = $ENV{'AC_MACRODIR'} || '@datadir@'; # $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE. my %language; my $output = '-'; # Mode of the output file except for traces. my $mode = "0666"; # If melt, don't use frozen files. my $melt = 0; # Names of the cache directory, cache directory index, trace cache # prefix, and output cache prefix. And the IO objet for the index. my $cache; my $icache; my $tcache; my $ocache; my $icache_file; # The macros to trace mapped to their format, as specified by the # user. my %trace; # The macros the user will want to trace in the future. # We need `include' to get the included file, `m4_pattern_forbid' and # `m4_pattern_allow' to check the output. # # FIXME: What about `sinclude'? my @preselect = ('include', 'm4_pattern_allow', 'm4_pattern_forbid', '_m4_warn'); # M4 include path. my @include; # Do we freeze? my $freeze = 0; # $M4. my $m4 = $ENV{"M4"} || '@M4@'; # Some non-GNU m4's don't reject the --help option, so give them /dev/null. fatal "need GNU m4 1.4 or later: $m4" if system "$m4 --help &1 | grep reload-state >/dev/null"; # Set some high recursion limit as the default limit, 250, has already # been hit with AC_OUTPUT. Don't override the user's choice. $m4 .= ' --nesting-limit=1024' if " $m4 " !~ / (--nesting-limit|-L) /; # @M4_BUILTIN -- M4 builtins and a useful comment. my @m4_builtin = `echo dumpdef | $m4 2>&1 >/dev/null`; map { s/:.*//;s/\W// } @m4_builtin; # %M4_BUILTIN_ALTERNATE_NAME # -------------------------- # The builtins are renamed, e.g., `define' is renamed `m4_define'. # So map `define' to `m4_define' and conversely. # Some macros don't follow this scheme: be sure to properly map to their # alternate name too. # # This is because GNU M4 1.4's tracing of builtins is buggy. When run on # this input: # # | divert(-1) # | changequote([, ]) # | define([m4_eval], defn([eval])) # | eval(1) # | m4_eval(2) # | undefine([eval]) # | m4_eval(3) # # it behaves this way: # # | % m4 input.m4 -da -t eval # | m4trace: -1- eval(1) # | m4trace: -1- m4_eval(2) # | m4trace: -1- m4_eval(3) # | % # # Conversely: # # | % m4 input.m4 -da -t m4_eval # | % # # So we will merge them, i.e. tracing `BUILTIN' or tracing # `m4_BUILTIN' will be the same: tracing both, but honoring the # *last* trace specification. # # FIXME: This is not enough: in the output `$0' will be `BUILTIN' # sometimes and `m4_BUILTIN' at others. We should return a unique name, # the one specified by the user. # # FIXME: To be absolutely rigorous, I would say that given that we # _redefine_ divert (instead of _copying_ it), divert and the like # should not be part of this list. my %m4_builtin_alternate_name; @m4_builtin_alternate_name{"$_", "m4_$_"} = ("m4_$_", "$_") foreach (grep { !/m4wrap|m4exit|dnl|ifelse|__.*__/ } @m4_builtin); @m4_builtin_alternate_name{"ifelse", "m4_if"} = ("m4_if", "ifelse"); @m4_builtin_alternate_name{"m4exit", "m4_exit"} = ("m4_exit", "m4exit"); @m4_builtin_alternate_name{"m4wrap", "m4_wrap"} = ("m4_wrap", "m4wrap"); # $HELP # ----- $help = "Usage: $0 [OPTION] ... [FILES] Run GNU M4 on the FILES, avoiding useless runs. Output the traces if tracing, the frozen file if freezing, otherwise the expansion of the FILES. If some of the FILES are named \`FILE.m4f\' they are considered to be M4 frozen files of all the previous files (which are therefore not loaded). If \`FILE.m4f\' is not found, then \`FILE.m4\' will be used, together with all the previous files. Some files may be optional, i.e., will only be processed if found in the include path, but then must end in \`.m4?\'; the question mark is not part of the actual file name. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don\'t remove temporary files -o, --output=FILE save output in FILE (defaults to \`-\', stdout) -f, --force don\'t rely on cached values -W, --warnings=CATEGORY report the warnings falling in CATEGORY -l, --language=LANG specify the set of M4 macros to use -C, --cache=DIRECTORY preserve results for future runs in DIRECTORY --no-cache disable the cache -m, --mode=OCTAL change the non trace output file mode (0666) -M, --melt don\'t use M4 frozen files Languages include: \`Autoconf\' create Autoconf configure scripts \`Autotest\' create Autotest test suites \`M4sh\' create M4sh shell scripts \`M4sugar\' create M4sugar output " . Autom4te::ChannelDefs::usage . " The environment variable \`WARNINGS\' is honored. Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Tracing: -t, --trace=MACRO report the MACRO invocations -p, --preselect=MACRO prepare to trace MACRO in a future run Freezing: -F, --freeze produce an M4 frozen state file for FILES Report bugs to . "; # $VERSION # -------- $version = <<"EOF"; autom4te (@PACKAGE_NAME@) @VERSION@ Written by Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. EOF ## ---------- ## ## Routines. ## ## ---------- ## # $OPTION # files_to_options (@FILE) # ------------------------ # Transform Autom4te conventions (e.g., using foo.m4f to designate a frozen # file) into a suitable command line for M4 (e.g., using --reload-state). sub files_to_options (@) { my (@file) = @_; my @res; foreach my $file (@file) { if ($file =~ /\.m4f$/) { push @res, "--reload-state=$file"; } else { push @res, $file; } } return join ' ', @res; } # load_configuration ($FILE) # -------------------------- # Load the configuration $FILE. sub load_configuration ($) { my ($file) = @_; use Text::ParseWords; my $cfg = new Autom4te::XFile ($file); my $lang; while ($_ = $cfg->getline) { chomp; # Comments. next if /^\s*(\#.*)?$/; my @words = shellwords ($_); my $type = shift @words; if ($type eq 'begin-language:') { fatal "$file:$.: end-language missing for: $lang" if defined $lang; $lang = lc $words[0]; } elsif ($type eq 'end-language:') { error "$file:$.: end-language mismatch: $lang" if $lang ne lc $words[0]; $lang = undef; } elsif ($type eq 'args:') { fatal "$file:$.: no current language" unless defined $lang; push @{$language{$lang}}, @words; } else { error "$file:$.: unknown directive: $type"; } } } # parse_args () # ------------- # Process any command line arguments. sub parse_args () { # We want to look for the early options, which should not be found # in the configuration file. Prepend to the user arguments. # Perform this repeatedly so that we can use --language in language # definitions. Beware that there can be several --language # invocations. my @language; do { @language = (); use Getopt::Long; Getopt::Long::Configure ("pass_through", "permute"); GetOptions ("l|language=s" => \@language); foreach (@language) { error "unknown language: $_" unless exists $language{lc $_}; unshift @ARGV, @{$language{lc $_}}; } } while @language; # --debug is useless: it is parsed below. if (exists $ENV{'AUTOM4TE_DEBUG'}) { print STDERR "$me: concrete arguments:\n"; foreach my $arg (@ARGV) { print STDERR "| $arg\n"; } } # Process the arguments for real this time. my @trace; my @prepend_include; parse_WARNINGS; getopt ( # Operation modes: "o|output=s" => \$output, "W|warnings=s" => \&parse_warnings, "m|mode=s" => \$mode, "M|melt" => \$melt, # Library directories: "B|prepend-include=s" => \@prepend_include, "I|include=s" => \@include, # Tracing: # Using a hash for traces is seducing. Unfortunately, upon `-t FOO', # instead of mapping `FOO' to undef, Getopt maps it to `1', preventing # us from distinguishing `-t FOO' from `-t FOO=1'. So let's do it # by hand. "t|trace=s" => \@trace, "p|preselect=s" => \@preselect, # Freezing. "F|freeze" => \$freeze, # Caching. "C|cache=s" => \$cache, "no-cache" => sub { $cache = undef; }, ); fatal "too few arguments Try `$me --help' for more information." unless @ARGV; # Freezing: # We cannot trace at the same time (well, we can, but it sounds insane). # And it implies melting: there is risk not to update properly using # old frozen files, and worse yet: we could load a frozen file and # refreeze it! A sort of caching :) fatal "cannot freeze and trace" if $freeze && @trace; $melt = 1 if $freeze; # Names of the cache directory, cache directory index, trace cache # prefix, and output cache prefix. If the cache is not to be # preserved, default to a temporary directory (automatically removed # on exit). $cache = $tmp unless $cache; $icache = "$cache/requests"; $tcache = "$cache/traces."; $ocache = "$cache/output."; # Normalize the includes: the first occurrence is enough, several is # a pain since it introduces a useless difference in the path which # invalidates the cache. And strip `.' which is implicit and always # first. @include = grep { !/^\.$/ } uniq (reverse(@prepend_include), @include); # Convert @trace to %trace, and work around the M4 builtins tracing # problem. # The default format is `$f:$l:$n:$%'. foreach (@trace) { /^([^:]+)(?::(.*))?$/ms; $trace{$1} = defined $2 ? $2 : '$f:$l:$n:$%'; $trace{$m4_builtin_alternate_name{$1}} = $trace{$1} if exists $m4_builtin_alternate_name{$1}; } # Work around the M4 builtins tracing problem for @PRESELECT. push (@preselect, map { $m4_builtin_alternate_name{$_} } grep { exists $m4_builtin_alternate_name{$_} } @preselect); # If we find frozen files, then all the files before it are # discarded: the frozen file is supposed to include them all. # # We don't want to depend upon m4's --include to find the top level # files, so we use `find_file' here. Try to get a canonical name, # as it's part of the key for caching. And some files are optional # (also handled by `find_file'). my @argv; foreach (@ARGV) { if (/\.m4f$/) { # Frozen files are optional => pass a `?' to `find_file'. my $file = find_file ("$_?", @include); if (!$melt && $file) { @argv = ($file); } else { s/\.m4f$/.m4/; push @argv, find_file ($_, @include); } } else { my $file = find_file ($_, @include); push @argv, $file if $file; } } @ARGV = @argv; } # handle_m4 ($REQ, @MACRO) # ------------------------ # Run m4 on the input files, and save the traces on the @MACRO. sub handle_m4 ($@) { my ($req, @macro) = @_; # GNU m4 appends when using --error-output. unlink ($tcache . $req->id . "t"); # Run m4. # # Neutralize its stdin, so that GNU M4 1.5 doesn't neutralize SIGINT. # # We don't output directly to the cache files, to avoid problems # when we are interrupted (that leaves corrupted files). xsystem ("$m4" . join (' --include=', '', @include) . ' --debug=aflq' . (!exists $ENV{'AUTOM4TE_NO_FATAL'} ? ' --fatal-warning' : '') . " --error-output=$tcache" . $req->id . "t" . join (' --trace=', '', sort @macro) . " " . files_to_options (@ARGV) . ' $ocache" . $req->id . "t"); # Everything went ok: preserve the outputs. foreach my $file (map { $_ . $req->id } ($tcache, $ocache)) { use File::Copy; move ("${file}t", "$file") or fatal "cannot rename ${file}t as $file: $!"; } } # warn_forbidden ($WHERE, $WORD, %FORBIDDEN) # ------------------------------------------ # $WORD is forbidden. Warn with a dedicated error message if in # %FORBIDDEN, otherwise, a simple `error: possibly undefined macro' # will do. my $first_warn_forbidden = 1; sub warn_forbidden ($$%) { my ($where, $word, %forbidden) = @_; my $message; for my $re (sort keys %forbidden) { if ($word =~ $re) { $message = $forbidden{$re}; last; } } $message ||= "possibly undefined macro: $word"; warn "$where: error: $message\n"; if ($first_warn_forbidden) { warn < 'forbid:$1:$2', 'm4_pattern_allow' => 'allow:$1')); my @patterns = new Autom4te::XFile ("$tmp/patterns")->getlines; chomp @patterns; my %forbidden = map { /^forbid:([^:]+):.+$/ => /^forbid:[^:]+:(.+)$/ } @patterns; my $forbidden = join ('|', map { /^forbid:([^:]+)/ } @patterns) || "^\$"; my $allowed = join ('|', map { /^allow:([^:]+)/ } @patterns) || "^\$"; verb "forbidden tokens: $forbidden"; verb "forbidden token : $_ => $forbidden{$_}" foreach (sort keys %forbidden); verb "allowed tokens: $allowed"; # Read the (cached) raw M4 output, produce the actual result. We # have to use the 2nd arg to have Autom4te::XFile honor the third, but then # stdout is to be handled by hand :(. Don't use fdopen as it means # we will close STDOUT, which we already do in END. my $out = new Autom4te::XFile; if ($output eq '-') { $out->open (">$output"); } else { $out->open($output, O_CREAT | O_WRONLY | O_TRUNC, oct ($mode)); } fatal "cannot create $output: $!" unless $out; my $in = new Autom4te::XFile ($ocache . $req->id); my %prohibited; my $res; while ($_ = $in->getline) { s/\s+$//; s/__oline__/$./g; s/\@<:\@/[/g; s/\@:>\@/]/g; s/\@S\|\@/\$/g; s/\@%:\@/#/g; $res = $_; # Don't complain in comments. Well, until we have something # better, don't consider `#include' etc. are comments. s/\#.*// unless /^\#\s*(if|include|endif|ifdef|ifndef|define)\b/; foreach (split (/\W+/)) { $prohibited{$_} = $. if /$forbidden/o && !/$allowed/o && ! exists $prohibited{$_}; } # Performed *last*: the empty quadrigraph. $res =~ s/\@&t\@//g; print $out "$res\n"; } # If no forbidden words, we're done. return if ! %prohibited; # Locate the forbidden words in the last input file. # This is unsatisfying but... my $prohibited = '\b(' . join ('|', keys %prohibited) . ')\b'; my $file = new Autom4te::XFile ($ARGV[$#ARGV]); $exit_code = 1; while ($_ = $file->getline) { # Don't complain in comments. Well, until we have something # better, don't consider `#include' etc. are comments. s/\#.*// unless /^\#(if|include|endif|ifdef|ifndef|define)\b/; # Complain once per word, but possibly several times per line. while (/$prohibited/) { my $word = $1; warn_forbidden ("$ARGV[$#ARGV]:$.", $word, %forbidden); delete $prohibited{$word}; # If we're done, exit. return if ! %prohibited; $prohibited = '\b(' . join ('|', keys %prohibited) . ')\b'; } } warn_forbidden ("$output:$prohibited{$_}", $_, %forbidden) foreach (sort { $prohibited{$a} <=> $prohibited{$b} } keys %prohibited); } ## --------------------- ## ## Handling the traces. ## ## --------------------- ## # $M4_MACRO # trace_format_to_m4 ($FORMAT) # ---------------------------- # Convert a trace $FORMAT into a M4 trace processing macro's body. sub trace_format_to_m4 ($) { my ($format) = @_; my $underscore = $_; my %escape = (# File name. 'f' => '$1', # Line number. 'l' => '$2', # Depth. 'd' => '$3', # Name (also available as $0). 'n' => '$4', # Escaped dollar. '$' => '$'); my $res = ''; $_ = $format; while ($_) { # $n -> $(n + 4) if (s/^\$(\d+)//) { $res .= "\$" . ($1 + 4); } # $x, no separator given. elsif (s/^\$([fldn\$])//) { $res .= $escape{$1}; } # $.x or ${sep}x. elsif (s/^\$\{([^}]*)\}([@*%])// || s/^\$(.?)([@*%])//) { # $@, list of quoted effective arguments. if ($2 eq '@') { $res .= ']at_at([' . ($1 ? $1 : ',') . '], $@)['; } # $*, list of unquoted effective arguments. elsif ($2 eq '*') { $res .= ']at_star([' . ($1 ? $1 : ',') . '], $@)['; } # $%, list of flattened unquoted effective arguments. elsif ($2 eq '%') { $res .= ']at_percent([' . ($1 ? $1 : ':') . '], $@)['; } } elsif (/^(\$.)/) { error "invalid escape: $1"; } else { s/^([^\$]+)//; $res .= $1; } } $_ = $underscore; return '[[' . $res . ']]'; } # handle_traces($REQ, $OUTPUT, %TRACE) # ------------------------------------ # We use M4 itself to process the traces. But to avoid name clashes when # processing the traces, the builtins are disabled, and moved into `at_'. # Actually, all the low level processing macros are in `at_' (and `_at_'). # To avoid clashes between user macros and `at_' macros, the macros which # implement tracing are in `AT_'. # # Having $REQ is needed to neutralize the macros which have been traced, # but are not wanted now. sub handle_traces ($$%) { my ($req, $output, %trace) = @_; verb "formatting traces for `$output': " . join (', ', sort keys %trace); # Processing the traces. my $trace_m4 = new Autom4te::XFile (">$tmp/traces.m4"); $_ = <<'EOF'; divert(-1) changequote([, ]) # _at_MODE(SEPARATOR, ELT1, ELT2...) # ---------------------------------- # List the elements, separating then with SEPARATOR. # MODE can be: # `at' -- the elements are enclosed in brackets. # `star' -- the elements are listed as are. # `percent' -- the elements are `flattened': spaces are singled out, # and no new line remains. define([_at_at], [at_ifelse([$#], [1], [], [$#], [2], [[[$2]]], [[[$2]][$1]$0([$1], at_shift(at_shift($@)))])]) define([_at_percent], [at_ifelse([$#], [1], [], [$#], [2], [at_flatten([$2])], [at_flatten([$2])[$1]$0([$1], at_shift(at_shift($@)))])]) define([_at_star], [at_ifelse([$#], [1], [], [$#], [2], [[$2]], [[$2][$1]$0([$1], at_shift(at_shift($@)))])]) # FLATTEN quotes its result. # Note that the second pattern is `newline, tab or space'. Don't lose # the tab! define([at_flatten], [at_patsubst(at_patsubst(at_patsubst(at_patsubst([[[[$1]]]], [\\\n]), [[\n\t ]+], [ ]), [ *\(.\)$], [\1]), [^ *\(.*\)], [[\1]])]) define([at_args], [at_shift(at_shift(at_shift(at_shift(at_shift($@)))))]) define([at_at], [_$0([$1], at_args($@))]) define([at_percent], [_$0([$1], at_args($@))]) define([at_star], [_$0([$1], at_args($@))]) EOF s/^ //mg;s/\\t/\t/mg;s/\\n/\n/mg; print $trace_m4 $_; # If you trace `define', then on `define([m4_exit], defn([m4exit])' you # will produce # # AT_define([m4sugar.m4], [115], [1], [define], [m4_exit], ) # # Since `' is not quoted, the outer m4, when processing # `trace.m4' will exit prematurely. Hence, move all the builtins to # the `at_' name space. print $trace_m4 "# Copy the builtins.\n"; map { print $trace_m4 "define([at_$_], defn([$_]))\n" } @m4_builtin; print $trace_m4 "\n"; print $trace_m4 "# Disable them.\n"; map { print $trace_m4 "at_undefine([$_])\n" } @m4_builtin; print $trace_m4 "\n"; # Neutralize traces: we don't want traces of cached requests (%REQUEST). print $trace_m4 "## -------------------------------------- ##\n", "## By default neutralize all the traces. ##\n", "## -------------------------------------- ##\n", "\n"; print $trace_m4 "at_define([AT_$_], [at_dnl])\n" foreach (sort keys %{$req->macro}); print $trace_m4 "\n"; # Implement traces for current requests (%TRACE). print $trace_m4 "## ------------------------- ##\n", "## Trace processing macros. ##\n", "## ------------------------- ##\n", "\n"; foreach (sort keys %trace) { # Trace request can be embed \n. (my $comment = "Trace $_:$trace{$_}") =~ s/^/\# /; print $trace_m4 "$comment\n"; print $trace_m4 "at_define([AT_$_],\n"; print $trace_m4 trace_format_to_m4 ($trace{$_}) . ")\n\n"; } print $trace_m4 "\n"; # Reenable output. print $trace_m4 "at_divert(0)at_dnl\n"; # Transform the traces from m4 into an m4 input file. # Typically, transform: # # | m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE]) # # into # # | AT_AC_SUBST([configure.ac], [3], [1], [AC_SUBST], [exec_prefix], [NONE]) # # Pay attention that the file name might include colons, if under DOS # for instance, so we don't use `[^:]+'. my $traces = new Autom4te::XFile ($tcache . $req->id); while ($_ = $traces->getline) { # Trace with arguments, as the example above. We don't try # to match the trailing parenthesis as it might be on a # separate line. s{^m4trace:(.+):(\d+): -(\d+)- ([^(]+)\((.*)$} {AT_$4([$1], [$2], [$3], [$4], $5}; # Traces without arguments, always on a single line. s{^m4trace:(.+):(\d+): -(\d+)- ([^)]*)\n$} {AT_$4([$1], [$2], [$3], [$4])\n}; print $trace_m4 "$_"; } $trace_m4->close; my $in = new Autom4te::XFile ("$m4 $tmp/traces.m4 |"); my $out = new Autom4te::XFile (">$output"); # This is dubious: should we really transform the quadrigraphs in # traces? It might break balanced [ ] etc. in the output. The # consensus seeems to be that traces are more useful this way. while ($_ = $in->getline) { # It makes no sense to try to transform __oline__. s/\@<:\@/[/g; s/\@:>\@/]/g; s/\@\$\|\@/\$/g; s/\@%:\@/#/g; s/\@&t\@//g; print $out $_; } } # $BOOL # up_to_date ($REQ) # ----------------- # Are the cache files of $REQ up to date? # $REQ is `valid' if it corresponds to the request and exists, which # does not mean it is up to date. It is up to date if, in addition, # its files are younger than its dependencies. sub up_to_date ($) { my ($req) = @_; return 0 if ! $req->valid; my $tfile = $tcache . $req->id; my $ofile = $ocache . $req->id; # We can't answer properly if the traces are not computed since we # need to know what other files were included. Actually, if any of # the cache files is missing, we are not up to date. return 0 if ! -f $tfile || ! -f $ofile; # The youngest of the cache files must be older than the oldest of # the dependencies. my $tmtime = mtime ($tfile); my $omtime = mtime ($ofile); my ($file, $mtime) = ($tmtime < $omtime ? ($ofile, $omtime) : ($tfile, $tmtime)); # We depend at least upon the arguments. my @dep = @ARGV; # Files may include others. We can use traces since we just checked # if they are available. handle_traces ($req, "$tmp/dependencies", ('include' => '$1', 'm4_include' => '$1')); my $deps = new Autom4te::XFile ("$tmp/dependencies"); while ($_ = $deps->getline) { chomp; my $file = find_file ("$_?", @include); # If a file which used to be included is no longer there, then # don't say it's missing (it might no longer be included). But # of course, that cause the output to be outdated (as if the # time stamp of that missing file was newer). return 0 if ! $file; push @dep, $file; } # If $FILE is younger than one of its dependencies, it is outdated. return up_to_date_p ($file, @dep); } ## ---------- ## ## Freezing. ## ## ---------- ## # freeze ($OUTPUT) # ---------------- sub freeze ($) { my ($output) = @_; # When processing the file with diversion disabled, there must be no # output but comments and empty lines. my $result = xqx ("$m4" . ' --fatal-warning' . join (' --include=', '', @include) . ' --define=divert' . " " . files_to_options (@ARGV) . ' lock (LOCK_EX); # Read the cache index if available and older than autom4te itself. # If autom4te is younger, then some structures such as C4che, might # have changed, which would corrupt its processing. Autom4te::C4che->load ($icache_file) if -f $icache && mtime ($icache) > mtime ($0); # Add the new trace requests. my $req = Autom4te::C4che->request ('input' => \@ARGV, 'path' => \@include, 'macro' => [keys %trace, @preselect]); # If $REQ's cache files are not up to date, or simply if the user # discarded them (-f), declare it invalid. $req->valid (0) if $force || ! up_to_date ($req); # We now know whether we can trust the Request object. Say it. verb "the trace request object is:\n" . $req->marshall; # We need to run M4 if (i) the users wants it (--force), (ii) $REQ is # invalid. handle_m4 ($req, keys %{$req->macro}) if $force || ! $req->valid; # Issue the warnings each time autom4te was run. my $separator = "\n" . ('-' x 25) . " END OF WARNING " . ('-' x 25) . "\n\n"; handle_traces ($req, "$tmp/warnings", ('_m4_warn' => "\$1::\$f:\$l::\$2::\$3$separator")); # Swallow excessive newlines. for (split (/\n*$separator\n*/o, contents ("$tmp/warnings"))) { # The message looks like: # | syntax::input.as:5::ouch # | ::input.as:4: baz is expanded from... # | input.as:2: bar is expanded from... # | input.as:3: foo is expanded from... # | input.as:5: the top level my ($cat, $loc, $msg, $stacktrace) = split ('::', $_, 4); msg $cat, $loc, "warning: $msg"; for (split /\n/, $stacktrace) { my ($loc, $trace) = split (': ', $_, 2); msg $cat, $loc, $trace; } } # Now output... if (%trace) { # Always produce traces, since even if the output is young enough, # there is no guarantee that the traces use the same *format* # (e.g., `-t FOO:foo' and `-t FOO:bar' are both using the same M4 # traces, hence the M4 traces cache is usable, but its formatting # will yield different results). handle_traces ($req, $output, %trace); } else { # Actual M4 expansion, only if $output is too old. STDOUT is # pretty old. handle_output ($req, $output) if mtime ($output) < mtime ($ocache . $req->id); } # If we ran up to here, the cache is valid. $req->valid (1); Autom4te::C4che->save ($icache_file); exit $exit_code; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: autoconf2.59-2.59+dfsg/bin/autoconf.as0000644000175000017500000001261007663136371016767 0ustar taffittaffitAS_INIT[]dnl -*- shell-script -*- # autoconf -- create `configure' using m4 macros # Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. usage=["\ Usage: $0 [OPTION] ... [TEMPLATE-FILE] Generate a configuration script from a TEMPLATE-FILE if given, or \`configure.ac' if present, or else \`configure.in'. Output is sent to the standard output if TEMPLATE-FILE is given, else into \`configure'. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files -f, --force consider all files obsolete -o, --output=FILE save output in FILE (stdout is the default) -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] Warning categories include: \`cross' cross compilation issues \`obsolete' obsolete constructs \`syntax' dubious syntactic constructs \`all' all the warnings \`no-CATEGORY' turn off the warnings on CATEGORY \`none' turn off all the warnings \`error' warnings are error The environment variable \`WARNINGS' is honored. Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Tracing: -t, --trace=MACRO report the list of calls to MACRO -i, --initialization also trace Autoconf's initialization process In tracing mode, no configuration script is created. Report bugs to ."] version=["\ autoconf (@PACKAGE_NAME@) @VERSION@ Written by David J. MacKenzie and Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."] me=`AS_BASENAME([$0])` help="\ Try \`$me --help' for more information." exit_missing_arg="\ echo \"$me: option \\\`\$1' requires an argument\" >&2 echo \"\$help\" >&2 exit 1" # Variables. : ${AUTOM4TE='@bindir@/@autom4te-name@'} dir=`AS_DIRNAME([$0])` outfile= verbose=: # Parse command line. while test $# -gt 0 ; do option=[`expr "x$1" : 'x\(--[^=]*\)' \| \ "x$1" : 'x\(-.\)'`] optarg=[`expr "x$1" : 'x--[^=]*=\(.*\)' \| \ "x$1" : 'x-.\(.*\)'`] case $1 in --version | -V ) echo "$version" ; exit 0 ;; --help | -h ) echo "$usage"; exit 0 ;; --verbose | -v ) verbose=echo AUTOM4TE="$AUTOM4TE $1"; shift ;; # Arguments passed as is to autom4te. --debug | -d | \ --force | -f | \ --include=* | -I?* | \ --prepend-include=* | -B?* | \ --warnings=* | -W?* ) AUTOM4TE="$AUTOM4TE $1"; shift ;; # Options with separated arg passed as is to autom4te. --include | -I | \ --prepend-include | -B | \ --warnings | -W ) test $# = 1 && eval "$exit_missing_arg" AUTOM4TE="$AUTOM4TE $option $2" shift 2 ;; --trace=* | -t?* ) traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --trace | -t ) test $# = 1 && eval "$exit_missing_arg" shift traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --initialization | -i ) AUTOM4TE="$AUTOM4TE --melt" shift;; --output=* | -o?* ) outfile=$optarg shift ;; --output | -o ) test $# = 1 && eval "$exit_missing_arg" shift outfile=$1 shift ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) exec >&2 echo "$me: invalid option $1" echo "$help" exit 1 ;; * ) break ;; esac done # Find the input file. case $# in 0) if test -f configure.ac; then if test -f configure.in; then echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2 echo "$me: warning: proceeding with \`configure.ac'." >&2 fi infile=configure.ac elif test -f configure.in; then infile=configure.in else echo "$me: no input file" >&2 exit 1 fi test -z "$traces" && test -z "$outfile" && outfile=configure;; 1) # autom4te doesn't like `-'. test "x$1" != "x-" && infile=$1 ;; *) exec >&2 echo "$me: invalid number of arguments." echo "$help" (exit 1); exit 1 ;; esac # Unless specified, the output is stdout. test -z "$outfile" && outfile=- # Run autom4te with expansion. eval set \$AUTOM4TE --language=autoconf --output=\$outfile "$traces" \$infile $verbose "$me: running $*" >&2 exec "$@" autoconf2.59-2.59+dfsg/bin/autoupdate.in0000755000175000017500000010044407723112550017323 0ustar taffittaffit#! @PERL@ -w # -*- perl -*- # autoupdate - modernize an Autoconf file. # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Originally written by David MacKenzie . # Rewritten by Akim Demaille . eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; BEGIN { my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@'; unshift @INC, $datadir; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); } use Autom4te::ChannelDefs; use Autom4te::Channels; use Autom4te::Configure_ac; use Autom4te::FileUtils; use Autom4te::General; use Autom4te::XFile; use File::Basename; use strict; # Lib files. my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; my $autoconf = "$autom4te --language=autoconf"; # We need to find m4sugar. my @prepend_include; my @include = ('@datadir@'); my $force = 0; # m4. my $m4 = $ENV{"M4"} || '@M4@'; # $HELP # ----- $help = "Usage: $0 [OPTION] ... [TEMPLATE-FILE...] Update the TEMPLATE-FILE... if given, or `configure.ac' if present, or else `configure.in', to the syntax of the current version of Autoconf. The original files are backed up. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files -f, --force consider all files obsolete Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Report bugs to . "; # $VERSION # -------- $version = "autoupdate (@PACKAGE_NAME@) @VERSION@ Written by David J. MacKenzie and Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "; ## ---------- ## ## Routines. ## ## ---------- ## # parse_args () # ------------- # Process any command line arguments. sub parse_args () { my $srcdir; getopt ('I|include=s' => \@include, 'B|prepend-include=s' => \@prepend_include, 'f|force' => \$force); if (! @ARGV) { my $configure_ac = require_configure_ac; push @ARGV, $configure_ac; } } # ------------- # # M4 builtins. # # ------------- # my @m4_builtins; # &handle_m4_symbols () # --------------------- # Create the following $tmp files: # m4.m4 -- enable the m4 builtins. # unm4.m4 -- disable the m4 builtins. # savem4.m4 -- save the m4 builtins. sub handle_m4_macros () { # Get the list of builtins. xsystem ("echo dumpdef | $m4 2>$tmp/m4.defs >/dev/null"); my $m4_defs = new Autom4te::XFile "$tmp/m4.defs"; while ($_ = $m4_defs->getline) { push @m4_builtins, $1 if /^(\w+):/; } $m4_defs->close; # Output the files. my $m4_m4 = new Autom4te::XFile ">$tmp/m4.m4"; print $m4_m4 "# m4.m4 -- enable the m4 builtins.\n"; my $unm4_m4 = new Autom4te::XFile ">$tmp/unm4.m4"; print $unm4_m4 "# unm4.m4 -- disable the m4 builtins.\n"; print $unm4_m4 "# Because Autoconf, via M4sugar, redefines some of these\n"; print $unm4_m4 "# macros, and therefore since unac.m4 disables them,\n"; print $unm4_m4 "# disable only if defined.\n"; my $m4save_m4 = new Autom4te::XFile ">$tmp/m4save.m4"; print $m4save_m4 "# savem4.m4 -- save the m4 builtins.\n"; foreach (@m4_builtins) { print $m4save_m4 "define([_au_$_], defn([$_]))\n"; print $unm4_m4 "_au_ifdef([$_], [_au_undefine([$_])])\n"; print $m4_m4 "_au_define([$_], _au_defn([_au_$_]))\n"; } } # ----------------- # # Autoconf macros. # # ----------------- # # @AU_MACROS & AC_MACROS -- AU and AC macros and yet another useful comment. my (%ac_macros, %au_macros); # HANDLE_AUTOCONF_MACROS () # ------------------------- # @M4_BUILTINS -- M4 builtins and a useful comment. sub handle_autoconf_macros () { my $macros = new Autom4te::XFile ("$autoconf" . " --trace AU_DEFUN:'AU:\$f:\$1'" . " --trace define:'AC:\$f:\$1'" . " --melt /dev/null |"); while ($_ = $macros->getline) { chomp; my ($domain, $file, $macro) = /^(AC|AU):(.*):([^:]*)$/ or next; # ../lib/m4sugar/m4sugar.m4 -> m4sugar # ../lib/autoconf/general.m4 -> autoconf # aclocal.m4 -> aclocal my $set = basename (dirname ($file)); $set = 'aclocal' if $file eq 'aclocal.m4'; error "unknown set: $set: $_" unless $set =~ /^(m4sugar|aclocal|autoconf)$/; if ($domain eq "AC") { $ac_macros{$macro} = $set; } else { $au_macros{$macro} = $set; } } $macros->close; # Don't keep AU macros in @AC_MACROS. delete $ac_macros{$_} foreach (keys %au_macros); # Don't keep M4sugar macros which are redefined by Autoconf, # such as `builtin', `changequote' etc. See autoconf/autoconf.m4. delete $ac_macros{$_} foreach (@m4_builtins); error "no current Autoconf macros found" unless keys %ac_macros; error "no obsolete Autoconf macros found" unless keys %au_macros; if ($debug) { print STDERR "Current Autoconf macros:\n"; print STDERR join (' ', sort keys %ac_macros) . "\n\n"; print STDERR "Obsolete Autoconf macros:\n"; print STDERR join (' ', sort keys %au_macros) . "\n\n"; } # ac.m4 -- autoquoting definitions of the AC macros (M4sugar excluded). # unac.m4 -- undefine the AC macros. my $ac_m4 = new Autom4te::XFile ">$tmp/ac.m4"; print $ac_m4 "# ac.m4 -- autoquoting definitions of the AC macros.\n"; my $unac_m4 = new Autom4te::XFile ">$tmp/unac.m4"; print $unac_m4 "# unac.m4 -- undefine the AC macros.\n"; foreach (sort grep { $ac_macros{$_} ne 'm4sugar' } keys %ac_macros) { print $ac_m4 "_au_define([$_], [[\$0(\$\@)]])\n"; print $unac_m4 "_au_undefine([$_])\n"; } } ## -------------- ## ## Main program. ## ## -------------- ## parse_args; $autoconf .= " --debug" if $debug; $autoconf .= " --force" if $force; $autoconf .= " --verbose" if $verbose; $autoconf .= join (' --include=', '', @include); $autoconf .= join (' --prepend-include=', '', @prepend_include); mktmpdir ('au'); handle_m4_macros; handle_autoconf_macros; # $au_changequote -- enable the quote `[', `]' right before any AU macro. my $au_changequote = 's/\b(' . join ('|', keys %au_macros) . ')\b/_au_changequote([,])$1/g'; # au.m4 -- definitions the AU macros. xsystem ("$autoconf --trace AU_DEFUN:'_au_defun(\@<:\@\$1\@:>\@, \@<:\@\$2\@:>\@)' --melt /dev/null " . ">$tmp/au.m4"); ## ------------------- ## ## Process the files. ## ## ------------------- ## foreach my $file (@ARGV) { my $filename = $file; # We need an actual file. if ($file eq '-') { $file = "$tmp/stdin"; system "cat >$file"; } elsif (! -r "$file") { die "$me: $file: No such file or directory"; } # input.m4 -- m4 program to produce the updated file. # Load the values, the dispatcher, neutralize m4, and the prepared # input file. my $input_m4 = <<\EOF; divert(-1) -*- Autoconf -*- changequote([, ]) # Move all the builtins into the `_au_' pseudo namespace include([m4save.m4]) # _au_defun(NAME, BODY) # --------------------- # Define NAME to BODY, plus AU activation/deactivation. _au_define([_au_defun], [_au_define([$1], [_au_enable()dnl $2[]dnl _au_disable()])]) # Import the definition of the obsolete macros. _au_include([au.m4]) ## ------------------------ ## ## _au_enable/_au_disable. ## ## ------------------------ ## # They work by pair: each time an AU macro is activated, it runs # _au_enable, and at its end its runs _au_disable (see _au_defun # above). AU macros might use AU macros, which should # enable/disable only for the outer AU macros. # # `_au_enabled' is used to this end, determining whether we really # enable/disable. # __au_enable # ----------- # Reenable the builtins, and m4sugar. _au_define([__au_enable], [_au_divert(-1) # Enable special characters. _au_changecom([#]) # Enable the m4 builtins, m4sugar and the autoquoting AC macros. _au_include([m4.m4]) _au_include([m4sugar/m4sugar.m4]) _au_include([ac.m4]) _au_divert(0)]) # _au_enable # ---------- # Called at the beginning of all the obsolete macros. Reenable the # builtins, and m4sugar if needed. _au_define([_au_enable], [_au_ifdef([_au_enabled], [], [__au_enable()])_au_dnl _au_pushdef([_au_enabled])]) # __au_disable # ------------ # Disable the builtins, and m4sugar. _au_define([__au_disable], [_au_divert(-1) # Disable m4sugar, the AC autoquoting macros, and m4. _au_include([unac.m4]) _au_include([unm4.m4]) # Disable special characters. _au_changequote() _au_changecom() _au_divert(0)]) # _au_disable # ----------- # Called at the end of all the obsolete macros. Disable the # builtins, and m4sugar if needed.. _au_define([_au_disable], [_au_popdef([_au_enabled])_au_dnl _au_ifdef([_au_enabled], [], [__au_disable()])]) ## ------------------------------- ## ## Disable, and process the file. ## ## ------------------------------- ## _au_divert(-1) # Disable m4: M4sugar and the AC autoquoting macros are not loaded yet, # hence invoking `_au_disable' is wrong. _au_include([unm4.m4]) # Disable special characters. _au_changequote() _au_changecom() _au_divert(0)_au_dnl EOF $input_m4 =~ s/^ //mg; # prepared input -- input, but reenables the quote before each AU macro. open INPUT_M4, ">$tmp/input.m4" or error "cannot open: $!"; open FILE, "<$file" or error "cannot open: $!"; print INPUT_M4 "$input_m4"; while () { eval $au_changequote; print INPUT_M4; } close FILE or error "cannot close $file: $!"; close INPUT_M4 or error "cannot close $tmp/input.m4: $!"; # Now ask m4 to perform the update. xsystem ("$m4 --include=$tmp" . join (' --include=', '', reverse (@prepend_include)) . join (' --include=', '', @include) . " $tmp/input.m4 >$tmp/updated"); update_file ("$tmp/updated", "$file" eq "$tmp/stdin" ? '-' : "$file"); } exit 0; # ## ---------------------------- ## # ## How `autoupdate' functions. ## # ## ---------------------------- ## # # The task of `autoupdate' is not trivial: the biggest difficulty being # that you must limit the changes to the parts that really need to be # updated. Finding a satisfying implementation proved to be quite hard, # as this is the fourth implementation of `autoupdate'. # # Below, we will use a simple example of obsolete macro: # # AU_DEFUN([OLD], [NEW([$1, $2], m4_eval([$1 + $2]))]) # AC_DEFUN([NEW], [echo "sum($1) = $2"]) # # the input file contains # # dnl The Unbelievable Truth # OLD(1, 2) # NEW([0, 0], [0]) # # Of course the expected output is # # dnl The Unbelievable Truth # NEW([1, 2], [3]) # NEW([0, 0], [0]) # # # # First implementation: sed # # ========================= # # The first implementation was only able to change the name of obsolete # macros. # # The file `acoldnames.m4' defined the old names based on the new names. # It was simple then to produce a sed script such as: # # s/OLD/NEW/g # # Updating merely consisted in running this script on the file to # update. # # This scheme suffers an obvious limitation: that `autoupdate' was # unable to cope with new macros that just swap some of its arguments # compared to the old macro. Fortunately, that was enough to upgrade # from Autoconf 1 to Autoconf 2. (But I have no idea whether the # changes in Autoconf 2 were precisely limited by this constraint.) # # # # Second implementation: hooks # # ============================ # # The version 2.15 of Autoconf brought a vast number of changes compared # to 2.13, so a solution was needed. One could think to extend the # `sed' scripts with specialized code for complex macros. But this # approach is of course full of flaws: # # a. the Autoconf maintainers have to write these snippets, which we # just don't want to, # # b. I really don't think you'll ever manage to handle the quoting of # m4 from sed. # # To satisfy a., let's remark that the code which implements the old # features in term of the new feature is exactly the code which should # replace the old code. # # To answer point b, as usual in the history of Autoconf, the answer, at # least on the paper, is simple: m4 is the best tool to parse m4, so # let's use m4. # # Therefore the specification is: # # I want to be able to tell Autoconf, well, m4, that the macro I # am currently defining is an obsolete macro (so that the user is # warned), which code is the code to use when running autoconf, # but that the very same code has to be used when running # autoupdate. To summarize, the interface I want is # `AU_DEFUN(OLD-NAME, NEW-CODE)'. # # # Now for the technical details. # # When running autoconf, except for the warning, AU_DEFUN is basically # AC_DEFUN. # # When running autoupdate, we want *only* OLD-NAMEs to be expanded. # This obviously means that acgeneral.m4 and acspecific.m4 must not be # loaded. Nonetheless, because we want to use a rich set of m4 # features, m4sugar.m4 is needed. Please note that the fact that # Autoconf's macros are not loaded is positive on two points: # # - we do get an updated `configure.ac', not a `configure'! # # - the old macros are replaced by *calls* to the new-macros, not the # body of the new macros, since their body is not defined!!! # (Whoa, that's really beautiful!). # # Additionally we need to disable the quotes when reading the input for # two reasons: first because otherwise `m4' will swallow the quotes of # other macros: # # NEW([1, 2], 3) # => NEW(1, 2, 3) # # and second, because we want to update the macro calls which are # quoted, i.e., we want # # FOO([OLD(1, 2)]) # => FOO([NEW([1, 2], [3])]) # # If we don't disable the quotes, only the macros called at the top # level would be updated. # # So, let's disable the quotes. # # Well, not quite: m4sugar.m4 still needs to use quotes for some macros. # Well, in this case, when running in autoupdate code, each macro first # reestablishes the quotes, expands itself, and disables the quotes. # # Thinking a bit more, you realize that in fact, people may use `define' # `ifelse' etc. in their files, and you certainly don't want to process # them. Another example is `dnl': you don't want to remove the # comments. You then realize you don't want exactly to import m4sugar: # you want to specify when it is enabled (macros active), and disabled. # m4sugar provides m4_disable/m4_enable to this end. # # You're getting close to it. Now remains one task: how to handle # twofold definitions? # # Remember that the same AU_DEFUN must be understood in two different # ways, the AC way, and the AU way. # # One first solution is to check whether acgeneral.m4 was loaded. But # that's definitely not cute. Another is simply to install `hooks', # that is to say, to keep in some place m4 knows, late `define' to be # triggered *only* in AU mode. # # You first think to design AU_DEFUN like this: # # 1. AC_DEFUN(OLD-NAME, # [Warn the user OLD-NAME is obsolete. # NEW-CODE]) # # 2. Store for late AU binding([define(OLD_NAME, # [Reestablish the quotes. # NEW-CODE # Disable the quotes.])]) # # but this will not work: NEW-CODE has probably $1, $2 etc. and these # guys will be replaced with the argument of `Store for late AU binding' # when you call it. # # I don't think there is a means to avoid this using this technology # (remember that $1 etc. are *always* expanded in m4). You may also try # to replace them with $[1] to preserve them for a later evaluation, but # if `Store for late AU binding' is properly written, it will remain # quoted till the end... # # You have to change technology. Since the problem is that `$1' # etc. should be `consumed' right away, one solution is to define now a # second macro, `AU_OLD-NAME', and to install a hook than binds OLD-NAME # to AU_OLD-NAME. Then, autoupdate.m4 just need to run the hooks. By # the way, the same method was used in autoheader. # # # # Third implementation: m4 namespaces by m4sugar # # ============================================== # # Actually, this implementation was just a clean up of the previous # implementation: instead of defining hooks by hand, m4sugar was equipped # with `namespaces'. What are they? # # Sometimes we want to disable some *set* of macros, and restore them # later. We provide support for this via namespaces. # # There are basically three characters playing this scene: defining a # macro in a namespace, disabling a namespace, and restoring a namespace # (i.e., all the definitions it holds). # # Technically, to define a MACRO in NAMESPACE means to define the macro # named `NAMESPACE::MACRO' to the VALUE. At the same time, we append # `undefine(NAME)' in the macro named `m4_disable(NAMESPACE)', and # similarly a binding of NAME to the value of `NAMESPACE::MACRO' in # `m4_enable(NAMESPACE)'. These mechanisms allow to bind the macro of # NAMESPACE and to unbind them at will. # # Of course this implementation is really inefficient: m4 has to grow # strings which can become quickly huge, which slows it significantly. # # In particular one should avoid as much as possible to use `define' for # temporaries. Now that `define' as quite a complex meaning, it is an # expensive operations that should be limited to macros. Use # `m4_define' for temporaries. # # Private copies of the macros we used in entering / exiting the m4sugar # namespace. It is much more convenient than fighting with the renamed # version of define etc. # # # # Those two implementations suffered from serious problems: # # - namespaces were really expensive, and incurred a major performance # loss on `autoconf' itself, not only `autoupdate'. One solution # would have been the limit the use of namespaces to `autoupdate', but # that's again some complications on m4sugar, which really doesn't need # this. So we wanted to get rid of the namespaces. # # - since the quotes were disabled, autoupdate was sometimes making # wrong guesses, for instance on: # # foo([1, 2]) # # m4 saw 2 arguments: `[1'and `2]'. A simple solution, somewhat # fragile, is to reestablish the quotes right before all the obsolete # macros, i.e., to use sed so that the previous text becomes # # changequote([, ])foo([1, 2]) # # To this end, one wants to trace the definition of obsolete macros. # # It was there that the limitations of the namespace approach became # painful: because it was a complex machinery playing a lot with the # builtins of m4 (hence, quite fragile), tracing was almost impossible. # # # So this approach was dropped. # # # # The fourth implementation: two steps # # ==================================== # # If you drop the uses of namespaces, you no longer can compute the # updated value, and replace the old call with it simultaneously. # # Obviously you will use m4 to compute the updated values, but you may # use some other tool to achieve the replacement. Personally, I trust # nobody but m4 to parse m4, so below, m4 will perform the two tasks. # # How can m4 be used to replace *some* macros calls with newer values. # Well, that's dead simple: m4 should learn the definitions of obsolete # macros, forget its builtins, disable the quotes, and then run on the # input file, which amounts to doing this: # # divert(-1)dnl # changequote([, ]) # define([OLD], [NEW([$1, $2], m4_eval([$1 + $2]))changequote()]) # undefine([dnl]) # undefine([m4_eval]) # # Some more undefines... # changequote() # divert(0)dnl # dnl The Unbelievable Truth # changequote([, ])OLD(1, 2) # NEW([0, 0], # 0) # # which will result in # # dnl The Unbelievable Truth # NEW(1, 2, m4_eval(1 + 2)) # NEW([0, 0], # 0) # # Grpmh. Two problems. A minor problem: it would have been much better # to have the `m4_eval' computed, and a major problem: you lost the # quotation in the result. # # Let's address the big problem first. One solution is to define any # modern macro to rewrite its calls with the proper quotation, thanks to # `$@'. Again, tracing the `define's makes it possible to know which # are these macros, so you input is: # # divert(-1)dnl # changequote([, ]) # define([OLD], [NEW([$1, $2], m4_eval([$1 + $2]))changequote()]) # define([NEW], [[NEW($@)]changequote()]) # undefine([dnl]) # undefine([m4_eval]) # # Some more undefines... # changequote() # divert(0)dnl # dnl The Unbelievable Truth # changequote([, ])OLD(1, 2) # changequote([, ])NEW([0, 0], # 0) # # which results in # # dnl The Unbelievable Truth # NEW([1, 2],[m4_eval(1 + 2)]) # NEW([0, 0],[0]) # # Our problem is solved, i.e., the first call to `NEW' is properly # quoted, but introduced another problem: we changed the layout of the # second calls, which can be a drama in the case of huge macro calls # (think of `AC_TRY_RUN' for instance). This example didn't show it, # but we also introduced parens to macros which did not have some: # # AC_INIT # => AC_INIT() # # No big deal for the semantics (unless the macro depends upon $#, which # is bad), but the users would not be happy. # # Additionally, we introduced quotes that we not there before, which is # OK in most cases, but could change the semantics of the file. # # Cruel dilemma: we do want the auto-quoting definition of `NEW' when # evaluating `OLD', but we don't when we evaluate the second `NEW'. # Back to namespaces? # # No. # # # # Second step: replacement # # ------------------------ # # No, as announced above, we will work in two steps: in a first step we # compute the updated values, and in a second step we replace them. Our # goal is something like this: # # divert(-1)dnl # changequote([, ]) # define([OLD], [NEW([1, 2], [3])changequote()]) # undefine([dnl]) # undefine([m4_eval]) # # Some more undefines... # changequote() # divert(0)dnl # dnl The Unbelievable Truth # changequote([, ])OLD(1, 2) # NEW([0, 0], # 0) # # i.e., the new value of `OLD' is precomputed using the auto-quoting # definition of `NEW' and the m4 builtins. We'll see how afterwards, # let's finish with the replacement. # # Of course the solution above is wrong: if there were other calls to # `OLD' with different values, we would smash them to the same value. # But it is quite easy to generalize the scheme above: # # divert(-1)dnl # changequote([, ]) # define([OLD([1],[2])], [NEW([1, 2], [3])]) # define([OLD], [defn([OLD($@)])changequote()]) # undefine([dnl]) # undefine([m4_eval]) # # Some more undefines... # changequote() # divert(0)dnl # dnl The Unbelievable Truth # changequote([, ])OLD(1, 2) # NEW([0, 0], # 0) # # i.e., for each call to obsolete macros, we build an array `call => # value', and use a macro to dispatch these values. This results in: # # dnl The Unbelievable Truth # NEW([1, 2], [3]) # NEW([0, 0], # 0) # # In French, we say `Youpi !', which you might roughly translate as # `Yippee!'. # # # # First step: computation # # ----------------------- # # Let's study the anatomy of the file, and name its sections: # # prologue # divert(-1)dnl # changequote([, ]) # values # define([OLD([1],[2])], [NEW([1, 2], [3])]) # dispatcher # define([OLD], [defn([OLD($@)])changequote()]) # disabler # undefine([dnl]) # undefine([m4_eval]) # # Some more undefines... # changequote() # divert(0)dnl # input # dnl The Unbelievable Truth # changequote([, ])OLD(1, 2) # NEW([0, 0], # 0) # # # # Computing the `values' section # # .............................. # # First we need to get the list of all the AU macro uses. To this end, # first get the list of all the AU macros names by tracing `AU_DEFUN' in # the initialization of autoconf. This list is computed in the file # `au.txt' below. # # Then use this list to trace all the AU macro uses in the input. The # goal is obtain in the case of our example: # # [define([OLD([1],[2])],]@<<@OLD([1],[2])@>>@[)] # # This is the file `values.in' below. # # We want to evaluate this with only the builtins (in fact m4sugar), the # auto-quoting definitions of the new macros (`new.m4'), and the # definition of the old macros (`old.m4'). Computing these last two # files is easy: it's just a matter of using the right `--trace' option. # # So the content of `values.in' is: # # include($autoconf_dir/m4sugar.m4) # m4_include(new.m4) # m4_include(old.m4) # divert(0)dnl # [define([OLD([1],[2])],]@<<@OLD([1],[2])@>>@[)] # # We run m4 on it, which yields: # # define([OLD([1],[2])],@<<@NEW([1, 2], [3])@>>@) # # Transform `@<<@' and `@>>@' into quotes and we get # # define([OLD([1],[2])],[NEW([1, 2], [3])]) # # This is `values.m4'. # # # # Computing the `dispatcher' section # # .................................. # # The `prologue', and the `disabler' are simple and need no commenting. # # To compute the `dispatcher' (`dispatch.m4'), again, it is a simple # matter of using the right `--trace'. # # Finally, the input is not exactly the input file, rather it is the # input file with the added `changequote'. To this end, we build # `quote.sed'. # # # # Putting it all together # # ....................... # # We build the file `input.m4' which contains: # # divert(-1)dnl # changequote([, ]) # include(values.m4) # include(dispatch.m4) # undefine([dnl]) # undefine([eval]) # # Some more undefines... # changequote() # divert(0)dnl # dnl The Unbelievable Truth # changequote([, ])OLD(1, 2) # NEW([0, 0], # 0) # # And we just run m4 on it. Et voila`, Monsieur ! Mais oui, mais oui. # # Well, there are a few additional technicalities. For instance, we # rely on `changequote', `ifelse' and `defn', but we don't want to # interpret the changequotes of the user, so we simply use another name: # `_au_changequote' etc. # # # # Failure of the fourth approach # # ------------------------------ # # This approach is heavily based on traces, but then there is an obvious # problem: non expanded code will never be seen/ In particular, the body # of a `define' definition is not seen, so on the input # # define([idem], [OLD(0, [$1])]) # # autoupdate would never see the `OLD', and wouldn't have updated it. # Worse yet, if `idem(0)' was used later, then autoupdate sees that # `OLD' is used, computes the result for `OLD(0, 0)' and sets up a # dispatcher for `OLD'. Since there was no computed value for `OLD(0, # [$1])', the dispatcher would have replaced with... nothing, leading # to # # define([idem], []) # # With some more thinking, you see that the two step approach is wrong, # the namespace approach was much saner. # # But you learned a lot, in particular you realized that using traces # can make it possible to simulate namespaces! # # # # # The fifth implementation: m4 namespaces by files # # ================================================ # # The fourth implementation demonstrated something unsurprising: you # cannot precompute, i.e., the namespace approach was the right one. # Still, we no longer want them, they're too expensive. Let's have a # look at the way it worked. # # When updating # # dnl The Unbelievable Truth # OLD(1, 2) # NEW([0, 0], [0]) # # you evaluate `input.m4': # # divert(-1) # changequote([, ]) # define([OLD], # [m4_enable()NEW([$1, $2], m4_eval([$1 + $2]))m4_disable()]) # ... # m4_disable() # dnl The Unbelievable Truth # OLD(1, 2) # NEW([0, 0], [0]) # # where `m4_disable' undefines the m4 and m4sugar, and disables the quotes # and comments: # # define([m4_disable], # [undefine([__file__]) # ... # changecom(#) # changequote()]) # # `m4_enable' does the converse: reestablish quotes and comments # --easy--, reestablish m4sugar --easy: just load `m4sugar.m4' again-- and # reenable the builtins. This later task requires that you first save # the builtins. And BTW, the definition above of `m4_disable' cannot # work: you undefined `changequote' before using it! So you need to use # your privates copies of the builtins. Let's introduce three files for # this: # # `m4save.m4' # moves the m4 builtins into the `_au_' pseudo namespace # `unm4.m4' # undefines the builtins # `m4.m4' # restores them # # So `input.m4' is: # # divert(-1) # changequote([, ]) # # include([m4save.m4]) # # # Import AU. # define([OLD], # [m4_enable()NEW([$1, $2], m4_eval([$1 + $2]))m4_disable()]) # # define([_au_enable], # [_au_changecom([#]) # _au_include([m4.m4]) # _au_include(m4sugar.m4)]) # # define([_au_disable], # [# Disable m4sugar. # # Disable the m4 builtins. # _au_include([unm4.m4]) # # 1. Disable special characters. # _au_changequote() # _au_changecom()]) # # m4_disable() # dnl The Unbelievable Truth # OLD(1, 2) # NEW([0, 0], [0]) # # Based on what we learned in the fourth implementation we know that we # have to enable the quotes *before* any AU macro, and we know we need # to build autoquoting versions of the AC macros. But the autoquoting # AC definitions must be disabled in the rest of the file, and enabled # inside AU macros. # # Using `autoconf --trace' it is easy to build the files # # `ac.m4' # define the autoquoting AC fake macros # `disable.m4' # undefine the m4sugar and AC autoquoting macros. # `au.m4' # definitions of the AU macros (such as `OLD' above). # # Now, `input.m4' is: # # divert(-1) # changequote([, ]) # # include([m4save.m4]) # # Import AU. # include([au.m4]) # # define([_au_enable], # [_au_changecom([#]) # _au_include([m4.m4]) # _au_include(m4sugar.m4) # _au_include(ac.m4)]) # # define([_au_disable], # [_au_include([disable.m4]) # _au_include([unm4.m4]) # # 1. Disable special characters. # _au_changequote() # _au_changecom()]) # # m4_disable() # dnl The Unbelievable Truth # _au_changequote([, ])OLD(1, 2) # NEW([0, 0], [0]) # # Finally, version V is ready. # # Well... almost. # # There is a slight problem that remains: if an AU macro OUTER includes # an AU macro INNER, then _au_enable will be run when entering OUTER # and when entering INNER (not good, but not too bad yet). But when # getting out of INNER, _au_disable will disable everything while we # were still in OUTER. Badaboom. # # Therefore _au_enable and _au_disable have to be written to work by # pairs: each _au_enable pushdef's _au_enabled, and each _au_disable # popdef's _au_enabled. And of course _au_enable and _au_disable are # effective when _au_enabled is *not* defined. # # Finally, version V' is ready. And there is much rejoicing. (And I # have free time again. I think. Yeah, right.) ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: autoconf2.59-2.59+dfsg/bin/autoscan.in0000755000175000017500000003767407735033715017013 0ustar taffittaffit#! @PERL@ -w # -*- perl -*- # autoscan - Create configure.scan (a preliminary configure.ac) for a package. # Copyright (C) 1994, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Written by David MacKenzie . eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' if 0; BEGIN { my $datadir = $ENV{'autom4te_perllibdir'} || '@datadir@'; unshift @INC, $datadir; # Override SHELL. On DJGPP SHELL may not be set to a shell # that can handle redirection and quote arguments correctly, # e.g.: COMMAND.COM. For DJGPP always use the shell that configure # has detected. $ENV{'SHELL'} = '@SHELL@' if ($^O eq 'dos'); } use Autom4te::ChannelDefs; use Autom4te::Configure_ac; use Autom4te::General; use Autom4te::FileUtils; use Autom4te::XFile; use File::Basename; use File::Find; use strict; use vars qw(@cfiles @makefiles @shfiles %printed); # The kind of the words we are looking for. my @kinds = qw (function header identifier program makevar librarie); # For each kind, the default macro. my %generic_macro = ( 'function' => 'AC_CHECK_FUNCS', 'header' => 'AC_CHECK_HEADERS', 'identifier' => 'AC_CHECK_TYPES', 'program' => 'AC_CHECK_PROGS', 'library' => 'AC_CHECK_LIB' ); my %kind_comment = ( 'function' => 'Checks for library functions.', 'header' => 'Checks for header files.', 'identifier' => 'Checks for typedefs, structures, and compiler characteristics.', 'program' => 'Checks for programs.', ); # $USED{KIND}{ITEM} is the list of locations where the ITEM (of KIND) was used # in the user package. # For instance $USED{function}{alloca} is the list of `file:line' where # `alloca (...)' appears. my %used = (); # $MACRO{KIND}{ITEM} is the list of macros to use to test ITEM. # Initialized from lib/autoscan/*. E.g., $MACRO{function}{alloca} contains # the singleton AC_FUNC_ALLOCA. Some require several checks. my %macro = (); # $NEEDED_MACROS{MACRO} is an array of locations requiring MACRO. # E.g., $NEEDED_MACROS{AC_FUNC_ALLOC} the list of `file:line' containing # `alloca (...)'. my %needed_macros = ( 'AC_PREREQ' => [$me], ); my $configure_scan = 'configure.scan'; my $log = new Autom4te::XFile ">$me.log"; # Autoconf and lib files. my $autom4te = $ENV{'AUTOM4TE'} || '@bindir@/@autom4te-name@'; my $autoconf = "$autom4te --language=autoconf"; my @prepend_include; my @include = ('@datadir@'); # $help # ----- $help = "Usage: $0 [OPTION] ... [SRCDIR] Examine source files in the directory tree rooted at SRCDIR, or the current directory if none is given. Search the source files for common portability problems, check for incompleteness of `configure.ac', and create a file `$configure_scan' which is a preliminary `configure.ac' for that package. -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Report bugs to .\n"; # $version # -------- $version = "autoscan (@PACKAGE_NAME@) @VERSION@ Written by David J. MacKenzie and Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; ## ------------------------ ## ## Command line interface. ## ## ------------------------ ## # parse_args () # ------------- # Process any command line arguments. sub parse_args () { getopt ('I|include=s' => \@include, 'B|prepend-include=s' => \@prepend_include); die "$me: too many arguments Try `$me --help' for more information.\n" if @ARGV > 1; my $srcdir = $ARGV[0] || "."; verb "srcdir = $srcdir"; chdir $srcdir || error "cannot cd to $srcdir: $!"; } # init_tables () # -------------- # Put values in the tables of what to do with each token. sub init_tables () { # The data file format supports only one line of macros per function. # If more than that is required for a common portability problem, # a new Autoconf macro should probably be written for that case, # instead of duplicating the code in lots of configure.ac files. my $file = find_file ("autoscan/autoscan.list", reverse (@prepend_include), @include); my $table = new Autom4te::XFile $file; my $tables_are_consistent = 1; while ($_ = $table->getline) { # Ignore blank lines and comments. next if /^\s*$/ || /^\s*\#/; # ': ' or... # ': warn: '. if (/^(\S+):\s+(\S+)\s+(\S.*)$/) { my ($kind, $word, $macro) = ($1, $2, $3); error "$file:$.: invalid kind: $_" unless grep { $_ eq $kind } @kinds; push @{$macro{$kind}{$word}}, $macro; } else { error "$file:$.: invalid definition: $_"; } } if ($debug) { foreach my $kind (@kinds) { foreach my $word (sort keys %{$macro{$kind}}) { print "$kind: $word: @{$macro{$kind}{$word}}\n"; } } } } # used ($KIND, $WORD, [$WHERE]) # ----------------------------- # $WORD is used as a $KIND. sub used ($$;$) { my ($kind, $word, $where) = @_; $where ||= "$File::Find::name:$."; if ( # Check for all the libraries. But `-links' is certainly a # `find' argument, and `-le', a `test' argument. ($kind eq 'library' && $word !~ /^(e|inks)$/) # Other than libraries are to be checked only if listed in # the Autoscan library files. || defined $macro{$kind}{$word} ) { push (@{$used{$kind}{$word}}, $where); } } ## ----------------------- ## ## Scanning source files. ## ## ----------------------- ## # scan_c_file ($FILENAME) # ----------------------- sub scan_c_file ($) { my ($filename) = @_; push @cfiles, $File::Find::name; # Nonzero if in a multiline comment. my $in_comment = 0; my $file = new Autom4te::XFile "<$filename"; while ($_ = $file->getline) { # Strip out comments. if ($in_comment && s,^.*?\*/,,) { $in_comment = 0; } # The whole line is inside a commment. next if $in_comment; # All on one line. s,/\*.*?\*/,,g; # Starting on this line. if (s,/\*.*$,,) { $in_comment = 1; } # Preprocessor directives. if (s/^\s*\#\s*//) { if (/^include\s*<([^>]*)>/) { used ('header', $1); } if (s/^(if|ifdef|ifndef|elif)\s+//) { foreach my $word (split (/\W+/)) { used ('identifier', $word) unless $word eq 'defined' || $word !~ /^[a-zA-Z_]/; } } # Ignore other preprocessor directives. next; } # Remove string and character constants. s,\"[^\"]*\",,g; s,\'[^\']*\',,g; # Tokens in the code. # Maybe we should ignore function definitions (in column 0)? while (s/\b([a-zA-Z_]\w*)\s*\(/ /) { used ('function', $1); } while (s/\b([a-zA-Z_]\w*)\b/ /) { used ('identifier', $1); } } $file->close; } # scan_makefile($MAKEFILE-NAME) # ----------------------------- sub scan_makefile ($) { my ($filename) = @_; push @makefiles, $File::Find::name; my $file = new Autom4te::XFile "<$filename"; while ($_ = $file->getline) { # Strip out comments. s/#.*//; # Variable assignments. while (s/\b([a-zA-Z_]\w*)\s*=/ /) { used ('makevar', $1); } # Be sure to catch a whole word. For instance `lex$U.$(OBJEXT)' # is a single token. Otherwise we might believe `lex' is needed. foreach my $word (split (/\s+/)) { # Libraries. if ($word =~ /^-l([a-zA-Z_]\w*)$/) { used ('library', $1); } # Tokens in the code. # We allow some additional characters, e.g., `+', since # autoscan/programs includes `c++'. if ($word =~ /^[a-zA-Z_][\w+]*$/) { used ('program', $word); } } } $file->close; } # scan_sh_file($SHELL-SCRIPT-NAME) # -------------------------------- sub scan_sh_file ($) { my ($filename) = @_; push @shfiles, $File::Find::name; my $file = new Autom4te::XFile "<$filename"; while ($_ = $file->getline) { # Strip out comments and variable references. s/#.*//; s/\${[^\}]*}//g; s/@[^@]*@//g; # Tokens in the code. while (s/\b([a-zA-Z_]\w*)\b/ /) { used ('program', $1); } } $file->close; } # scan_file () # ------------ # Called by &find on each file. $_ contains the current filename with # the current directory of the walk through. sub scan_file () { # Wanted only if there is no corresponding FILE.in. return if -f "$_.in"; # Save $_ as Find::File requires it to be preserved. local $_ = $_; # Strip a useless leading `./'. $File::Find::name =~ s,^\./,,; if (/\.[chlym](\.in)?$/) { used 'program', 'cc', $File::Find::name; scan_c_file ($_); } elsif (/\.(cc|cpp|cxx|CC|C|hh|hpp|hxx|HH|H|yy|ypp|ll|lpp)(\.in)?$/) { used 'program', 'c++', $File::Find::name; scan_c_file ($_); } elsif ((/^((?:GNUm|M|m)akefile)(\.in)?$/ && ! -f "$1.am") || /^(?:GNUm|M|m)akefile(\.am)?$/) { scan_makefile ($_); } elsif (/\.sh(\.in)?$/) { scan_sh_file ($_); } } # scan_files () # ------------- # Read through the files and collect lists of tokens in them # that might create nonportabilities. sub scan_files () { find (\&scan_file, '.'); if ($verbose) { print "cfiles: @cfiles\n"; print "makefiles: @makefiles\n"; print "shfiles: @shfiles\n"; foreach my $kind (@kinds) { print "\n$kind:\n"; foreach my $word (sort keys %{$used{$kind}}) { print "$word: @{$used{$kind}{$word}}\n"; } } } } ## ----------------------- ## ## Output configure.scan. ## ## ----------------------- ## # output_kind ($FILE, $KIND) # -------------------------- sub output_kind ($$) { my ($file, $kind) = @_; # Lists of words to be checked with the generic macro. my @have; print $file "\n# $kind_comment{$kind}\n" if exists $kind_comment{$kind}; foreach my $word (sort keys %{$used{$kind}}) { # Output the needed macro invocations in $configure_scan if not # already printed, and remember these macros are needed. foreach my $macro (@{$macro{$kind}{$word}}) { if ($macro =~ /^warn:\s+(.*)/) { my $message = $1; foreach my $location (@{$used{$kind}{$word}}) { warn "$location: warning: $message\n"; } } elsif (exists $generic_macro{$kind} && $macro eq $generic_macro{$kind}) { push (@have, $word); push (@{$needed_macros{"$generic_macro{$kind}([$word])"}}, @{$used{$kind}{$word}}); } else { if (! $printed{$macro}) { print $file "$macro\n"; $printed{$macro} = 1; } push (@{$needed_macros{$macro}}, @{$used{$kind}{$word}}); } } } print $file "$generic_macro{$kind}([" . join(' ', sort(@have)) . "])\n" if @have; } # output_libraries ($FILE) # ------------------------ sub output_libraries ($) { my ($file) = @_; print $file "\n# Checks for libraries.\n"; foreach my $word (sort keys %{$used{'library'}}) { print $file "# FIXME: Replace `main' with a function in `-l$word':\n"; print $file "AC_CHECK_LIB([$word], [main])\n"; } } # output ($CONFIGURE_SCAN) # ------------------------ # Print a proto configure.ac. sub output ($) { my $configure_scan = shift; my %unique_makefiles; my $file = new Autom4te::XFile ">$configure_scan"; print $file ("# -*- Autoconf -*-\n" . "# Process this file with autoconf to produce a configure script.\n" . "\n" . "AC_PREREQ(@VERSION@)\n" . "AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)\n"); if (defined $cfiles[0]) { print $file "AC_CONFIG_SRCDIR([$cfiles[0]])\n"; print $file "AC_CONFIG_HEADER([config.h])\n"; } output_kind ($file, 'program'); output_kind ($file, 'makevar'); output_libraries ($file); output_kind ($file, 'header'); output_kind ($file, 'identifier'); output_kind ($file, 'function'); if (@makefiles) { # Change DIR/Makefile.in to DIR/Makefile. foreach my $m (@makefiles) { $m =~ s/\.(?:in|am)$//; $unique_makefiles{$m}++; } print $file ("\nAC_CONFIG_FILES([", join ("\n ", sort keys %unique_makefiles), "])\n"); } print $file "AC_OUTPUT\n"; $file->close; } ## --------------------------------------- ## ## Checking the accuracy of configure.ac. ## ## --------------------------------------- ## # &check_configure_ac ($CONFIGURE_AC) # ----------------------------------- # Use autoconf to check if all the suggested macros are included # in CONFIGURE_AC. sub check_configure_ac ($) { my ($configure_ac) = @_; # Find what needed macros are invoked in CONFIGURE_AC. # I'd be very happy if someone could explain to me why sort (uniq ...) # doesn't work properly: I need `uniq (sort ...)'. --akim my $trace_option = join (' --trace=', '', uniq (sort (map { s/\(.*//; $_ } keys %needed_macros))); verb "running: $autoconf $trace_option $configure_ac"; my $traces = new Autom4te::XFile "$autoconf $trace_option $configure_ac|"; while ($_ = $traces->getline) { chomp; my ($file, $line, $macro, @args) = split (/:/, $_); if ($macro =~ /^AC_CHECK_(HEADER|FUNC|TYPE|MEMBER)S$/) { # To be rigorous, we should distinguish between space and comma # separated macros. But there is no point. foreach my $word (split (/\s|,/, $args[0])) { # AC_CHECK_MEMBERS wants `struct' or `union'. if ($macro eq "AC_CHECK_MEMBERS" && $word =~ /^stat.st_/) { $word = "struct " . $word; } delete $needed_macros{"$macro([$word])"}; } } else { delete $needed_macros{$macro}; } } $traces->close; # Report the missing macros. foreach my $macro (sort keys %needed_macros) { warn ("$configure_ac: warning: missing $macro wanted by: " . (${$needed_macros{$macro}}[0]) . "\n"); print $log "$me: warning: missing $macro wanted by: \n"; foreach my $need (@{$needed_macros{$macro}}) { print $log "\t$need\n"; } } } ## -------------- ## ## Main program. ## ## -------------- ## parse_args; $autoconf .= " --debug" if $debug; $autoconf .= " --verbose" if $verbose; $autoconf .= join (' --include=', '', @include); $autoconf .= join (' --prepend-include=', '', @prepend_include); my $configure_ac = find_configure_ac; init_tables; scan_files; output ('configure.scan'); if ($configure_ac) { check_configure_ac ($configure_ac); } # This close is really needed. For some reason, probably best named # a bug, it seems that the dtor of $LOG is not called automatically # at END. It results in a truncated file. $log->close; exit 0; ### Setup "GNU" style for perl-mode and cperl-mode. ## Local Variables: ## perl-indent-level: 2 ## perl-continued-statement-offset: 2 ## perl-continued-brace-offset: 0 ## perl-brace-offset: 0 ## perl-brace-imaginary-offset: 0 ## perl-label-offset: -2 ## cperl-indent-level: 2 ## cperl-brace-offset: 0 ## cperl-continued-brace-offset: 0 ## cperl-label-offset: -2 ## cperl-extra-newline-before-brace: t ## cperl-merge-trailing-else: nil ## cperl-continued-statement-offset: 2 ## End: autoconf2.59-2.59+dfsg/bin/autoconf.in0000644000175000017500000001677507663136432017010 0ustar taffittaffit#! /bin/sh ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (as_foo=foo; unset as_foo) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # autoconf -- create `configure' using m4 macros # Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. usage="\ Usage: $0 [OPTION] ... [TEMPLATE-FILE] Generate a configuration script from a TEMPLATE-FILE if given, or \`configure.ac' if present, or else \`configure.in'. Output is sent to the standard output if TEMPLATE-FILE is given, else into \`configure'. Operation modes: -h, --help print this help, then exit -V, --version print version number, then exit -v, --verbose verbosely report processing -d, --debug don't remove temporary files -f, --force consider all files obsolete -o, --output=FILE save output in FILE (stdout is the default) -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax] Warning categories include: \`cross' cross compilation issues \`obsolete' obsolete constructs \`syntax' dubious syntactic constructs \`all' all the warnings \`no-CATEGORY' turn off the warnings on CATEGORY \`none' turn off all the warnings \`error' warnings are error The environment variable \`WARNINGS' is honored. Library directories: -B, --prepend-include=DIR prepend directory DIR to search path -I, --include=DIR append directory DIR to search path Tracing: -t, --trace=MACRO report the list of calls to MACRO -i, --initialization also trace Autoconf's initialization process In tracing mode, no configuration script is created. Report bugs to ." version="\ autoconf (@PACKAGE_NAME@) @VERSION@ Written by David J. MacKenzie and Akim Demaille. Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." me=`$as_basename $0 || $as_expr X/$0 : '.*/\([^/][^/]*\)/*$' \| \ X$0 : 'X\(//\)$' \| \ X$0 : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/$0 | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` help="\ Try \`$me --help' for more information." exit_missing_arg="\ echo \"$me: option \\\`\$1' requires an argument\" >&2 echo \"\$help\" >&2 exit 1" # Variables. : ${AUTOM4TE='@bindir@/@autom4te-name@'} dir=`(dirname $0) 2>/dev/null || $as_expr X$0 : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$0 : 'X\(//\)[^/]' \| \ X$0 : 'X\(//\)$' \| \ X$0 : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$0 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` outfile= verbose=: # Parse command line. while test $# -gt 0 ; do option=`expr "x$1" : 'x\(--[^=]*\)' \| \ "x$1" : 'x\(-.\)'` optarg=`expr "x$1" : 'x--[^=]*=\(.*\)' \| \ "x$1" : 'x-.\(.*\)'` case $1 in --version | -V ) echo "$version" ; exit 0 ;; --help | -h ) echo "$usage"; exit 0 ;; --verbose | -v ) verbose=echo AUTOM4TE="$AUTOM4TE $1"; shift ;; # Arguments passed as is to autom4te. --debug | -d | \ --force | -f | \ --include=* | -I?* | \ --prepend-include=* | -B?* | \ --warnings=* | -W?* ) AUTOM4TE="$AUTOM4TE $1"; shift ;; # Options with separated arg passed as is to autom4te. --include | -I | \ --prepend-include | -B | \ --warnings | -W ) test $# = 1 && eval "$exit_missing_arg" AUTOM4TE="$AUTOM4TE $option $2" shift 2 ;; --trace=* | -t?* ) traces="$traces --trace='"`echo "$optarg" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --trace | -t ) test $# = 1 && eval "$exit_missing_arg" shift traces="$traces --trace='"`echo "$1" | sed "s/'/'\\\\\\\\''/g"`"'" shift ;; --initialization | -i ) AUTOM4TE="$AUTOM4TE --melt" shift;; --output=* | -o?* ) outfile=$optarg shift ;; --output | -o ) test $# = 1 && eval "$exit_missing_arg" shift outfile=$1 shift ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) exec >&2 echo "$me: invalid option $1" echo "$help" exit 1 ;; * ) break ;; esac done # Find the input file. case $# in 0) if test -f configure.ac; then if test -f configure.in; then echo "$me: warning: both \`configure.ac' and \`configure.in' are present." >&2 echo "$me: warning: proceeding with \`configure.ac'." >&2 fi infile=configure.ac elif test -f configure.in; then infile=configure.in else echo "$me: no input file" >&2 exit 1 fi test -z "$traces" && test -z "$outfile" && outfile=configure;; 1) # autom4te doesn't like `-'. test "x$1" != "x-" && infile=$1 ;; *) exec >&2 echo "$me: invalid number of arguments." echo "$help" (exit 1); exit 1 ;; esac # Unless specified, the output is stdout. test -z "$outfile" && outfile=- # Run autom4te with expansion. eval set \$AUTOM4TE --language=autoconf --output=\$outfile "$traces" \$infile $verbose "$me: running $*" >&2 exec "$@" autoconf2.59-2.59+dfsg/config/0000755000175000017500000000000012067673013015312 5ustar taffittaffitautoconf2.59-2.59+dfsg/config/Makefile.am0000644000175000017500000000224407663415542017357 0ustar taffittaffit## Process this file with automake to create Makefile.in -*-Makefile-*- ## Makefile for Autoconf. ## Copyright 2001, 2002 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. EXTRA_DIST = $(SPECIFIC_MACROS) $(SPECIFIC_TOOLS) \ prev-version.txt MAINTAINERCLEANFILES = $(GENERIC_TOOLS) SPECIFIC_MACROS = \ m4.m4 GENERIC_TOOLS = \ config.guess \ config.sub \ emacs-comp \ install-sh \ mdate-sh \ missing \ mkinstalldirs \ texinfo.tex SPECIFIC_TOOLS = move-if-change autoconf2.59-2.59+dfsg/config/config.guess0000755000175000017500000012214112067673013017633 0ustar taffittaffit#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-10-03' # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha*:OpenVMS:*:*) echo alpha-hp-vms exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit 0 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-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 # it's likely to be more like Solaris than SunOS4. 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 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 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`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*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} 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 BSD 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 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` # GNU/FreeBSD systems have a "k" prefix to indicate we are using # FreeBSD's kernel, but not the complete OS. case ${LIBC} in gnu) kernel_only='k' ;; esac echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit 0 ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # 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. echo i386-sequent-sysv4 exit 0 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit 0 ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-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 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its exit 0 ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: autoconf2.59-2.59+dfsg/config/mkinstalldirs0000755000175000017500000000530007752405543020124 0ustar taffittaffit#! /bin/sh # mkinstalldirs --- make directory hierarchy # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. scriptversion=2003-09-26.19 errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. " # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit 0 ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./-- && rmdir ./-- fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./-- "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: autoconf2.59-2.59+dfsg/config/missing0000755000175000017500000002466607752405543016735 0ustar taffittaffit#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2003-09-02.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: autoconf2.59-2.59+dfsg/config/Makefile.in0000644000175000017500000001700007752412546017364 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = config ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am config.guess \ config.sub elisp-comp install-sh mdate-sh missing \ mkinstalldirs texinfo.tex mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ EXTRA_DIST = $(SPECIFIC_MACROS) $(SPECIFIC_TOOLS) \ prev-version.txt MAINTAINERCLEANFILES = $(GENERIC_TOOLS) SPECIFIC_MACROS = \ m4.m4 GENERIC_TOOLS = \ config.guess \ config.sub \ emacs-comp \ install-sh \ mdate-sh \ missing \ mkinstalldirs \ texinfo.tex SPECIFIC_TOOLS = move-if-change all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu config/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/config/prev-version.txt0000644000175000017500000000000507751735450020515 0ustar taffittaffit2.58 autoconf2.59-2.59+dfsg/config/move-if-change0000755000175000017500000000037307565135030020027 0ustar taffittaffit#!/bin/sh # Like mv $1 $2, but if the files are the same, just delete $1. # Status is 0 if $2 is changed, 1 otherwise. if test -r $2; then if cmp -s $1 $2; then echo $2 is unchanged rm -f $1 else mv -f $1 $2 fi else mv -f $1 $2 fi autoconf2.59-2.59+dfsg/config/texinfo.tex0000644000175000017500000064670307752405544017537 0ustar taffittaffit% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2003-07-28.08} % % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. % % This texinfo.tex file is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation; either version 2, or (at % your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this texinfo.tex file; see the file COPYING. If not, write % to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, % Boston, MA 02111-1307, USA. % % In other words, you are welcome to use, share and improve this program. % You are forbidden to forbid anyone else to use, share and improve % what you give them. Help stamp out software-hoarding! % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % ftp://ftp.gnu.org/gnu/texinfo/texinfo.tex % (and all GNU mirrors, see http://www.gnu.org/order/ftp.html) % ftp://tug.org/tex/texinfo.tex % (and all CTAN mirrors, see http://www.ctan.org), % and /home/gd/gnu/doc/texinfo.tex on the GNU machines. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. % % The texinfo.tex in any given Texinfo distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. \message{Loading texinfo [version \texinfoversion]:} % 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]}% \catcode`+=\active \catcode`\_=\active} \message{Basics,} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexlbrace=\{ \let\ptexless=< \let\ptexplus=+ \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeftypevar\undefined\gdef\putwordDeftypevar{Variable}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi \ifx\putwordDeftypefun\undefined\gdef\putwordDeftypefun{Function}\fi % In some macros, we cannot use the `\? notation---the left quote is % in some cases the escape char. \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dotChar = `\. \chardef\equalChar = `\= \chardef\exclamChar= `\! \chardef\questChar = `\? \chardef\semiChar = `\; \chardef\spaceChar = `\ % \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % True if #1 is the empty string, i.e., called like `\ifempty{}'. % \def\ifempty#1{\ifemptyx #1\emptymarkA\emptymarkB}% \def\ifemptyx#1#2\emptymarkB{\ifx #1\emptymarkA}% % Hyphenation fixes. \hyphenation{ap-pen-dix} \hyphenation{eshell} \hyphenation{mini-buf-fer mini-buf-fers} \hyphenation{time-stamp} \hyphenation{white-space} % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\undefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines\maxdimen }% % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % For @cropmarks command. % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \escapechar = `\\ % use backslash in output files. \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfmkdest{\the\pageno} \fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingxxx.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 2\baselineskip \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \normalturnoffactive \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \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} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg#1{% \let\next = #1% \begingroup \obeylines \futurelet\temp\parseargx } % If the next token is an obeyed space (from an @example environment or % the like), remove it and recurse. Otherwise, we're done. \def\parseargx{% % \obeyedspace is defined far below, after the definition of \sepspaces. \ifx\obeyedspace\temp \expandafter\parseargdiscardspace \else \expandafter\parseargline \fi } % Remove a single space (as the delimiter token to the macro call). {\obeyspaces % \gdef\parseargdiscardspace {\futurelet\temp\parseargx}} {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. % % First remove any @c comment, then any @comment. % Result of each macro is put in \toks0. \argremovec #1\c\relax % \expandafter\argremovecomment \the\toks0 \comment\relax % % % Call the caller's macro, saved as \next in \parsearg. \expandafter\next\expandafter{\the\toks0}% }% } % Since all \c{,omment} does is throw away the argument, we can let TeX % do that for us. The \relax here is matched by the \relax in the call % in \parseargline; it could be more or less anything, its purpose is % just to delimit the argument to the \c. \def\argremovec#1\c#2\relax{\toks0 = {#1}} \def\argremovecomment#1\comment#2\relax{\toks0 = {#1}} % \argremovec{,omment} might leave us with trailing spaces, though; e.g., % @end itemize @c foo % will have two active spaces as part of the argument with the % `itemize'. Here we remove all active spaces from #1, and assign the % result to \toks0. % % This loses if there are any *other* active characters besides spaces % in the argument -- _ ^ +, for example -- since they get expanded. % Fortunately, Texinfo does not define any such commands. (If it ever % does, the catcode of the characters in questionwill have to be changed % here.) But this means we cannot call \removeactivespaces as part of % \argremovec{,omment}, since @c uses \parsearg, and thus the argument % that \parsearg gets might well have any character at all in it. % \def\removeactivespaces#1{% \begingroup \ignoreactivespaces \edef\temp{#1}% \global\toks0 = \expandafter{\temp}% \endgroup } % Change the active space to expand to nothing. % \begingroup \obeyspaces \gdef\ignoreactivespaces{\obeyspaces\let =\empty} \endgroup \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} %% These are used to keep @begin/@end levels from running away %% Call \inENV within environments (after a \begingroup) \newif\ifENV \ENVfalse \def\inENV{\ifENV\relax\else\ENVtrue\fi} \def\ENVcheck{% \ifENV\errmessage{Still within an environment; press RETURN to continue} \endgroup\fi} % This is not perfect, but it should reduce lossage % @begin foo is the same as @foo, for now. \newhelp\EMsimple{Press RETURN to continue.} \outer\def\begin{\parsearg\beginxxx} \def\beginxxx #1{% \expandafter\ifx\csname #1\endcsname\relax {\errhelp=\EMsimple \errmessage{Undefined command @begin #1}}\else \csname #1\endcsname\fi} % @end foo executes the definition of \Efoo. % \def\end{\parsearg\endxxx} \def\endxxx #1{% \removeactivespaces{#1}% \edef\endthing{\the\toks0}% % \expandafter\ifx\csname E\endthing\endcsname\relax \expandafter\ifx\csname \endthing\endcsname\relax % There's no \foo, i.e., no ``environment'' foo. \errhelp = \EMsimple \errmessage{Undefined command `@end \endthing'}% \else \unmatchedenderror\endthing \fi \else % Everything's ok; the right environment has been started. \csname E\endthing\endcsname \fi } % There is an environment #1, but it hasn't been started. Give an error. % \def\unmatchedenderror#1{% \errhelp = \EMsimple \errmessage{This `@end #1' doesn't have a matching `@#1'}% } % Define the control sequence \E#1 to give an unmatched @end error. % \def\defineunmatchedend#1{% \expandafter\def\csname E#1\endcsname{\unmatchedenderror{#1}}% } %% Simple single-character @ commands % @@ prints an @ % Kludge this until the fonts are right (grr). \def\@{{\tt\char64}} % This is turned off because it was never documented % and you can use @w{...} around a quote to suppress ligatures. %% Define @` and @' to be the same as ` and ' %% but suppressing ligatures. %\def\`{{`}} %\def\'{{'}} % Used to generate quoted braces. \def\mylbrace {{\tt\char123}} \def\myrbrace {{\tt\char125}} \let\{=\mylbrace \let\}=\myrbrace \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux file. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \c \let\dotaccent = \. \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \t \let\ubaraccent = \b \let\udotaccent = \d % Other special characters: @questiondown @exclamdown % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ptexi \else\ifx\temp\jmacro \j \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=3000 } % @! is an end-of-sentence bang. \def\!{!\spacefactor=3000 } % @? is an end-of-sentence query. \def\?{?\spacefactor=3000 } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \def\group{\begingroup \ifnum\catcode13=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi % % The \vtop we start below produces a box with normal height and large % depth; thus, TeX puts \baselineskip glue before it, and (when the % next line of text is done) \lineskip glue after it. (See p.82 of % the TeXbook.) Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \copy\groupbox \endgroup % End the \group. }% % \setbox\groupbox = \vtop\bgroup % We have to put a strut on the last line in case the @group is in % the midst of an example, rather than completely enclosing it. % Otherwise, the interline space between the last line of the group % and the first line afterwards is too small. But we can't put the % strut in \Egroup, since there it would be on a line by itself. % Hence this just inserts a strut at the beginning of each line. \everypar = {\strut}% % % Since we have a strut on every line, we don't need any of TeX's % normal interline spacing. \offinterlineskip % % OK, but now we have to do something about blank % lines in the input in @example-like environments, which normally % just turn into \lisppar, which will insert no space now that we've % turned off the interline space. Simplest is to make them be an % empty paragraph. \ifx\par\lisppar \edef\par{\leavevmode \par}% % % Reset ^^M's definition to new definition of \par. \obeylines \fi % % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \def\need{\parsearg\needx} % Old definition--didn't work. %\def\needx #1{\par % %% This method tries to make TeX break the page naturally %% if the depth of the box does not fit. %{\baselineskip=0pt% %\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak %\prevdepth=-1000pt %}} \def\needx#1{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break \let\br = \par % @dots{} output an ellipsis using the current font. % We do .5em per period so that it has the same spacing in a typewriter % font as three actual period characters. % \def\dots{% \leavevmode \hbox to 1.5em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \leavevmode \hbox to 2em{% \hskip 0pt plus 0.25fil minus 0.25fil .\hss.\hss.\hss.% \hskip 0pt plus 0.5fil minus 0.5fil }% \spacefactor=3000 } % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \def\exdent{\parsearg\exdentyyy} \def\exdentyyy #1{{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}} % This defn is used inside nofill environments such as @example. \def\nofillexdent{\parsearg\nofillexdentyyy} \def\nofillexdentyyy #1{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @include file insert text of that file as input. % Allow normal characters that we make active in the argument (a file name). \def\include{\begingroup \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \parsearg\includezzz} % Restore active chars for included file. \def\includezzz#1{\endgroup\begingroup % Read the included file in a group so nested @include's work. \def\thisfile{#1}% \let\value=\expandablevalue \input\thisfile \endgroup} \def\thisfile{} % @center line % outputs that line, centered. % \def\center{\parsearg\docenter} \def\docenter#1{{% \ifhmode \hfil\break \fi \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{\hfil \ignorespaces#1\unskip \hfil}% \ifhmode \break \fi }} % @sp n outputs n lines of vertical space \def\sp{\parsearg\spxxx} \def\spxxx #1{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \def\paragraphindent{\parsearg\doparagraphindent} \def\doparagraphindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \def\exampleindent{\parsearg\doexampleindent} \def\doexampleindent#1{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \newdimen\currentparindent % \def\insertword{insert} % \def\firstparagraphindent{\parsearg\dofirstparagraphindent} \def\dofirstparagraphindent#1{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \global\let\indent=\ptexindent \global\everypar = {}% }% \global\everypar = {% \kern-\parindent \global\let\indent=\ptexindent \global\everypar = {}% }% }% % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % We don't use $'s directly in the definition of \math because we need % to set catcodes according to plain TeX first, to allow for subscripts, % superscripts, special math chars, etc. % \let\implicitmath = $%$ font-lock fix % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ within @math be active (mathcode "8000), and distinguish by seeing % if the current family is \slfam, which is what @var uses. % {\catcode\underChar = \active \gdef\mathunderscore{% \catcode\underChar=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% }} % % Another complication: we want \\ (and @\) to output a \ character. % FYI, plain.tex uses \\ as a temporary control sequence (why?), but % this is not advertised and we don't care. Texinfo does not % otherwise define @\. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathcode`\_="8000 \mathunderscore \let\\ = \mathbackslash \mathactive \implicitmath\finishmath} \def\finishmath#1{#1\implicitmath\Etex} % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an % argument to a command which set the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus } } % @bullet and @minus need the same treatment as @math, just above. \def\bullet{\implicitmath\ptexbullet\implicitmath} \def\minus{\implicitmath-\implicitmath} % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \iflinks \readauxfile \fi % \openindices needs to do some work in any case. \openindices \fixbackslash % Turn off hack to swallow `\input texinfo'. \global\let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. % Just to be on the safe side, close the input stream before the \input. \openin 1 texinfo.cnf \ifeof1 \let\temp=\relax \else \def\temp{\input texinfo.cnf }\fi \closein1 \temp % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest \ifx\pdfoutput\undefined \pdffalse \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\linkcolor = \relax \let\pdfmakeoutlines = \relax \else \pdftrue \pdfoutput = 1 \input pdfcolor \def\dopdfimage#1#2#3{% \def\imagewidth{#2}% \def\imageheight{#3}% % without \immediate, pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifx\empty\imagewidth\else width \imagewidth \fi \ifx\empty\imageheight\else height \imageheight \fi \ifnum\pdftexversion<13 #1.pdf% \else {#1.pdf}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} \def\pdfmkdest#1{{\normalturnoffactive \pdfdest name{#1} xyz}} \def\pdfmkpgn#1{#1} \let\linkcolor = \Blue % was Cyan, but that seems light? \def\endlink{\Black\pdfendlink} % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} \def\pdfmakeoutlines{{% \openin 1 \jobname.toc \ifeof 1\else\begingroup \closein 1 % Thanh's hack / proper braces in bookmarks \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace % \def\chapentry ##1##2##3{} \def\secentry ##1##2##3##4{\advancenumber{chap##2}} \def\subsecentry ##1##2##3##4##5{\advancenumber{sec##2.##3}} \def\subsubsecentry ##1##2##3##4##5##6{\advancenumber{subsec##2.##3.##4}} \let\appendixentry = \chapentry \let\unnumbchapentry = \chapentry \let\unnumbsecentry = \secentry \let\unnumbsubsecentry = \subsecentry \let\unnumbsubsubsecentry = \subsubsecentry \input \jobname.toc \def\chapentry ##1##2##3{% \pdfoutline goto name{\pdfmkpgn{##3}}count-\expnumber{chap##2}{##1}} \def\secentry ##1##2##3##4{% \pdfoutline goto name{\pdfmkpgn{##4}}count-\expnumber{sec##2.##3}{##1}} \def\subsecentry ##1##2##3##4##5{% \pdfoutline goto name{\pdfmkpgn{##5}}count-\expnumber{subsec##2.##3.##4}{##1}} \def\subsubsecentry ##1##2##3##4##5##6{% \pdfoutline goto name{\pdfmkpgn{##6}}{##1}} \let\appendixentry = \chapentry \let\unnumbchapentry = \chapentry \let\unnumbsecentry = \secentry \let\unnumbsubsecentry = \subsecentry \let\unnumbsubsubsecentry = \subsubsecentry % % Make special characters normal for writing to the pdf file. % \indexnofonts \let\tt=\relax \turnoffactive \input \jobname.toc \endgroup\fi }} \def\makelinks #1,{% \def\params{#1}\def\E{END}% \ifx\params\E \let\nextmakelinks=\relax \else \let\nextmakelinks=\makelinks \ifnum\lnkcount>0,\fi \picknum{#1}% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{\the\pgn}}% \linkcolor #1% \advance\lnkcount by 1% \endlink \fi \nextmakelinks } \def\picknum#1{\expandafter\pn#1} \def\pn#1{% \def\p{#1}% \ifx\p\lbrace \let\nextpn=\ppn \else \let\nextpn=\ppnn \def\first{#1} \fi \nextpn } \def\ppn#1{\pgn=#1\gobble} \def\ppnn{\pgn=\first} \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \ifx\p\space\else\addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \fi \nextsp} \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax} \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi \def\pdfurl#1{% \begingroup \normalturnoffactive\def\@{@}% \let\value=\expandablevalue \leavevmode\Red \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% % #1 \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS| \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \linkcolor #1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \fi % \ifx\pdfoutput \message{fonts,} % Font-change commands. % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf analogous to plain's \rm, etc. \newfam\sffam \def\sf{\fam=\sffam \tensf} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this one. \def\ttsl{\tenttsl} % Default leading. \newdimen\textleading \textleading = 13.2pt % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % \def\setleading#1{% \normalbaselineskip = #1\relax \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % Set the font macro #1 to the font named #2, adding on the % specified font prefix (normally `cm'). % #3 is the font's design size, #4 is a scale factor \def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4} % 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 % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} %where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} \newcount\mainmagstep \ifx\bigger\relax % not really supported. \mainmagstep=\magstep1 \setfont\textrm\rmshape{12}{1000} \setfont\texttt\ttshape{12}{1000} \else \mainmagstep=\magstephalf \setfont\textrm\rmshape{10}{\mainmagstep} \setfont\texttt\ttshape{10}{\mainmagstep} \fi % Instead of cmb10, you may want to use cmbx10. % cmbx10 is a prettier font on its own, but cmb10 % looks better when embedded in a line with cmr10 % (in Bob's opinion). \setfont\textbf\bfshape{10}{\mainmagstep} \setfont\textit\itshape{10}{\mainmagstep} \setfont\textsl\slshape{10}{\mainmagstep} \setfont\textsf\sfshape{10}{\mainmagstep} \setfont\textsc\scshape{10}{\mainmagstep} \setfont\textttsl\ttslshape{10}{\mainmagstep} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep % A few fonts for @defun, etc. \setfont\defbf\bxshape{10}{\magstep1} %was 1314 \setfont\deftt\ttshape{10}{\magstep1} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \bf} % Fonts for indices, footnotes, small examples (9pt). \setfont\smallrm\rmshape{9}{1000} \setfont\smalltt\ttshape{9}{1000} \setfont\smallbf\bfshape{10}{900} \setfont\smallit\itshape{9}{1000} \setfont\smallsl\slshape{9}{1000} \setfont\smallsf\sfshape{9}{1000} \setfont\smallsc\scshape{10}{900} \setfont\smallttsl\ttslshape{10}{900} \font\smalli=cmmi9 \font\smallsy=cmsy9 % Fonts for small examples (8pt). \setfont\smallerrm\rmshape{8}{1000} \setfont\smallertt\ttshape{8}{1000} \setfont\smallerbf\bfshape{10}{800} \setfont\smallerit\itshape{8}{1000} \setfont\smallersl\slshape{8}{1000} \setfont\smallersf\sfshape{8}{1000} \setfont\smallersc\scshape{10}{800} \setfont\smallerttsl\ttslshape{10}{800} \font\smalleri=cmmi8 \font\smallersy=cmsy8 % Fonts for title page: \setfont\titlerm\rmbshape{12}{\magstep3} \setfont\titleit\itbshape{10}{\magstep4} \setfont\titlesl\slbshape{10}{\magstep4} \setfont\titlett\ttbshape{12}{\magstep3} \setfont\titlettsl\ttslshape{10}{\magstep4} \setfont\titlesf\sfbshape{17}{\magstep1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\authorrm{\secrm} \def\authortt{\sectt} % Chapter (and unnumbered) fonts (17.28pt). \setfont\chaprm\rmbshape{12}{\magstep2} \setfont\chapit\itbshape{10}{\magstep3} \setfont\chapsl\slbshape{10}{\magstep3} \setfont\chaptt\ttbshape{12}{\magstep2} \setfont\chapttsl\ttslshape{10}{\magstep3} \setfont\chapsf\sfbshape{17}{1000} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 % Section fonts (14.4pt). \setfont\secrm\rmbshape{12}{\magstep1} \setfont\secit\itbshape{10}{\magstep2} \setfont\secsl\slbshape{10}{\magstep2} \setfont\sectt\ttbshape{12}{\magstep1} \setfont\secttsl\ttslshape{10}{\magstep2} \setfont\secsf\sfbshape{12}{\magstep1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 % Subsection fonts (13.15pt). \setfont\ssecrm\rmbshape{12}{\magstephalf} \setfont\ssecit\itbshape{10}{1315} \setfont\ssecsl\slbshape{10}{1315} \setfont\ssectt\ttbshape{12}{\magstephalf} \setfont\ssecttsl\ttslshape{10}{1315} \setfont\ssecsf\sfbshape{12}{\magstephalf} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{\magstep1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 % The smallcaps and symbol fonts should actually be scaled \magstep1.5, % but that is not a standard magnification. % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this so that font changes will continue to work % in math mode, where it is the current \fam that is relevant in most % cases, not the current font. Plain TeX does \def\bf{\fam=\bffam % \tenbf}, for example. By redefining \tenbf, we obviate the need to % redefine \bf itself. \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \resetmathfonts \setleading{25pt}} \def\titlefont#1{{\titlefonts\rm #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts % Maybe make sssec fonts scaled magstephalf? \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \resetmathfonts \setleading{9.5pt}} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \smallerfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % % I wish we used A4 paper on this side of the Atlantic. % % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \textfonts % Define these so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000} \setfont\shortcontbf\bxshape{12}{1000} \setfont\shortcontsl\slshape{12}{1000} \setfont\shortconttt\ttshape{12}{1000} %% Add scribe-like font environments, plus @l for inline lisp (usually sans %% serif) and @ii for TeX italic % \smartitalic{ARG} outputs arg in italics, followed by an italic correction % unless the following character is such as not to need one. \def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else \ptexslash\fi\fi\fi} \def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx} \def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx} \let\i=\smartitalic \let\var=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic \let\cite=\smartslanted \def\b#1{{\bf #1}} \let\strong=\b % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\frenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m } \catcode`@=\other \def\t#1{% {\tt \rawbackslash \frenchspacing #1}% \null } \let\ttfont=\t \def\samp#1{`\tclose{#1}'\null} \setfont\keyrm\rmshape{8}{1000} \font\keysy=cmsy9 \def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% \vbox{\hrule\kern-0.4pt \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% \kern-0.4pt\hrule}% \kern-.06em\raise0.4pt\hbox{\angleright}}}} % The old definition, with no lozenge: %\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null} \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @file, @option are the same as @samp. \let\file=\samp \let\option=\samp % @code is a modification of @t, % which makes spaces the same size as normal in the surrounding text. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \frenchspacing #1% }% \null } % We *must* turn on hyphenation at `-' and `_' in \code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active % \global\def\code{\begingroup \catcode`\-=\active \let-\codedash \catcode`\_=\active \let_\codeunder \codex } % % If we end up with any active - characters when handling the index, % just treat them as a normal -. \global\def\indexbreaks{\catcode`\-=\active \let-\realdash} } \def\realdash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } \def\codex #1{\tclose{#1}\endgroup} % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \def\kbdinputstyle{\parsearg\kbdinputstylexxx} \def\kbdinputstylexxx#1{% \def\arg{#1}% \ifx\arg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\arg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\arg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle option `\arg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct.' \kbdinputstyle distinct \def\xkey{\key} \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\look}}\fi \else{\tclose{\kbdfont\look}}\fi} % For @url, @env, @command quotes seem unnecessary, so use \code. \let\url=\code \let\env=\code \let\command=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. Perhaps eventually put in % a hypertex \special here. % \def\uref#1{\douref #1,,,\finish} \def\douref#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} \def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @acronym downcases the argument and prints in smallcaps. \def\acronym#1{{\smallcaps \lowercase{#1}}} % @pounds{} is a sterling sign. \def\pounds{{\it\$}} % @registeredsymbol - R in a circle. For now, only works in text size; % we'd have to redo the font mechanism to change the \scriptstyle and % \scriptscriptstyle font sizes to make it look right in headings. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{$\scriptstyle\rm R$}\hfil\crcr\Orb}}% }$% } \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \def\shorttitlepage{\parsearg\shorttitlepagezzz} \def\shorttitlepagezzz #1{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \def\titlepage{\begingroup \parindent=0pt \textfonts \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}% % \def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines \let\tt=\authortt}% % % Leave some space at the very top of the page. \vglue\titlepagetopglue % % Now you can print the title using @title. \def\title{\parsearg\titlezzz}% \def\titlezzz##1{\leftline{\titlefonts\rm ##1} % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt}% % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Now you can put text using @subtitle. \def\subtitle{\parsearg\subtitlezzz}% \def\subtitlezzz##1{{\subtitlefont \rightline{##1}}}% % % @author should come last, but may come many times. \def\author{\parsearg\authorzzz}% \def\authorzzz##1{\ifseenauthor\else\vskip 0pt plus 1filll\seenauthortrue\fi {\authorfont \leftline{##1}}}% % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \oldpage \let\page = \oldpage \hbox{}}% % \def\page{\oldpage \hbox{}} } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } %%% Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make Tex use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\oddheading{\parsearg\oddheadingxxx} \def\everyheading{\parsearg\everyheadingxxx} \def\evenfooting{\parsearg\evenfootingxxx} \def\oddfooting{\parsearg\oddfootingxxx} \def\everyfooting{\parsearg\everyfootingxxx} {\catcode`\@=0 % \gdef\evenheadingxxx #1{\evenheadingyyy #1@|@|@|@|\finish} \gdef\evenheadingyyy #1@|#2@|#3@|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddheadingxxx #1{\oddheadingyyy #1@|@|@|@|\finish} \gdef\oddheadingyyy #1@|#2@|#3@|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\everyheadingxxx#1{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \gdef\evenfootingxxx #1{\evenfootingyyy #1@|@|@|@|\finish} \gdef\evenfootingyyy #1@|#2@|#3@|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \gdef\oddfootingxxx #1{\oddfootingyyy #1@|@|@|@|\finish} \gdef\oddfootingyyy #1@|#2@|#3@|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -\baselineskip \global\advance\vsize by -\baselineskip } \gdef\everyfootingxxx#1{\oddfootingxxx{#1}\evenfootingxxx{#1}} % }% unbind the catcode of @. % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\HEADINGSoff{ \global\evenheadline={\hfil} \global\evenfootline={\hfil} \global\oddheadline={\hfil} \global\oddfootline={\hfil}} \HEADINGSoff % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{ \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\undefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg\settitlezzz} \def\settitlezzz #1{\gdef\thistitle{#1}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x), @kitem(x), @xitem(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @vtable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\internalBxitem "#1"{\def\xitemsubtopix{#1} \smallbreak \parsearg\xitemzzz} \def\internalBxitemx "#1"{\def\xitemsubtopix{#1} \itemxpar \parsearg\xitemzzz} \def\internalBkitem{\smallbreak \parsearg\kitemzzz} \def\internalBkitemx{\itemxpar \parsearg\kitemzzz} \def\kitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \lastfunction}}% \itemzzz {#1}} \def\xitemzzz #1{\dosubind {kw}{\code{#1}}{for {\bf \xitemsubtopic}}% \itemzzz {#1}} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemfont{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. (Unfortunately % we can't prevent a possible page break at the following % \baselineskip glue.) However, if what follows is an environment % such as @example, there will be no \parskip glue; then % the negative vskip we just would cause the example and the item to % crash together. So we use this bizarre value of 10001 as a signal % to \aboveenvbreak to insert \parskip glue after all. % (Possibly there are other commands that could be followed by % @example which need the same treatment, but not section titles; or % maybe section titles are the only special case and they should be % penalty 10001...) \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a table}} \def\itemx{\errmessage{@itemx while not in a table}} \def\kitem{\errmessage{@kitem while not in a table}} \def\kitemx{\errmessage{@kitemx while not in a table}} \def\xitem{\errmessage{@xitem while not in a table}} \def\xitemx{\errmessage{@xitemx while not in a table}} % Contains a kludge to get @end[description] to work. \def\description{\tablez{\dontindex}{1}{}{}{}{}} % @table, @ftable, @vtable. \def\table{\begingroup\inENV\obeylines\obeyspaces\tablex} {\obeylines\obeyspaces% \gdef\tablex #1^^M{% \tabley\dontindex#1 \endtabley}} \def\ftable{\begingroup\inENV\obeylines\obeyspaces\ftablex} {\obeylines\obeyspaces% \gdef\ftablex #1^^M{% \tabley\fnitemindex#1 \endtabley \def\Eftable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\vtable{\begingroup\inENV\obeylines\obeyspaces\vtablex} {\obeylines\obeyspaces% \gdef\vtablex #1^^M{% \tabley\vritemindex#1 \endtabley \def\Evtable{\endgraf\afterenvbreak\endgroup}% \let\Etable=\relax}} \def\dontindex #1{} \def\fnitemindex #1{\doind {fn}{\code{#1}}}% \def\vritemindex #1{\doind {vr}{\code{#1}}}% {\obeyspaces % \gdef\tabley#1#2 #3 #4 #5 #6 #7\endtabley{\endgroup% \tablez{#1}{#2}{#3}{#4}{#5}{#6}}} \def\tablez #1#2#3#4#5#6{% \aboveenvbreak % \begingroup % \def\Edescription{\Etable}% Necessary kludge. \let\itemindex=#1% \ifnum 0#3>0 \advance \leftskip by #3\mil \fi % \ifnum 0#4>0 \tableindent=#4\mil \fi % \ifnum 0#5>0 \advance \rightskip by #5\mil \fi % \def\itemfont{#2}% \itemmax=\tableindent % \advance \itemmax by -\itemmargin % \advance \leftskip by \tableindent % \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi% \def\Etable{\endgraf\afterenvbreak\endgroup}% \let\item = \internalBitem % \let\itemx = \internalBitemx % \let\kitem = \internalBkitem % \let\kitemx = \internalBkitemx % \let\xitem = \internalBxitem % \let\xitemx = \internalBxitemx % } % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \def\itemize{\parsearg\itemizezzz} \def\itemizezzz #1{% \begingroup % ended by the @end itemize \itemizey {#1}{\Eitemize} } \def\itemizey#1#2{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi \def#2{\endgraf\afterenvbreak\endgroup}% \def\itemcontents{#1}% % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi \let\item=\itemizeitem } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \def\enumerate{\parsearg\enumeratezzz} \def\enumeratezzz #1{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% \begingroup % ended by the @end enumerate % % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call itemizey, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \itemizey{#1.}\Eenumerate\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % Definition of @item while inside @itemize. \def\itemizeitem{% \advance\itemno by 1 {\let\par=\endgraf \smallbreak}% \ifhmode \errmessage{In hmode at itemizeitem}\fi {\parskip=0in \hskip 0pt \hbox to 0pt{\hss \itemcontents\hskip \itemmargin}% \vadjust{\penalty 1200}}% \flushcr} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % % For those who want to use more than one line's worth of words in % the preamble, break the line within one argument and it % will parse correctly, i.e., % % @multitable {Column 1 template} {Column 2 template} {Column 3 % template} % Not: % @multitable {Column 1 template} {Column 2 template} % {Column 3 template} % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab, @multitable or @end multitable do not need to be on their % own lines, but it will not hurt if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the part of the @columnfraction before the decimal point, which % is presumably either 0 or the empty string (but we don't check, we % just throw it away). #2 is the decimal part, which we use as the % percent of \hsize for this column. \def\pickupwholefraction#1.#2 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{.#2\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % @multitable ... @end multitable definitions: % \def\multitable{\parsearg\dotable} \def\dotable#1{\bgroup \vskip\parskip \let\item=\crcrwithfootnotes % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just & until % we encounter the problem it was intended to solve again. --karl, % nathan@acm.org, 20apr99. \let\tab=&% \let\startfootins=\startsavedfootnote \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 \def\Emultitable{% \global\setpercentfalse \crcrwithfootnotes\crcr \egroup\egroup }% % % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % \everycr will reset column counter, \colcount, at the end of % each line. Every column entry will cause \colcount to advance by one. % The table preamble % looks at the current \colcount to find the correct column width. \everycr{\noalign{% % % \filbreak%% keeps underfull box messages off when table breaks over pages. % Maybe so, but it also creates really weird page breaks when the table % breaks over pages. Wouldn't \vfil be better? Wait until the problem % manifests itself, so it can be fixed for real --karl. \global\colcount=0\relax}}% % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup&\global\advance\colcount by 1\relax \multistrut\vtop{\hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively marking % characters. \noindent\ignorespaces##\unskip\multistrut}\cr } \def\setmultitablespacing{% test to see if user has set \multitablelinespace. % If so, do nothing. If not, give it an appropriate dimension based on % current baselineskip. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 %% strut to put in table in case some entry doesn't have descenders, %% to keep lines equally spaced \let\multistrut = \strut \else %% FIXME: what is \box0 supposed to be? \gdef\multistrut{\vrule height\multitablelinespace depth\dp0 width0pt\relax} \fi %% Test to see if parskip is larger than space between lines of %% table. If not, do nothing. %% If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller %% than skip between lines in the table. \fi} % In case a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is % finished. Otherwise, the insertion is lost, it never migrates to the % main vertical list. --kasal, 22jan03. % \newbox\savedfootnotes % % \dotable \let's \startfootins to this, so that \dofootnote will call % it instead of starting the insertion right away. \def\startsavedfootnote{% \global\setbox\savedfootnotes = \vbox\bgroup \unvbox\savedfootnotes } \def\crcrwithfootnotes{% \crcr \ifvoid\savedfootnotes \else \noalign{\insert\footins{\box\savedfootnotes}}% \fi } \message{conditionals,} % Prevent errors for section commands. % Used in @ignore and in failing conditionals. \def\ignoresections{% \let\appendix=\relax \let\appendixsec=\relax \let\appendixsection=\relax \let\appendixsubsec=\relax \let\appendixsubsection=\relax \let\appendixsubsubsec=\relax \let\appendixsubsubsection=\relax %\let\begin=\relax %\let\bye=\relax \let\centerchap=\relax \let\chapter=\relax \let\contents=\relax \let\section=\relax \let\smallbook=\relax \let\subsec=\relax \let\subsection=\relax \let\subsubsec=\relax \let\subsubsection=\relax \let\titlepage=\relax \let\top=\relax \let\unnumbered=\relax \let\unnumberedsec=\relax \let\unnumberedsection=\relax \let\unnumberedsubsec=\relax \let\unnumberedsubsection=\relax \let\unnumberedsubsubsec=\relax \let\unnumberedsubsubsection=\relax } % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescriptionword{documentdescription} \def\documentdescription{\doignore{documentdescription}} \def\html{\doignore{html}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory = \comment % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \doignorecount = 0 \def\doignore#1{\begingroup % Don't complain about control sequences we have declared \outer. \ignoresections % % Make sure that spaces turn into tokens that match what \doignoretext wants. \catcode\spaceChar = 10 % % Ignore braces, so mismatched braces don't cause trouble. \catcode`\{ = 9 \catcode`\} = 9 % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \expandafter \dodoignore \csname#1\endcsname {#1}% } { \catcode`@=11 % We want to use \ST@P which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1#2{% % #1 contains, e.g., \ifinfo, a.k.a. @ifinfo. % #2 contains the string `ifinfo'. % % Define a command to find the next `@end #2', which must be on a line % by itself. \long\def\doignoretext##1^^M\end #2{\doignoretextyyy##1^^M#1\ST@P}% % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M#1##2\ST@P{\doignoreyyy{##2}\ST@P}% % % And now expand that command. \obeylines % \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with \ifinfo (for example). \fi \next #1% the token \ST@P is present just after this macro. } % We have to swallow the remaining "\ST@P". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. \def\enddoignore{\endgroup\ignorespaces} % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. Make sure the catcode of space is correct to avoid % losing inside @example, for instance. % \def\set{\begingroup\catcode` =10 \catcode`\-=12 \catcode`\_=12 % Allow - and _ in VAR. \parsearg\setxxx} \def\setxxx#1{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% \def\temp{#2}% \ifx\temp\empty \global\expandafter\let\csname SET#1\endcsname = \empty \else \setzzz{#1}#2\endsetzzz % Remove the trailing space \setxxx inserted. \fi \endgroup } % 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. % \def\clear{\parsearg\clearxxx} \def\clearxxx#1{\global\expandafter\let\csname SET#1\endcsname=\relax} % @value{foo} gets the text saved in variable foo. { \catcode`\_ = \active % % We might end up with active _ or - characters in the argument if % we're called from @code, as @code{@value{foo-bar_}}. So \let any % such active characters to their normal equivalents. \gdef\value{\begingroup \catcode`\-=\other \catcode`\_=\other \indexbreaks \let_\normalunderscore \valuexxx} } \def\valuexxx#1{\expandablevalue{#1}\endgroup} % We have this subroutine so that we can handle at least some @value's % properly in indexes (we \let\value to this in \indexdummies). Ones % whose names contain - or _ still won't work, but we can't do anything % about that. The command has to be fully expandable (if the variable % is set), since the result winds up in the index file. This means that % if the variable's value contains other Texinfo commands, it's almost % certain it will fail (although perhaps we could fix that with % sufficient work to do a one-level expansion on the result, instead of % complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % \def\ifset{\parsearg\doifset} \def\doifset#1{% \expandafter\ifx\csname SET#1\endcsname\relax \let\next=\ifsetfail \else \let\next=\ifsetsucceed \fi \next } \def\ifsetsucceed{\conditionalsucceed{ifset}} \def\ifsetfail{\doignore{ifset}} \defineunmatchedend{ifset} % @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % \def\ifclear{\parsearg\doifclear} \def\doifclear#1{% \expandafter\ifx\csname SET#1\endcsname\relax \let\next=\ifclearsucceed \else \let\next=\ifclearfail \fi \next } \def\ifclearsucceed{\conditionalsucceed{ifclear}} \def\ifclearfail{\doignore{ifclear}} \defineunmatchedend{ifclear} % @iftex, @ifnothtml, @ifnotinfo, @ifnotplaintext always succeed; we % read the text following, through the first @end iftex (etc.). Make % `@end iftex' (etc.) valid only after an @iftex. % \def\iftex{\conditionalsucceed{iftex}} \def\ifnothtml{\conditionalsucceed{ifnothtml}} \def\ifnotinfo{\conditionalsucceed{ifnotinfo}} \def\ifnotplaintext{\conditionalsucceed{ifnotplaintext}} \defineunmatchedend{iftex} \defineunmatchedend{ifnothtml} \defineunmatchedend{ifnotinfo} \defineunmatchedend{ifnotplaintext} % True conditional. Since \set globally defines its variables, we can % just start and end a group (to keep the @end definition undefined at % the outer level). % \def\conditionalsucceed#1{\begingroup \expandafter\def\csname E#1\endcsname{\endgroup}% } % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within \newindex. {\catcode`\@=11 \gdef\newwrite{\alloc@7\write\chardef\sixt@@n}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \undefined % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname\donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % Need these in case \tex is in effect and \{ is a \delimiter again. % But can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. \let\{ = \mylbrace \let\} = \myrbrace % % \definedummyword defines \#1 as \realbackslash #1\space, thus % effectively preventing its expansion. This is used only for control % words, not control letters, because the \space would be incorrect % for control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword##1{% \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}% }% \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{\realbackslash ##1}% }% % % Do the redefinitions. \commondummies } % For the aux file, @ is the escape character. So we want to redefine % everything using @ instead of \realbackslash. When everything uses % @, this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % (See comments in \indexdummies.) \def\definedummyword##1{% \expandafter\def\csname ##1\endcsname{@##1\space}% }% \def\definedummyletter##1{% \expandafter\def\csname ##1\endcsname{@##1}% }% % % Do the redefinitions. \commondummies } % Called from \indexdummies and \atdummies. \definedummyword and % \definedummyletter must be defined first. % \def\commondummies{% % \normalturnoffactive % % Control letters and accents. \definedummyletter{_}% \definedummyletter{,}% \definedummyletter{"}% \definedummyletter{`}% \definedummyletter{'}% \definedummyletter{^}% \definedummyletter{~}% \definedummyletter{=}% \definedummyword{u}% \definedummyword{v}% \definedummyword{H}% \definedummyword{dotaccent}% \definedummyword{ringaccent}% \definedummyword{tieaccent}% \definedummyword{ubaraccent}% \definedummyword{udotaccent}% \definedummyword{dotless}% % % Other non-English letters. \definedummyword{AA}% \definedummyword{AE}% \definedummyword{L}% \definedummyword{OE}% \definedummyword{O}% \definedummyword{aa}% \definedummyword{ae}% \definedummyword{l}% \definedummyword{oe}% \definedummyword{o}% \definedummyword{ss}% % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword{bf}% \definedummyword{gtr}% \definedummyword{hat}% \definedummyword{less}% \definedummyword{sf}% \definedummyword{sl}% \definedummyword{tclose}% \definedummyword{tt}% % % Texinfo font commands. \definedummyword{b}% \definedummyword{i}% \definedummyword{r}% \definedummyword{sc}% \definedummyword{t}% % \definedummyword{TeX}% \definedummyword{acronym}% \definedummyword{cite}% \definedummyword{code}% \definedummyword{command}% \definedummyword{dfn}% \definedummyword{dots}% \definedummyword{emph}% \definedummyword{env}% \definedummyword{file}% \definedummyword{kbd}% \definedummyword{key}% \definedummyword{math}% \definedummyword{option}% \definedummyword{samp}% \definedummyword{strong}% \definedummyword{uref}% \definedummyword{url}% \definedummyword{var}% \definedummyword{w}% % % Assorted special characters. \definedummyword{bullet}% \definedummyword{copyright}% \definedummyword{dots}% \definedummyword{enddots}% \definedummyword{equiv}% \definedummyword{error}% \definedummyword{expansion}% \definedummyword{minus}% \definedummyword{pounds}% \definedummyword{point}% \definedummyword{print}% \definedummyword{result}% % % Handle some cases of @value -- where the variable name does not % contain - or _, and the value does not contain any % (non-fully-expandable) commands. \let\value = \expandablevalue % % Normal spaces, not active ones. \unsepspaces % % No macro expansion. \turnoffmacros } % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). {\obeyspaces \gdef\unsepspaces{\obeyspaces\let =\space}} % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexdummytex{TeX} \def\indexdummydots{...} % \def\indexnofonts{% \def\ { }% \def\@{@}% % how to handle braces? \def\_{\normalunderscore}% % \let\,=\asis \let\"=\asis \let\`=\asis \let\'=\asis \let\^=\asis \let\~=\asis \let\==\asis \let\u=\asis \let\v=\asis \let\H=\asis \let\dotaccent=\asis \let\ringaccent=\asis \let\tieaccent=\asis \let\ubaraccent=\asis \let\udotaccent=\asis \let\dotless=\asis % % Other non-English letters. \def\AA{AA}% \def\AE{AE}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\aa{aa}% \def\ae{ae}% \def\l{l}% \def\oe{oe}% \def\o{o}% \def\ss{ss}% \def\exclamdown{!}% \def\questiondown{?}% % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % % Texinfo font commands. \let\b=\asis \let\i=\asis \let\r=\asis \let\sc=\asis \let\t=\asis % \let\TeX=\indexdummytex \let\acronym=\asis \let\cite=\asis \let\code=\asis \let\command=\asis \let\dfn=\asis \let\dots=\indexdummydots \let\emph=\asis \let\env=\asis \let\file=\asis \let\kbd=\asis \let\key=\asis \let\math=\asis \let\option=\asis \let\samp=\asis \let\strong=\asis \let\uref=\asis \let\url=\asis \let\var=\asis \let\w=\asis } \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % For \ifx comparisons. \def\emptymacro{\empty} % Most index entries go through here, but \dosubind is the general case. % \def\doind#1#2{\dosubind{#1}{#2}\empty} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % \empty if called from \doind, as we usually are. The main exception % is with defuns, which call us directly. % \def\dosubind#1#2#3{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt #2}}% \fi {% \count255=\lastpenalty {% \indexdummies % Must do this here, since \bf, etc expand at this stage \escapechar=`\\ {% \let\folio = 0% We will expand all macros now EXCEPT \folio. \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % The main index entry text. \toks0 = {#2}% % % If third arg is present, precede it with space in sort key. \def\thirdarg{#3}% \ifx\thirdarg\emptymacro \else % If the third (subentry) arg is present, add it to the index % line to write. \toks0 = \expandafter{\the\toks0 \space #3}% \fi % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\csname#1indfile\endcsname{% \realbackslash entry{\indexsorttmp}{\folio}{\the\toks0}}% }% % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write will make \lastskip zero. The result is that sequences % like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % \iflinks \ifvmode \skip0 = \lastskip \ifdim\lastskip = 0pt \else \nobreak\vskip-\skip0 \fi \fi % \temp % do the write % \ifvmode \ifdim\skip0 = 0pt \else \nobreak\vskip\skip0 \fi \fi \fi }% }% \penalty\count255 }% } % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \def\printindex{\parsearg\doprintindex} \def\doprintindex#1{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \everypar = {}% don't want the \kern\-parindent from indentation suppression. \indexbreaks % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\rawbackslashxx}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \penalty -300 % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% \vskip .33\baselineskip plus .1\baselineskip % % Do our best not to break after the initial. \nobreak }} % This typesets a paragraph consisting of #1, dot leaders, and then #2 % flush to the right margin. It is used for index and table of contents % entries. The paragraph is indented by \leftskip. % \def\entry#1#2{\begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing columns. \vskip 0pt plus1pt % % Start a ``paragraph'' for the index entry so the line breaking % parameters we've set above will have an effect. \noindent % % Insert the text of the index entry. TeX will do line-breaking on it. #1% % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \def\tempa{{\rm }}% \def\tempb{#2}% \edef\tempc{\tempa}% \edef\tempd{\tempb}% \ifx\tempc\tempd\ \else% % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else \ #2% The page number ends the paragraph. \fi \fi% \par \endgroup} % Like \dotfill except takes at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % \def\appendixletter{\char\the\appendixno} % We do the following for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines this as the name of the chapter. % page headings and footings can use it. @section does likewise. \def\thischapter{} \def\thissection{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raise/lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % Choose a numbered-heading macro % #1 is heading level if unmodified by @raisesections or @lowersections % #2 is text for heading \def\numhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \chapterzzz{#2} \or \seczzz{#2} \or \numberedsubseczzz{#2} \or \numberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \chapterzzz{#2} \else \numberedsubsubseczzz{#2} \fi \fi \suppressfirstparagraphindent } % like \numhead, but chooses appendix heading levels \def\apphead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \appendixzzz{#2} \or \appendixsectionzzz{#2} \or \appendixsubseczzz{#2} \or \appendixsubsubseczzz{#2} \else \ifnum \absseclevel<0 \appendixzzz{#2} \else \appendixsubsubseczzz{#2} \fi \fi \suppressfirstparagraphindent } % like \numhead, but chooses numberless heading levels \def\unnmhead#1#2{\absseclevel=\secbase\advance\absseclevel by #1 \ifcase\absseclevel \unnumberedzzz{#2} \or \unnumberedseczzz{#2} \or \unnumberedsubseczzz{#2} \or \unnumberedsubsubseczzz{#2} \else \ifnum \absseclevel<0 \unnumberedzzz{#2} \else \unnumberedsubsubseczzz{#2} \fi \fi \suppressfirstparagraphindent } % @chapter, @appendix, @unnumbered. \def\thischaptername{No Chapter Title} \outer\def\chapter{\parsearg\chapteryyy} \def\chapteryyy #1{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \chapno by 1 \message{\putwordChapter\space \the\chapno}% \chapmacro {#1}{\the\chapno}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% % We don't substitute the actual chapter name into \thischapter % because we don't want its macros evaluated now. \xdef\thischapter{\putwordChapter{} \the\chapno: \noexpand\thischaptername}% \writetocentry{chap}{#1}{{\the\chapno}} \donoderef \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } % we use \chapno to avoid indenting back \def\appendixbox#1{% \setbox0 = \hbox{\putwordAppendix{} \the\chapno}% \hbox to \wd0{#1\hss}} \outer\def\appendix{\parsearg\appendixyyy} \def\appendixyyy #1{\apphead0{#1}} % normally apphead0 calls appendixzzz \def\appendixzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 \global\advance \appendixno by 1 \message{\putwordAppendix\space \appendixletter}% \chapmacro {#1}{\appendixbox{\putwordAppendix{} \appendixletter}}% \gdef\thissection{#1}% \gdef\thischaptername{#1}% \xdef\thischapter{\putwordAppendix{} \appendixletter: \noexpand\thischaptername}% \writetocentry{appendix}{#1}{{\appendixletter}} \appendixnoderef \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\def\centerchap{\parsearg\centerchapyyy} \def\centerchapyyy #1{{\let\unnumbchapmacro=\centerchapmacro \unnumberedyyy{#1}}} % @top is like @unnumbered. \outer\def\top{\parsearg\unnumberedyyy} \outer\def\unnumbered{\parsearg\unnumberedyyy} \def\unnumberedyyy #1{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz \def\unnumberedzzz #1{% \secno=0 \subsecno=0 \subsubsecno=0 % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}\message{(\the\toks0)}% % \unnumbchapmacro {#1}% \gdef\thischapter{#1}\gdef\thissection{#1}% \writetocentry{unnumbchap}{#1}{{\the\chapno}} \unnumbnoderef \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % Sections. \outer\def\numberedsec{\parsearg\secyyy} \def\secyyy #1{\numhead1{#1}} % normally calls seczzz \def\seczzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\the\chapno}{\the\secno}% \writetocentry{sec}{#1}{{\the\chapno}{\the\secno}} \donoderef \nobreak } \outer\def\appendixsection{\parsearg\appendixsecyyy} \outer\def\appendixsec{\parsearg\appendixsecyyy} \def\appendixsecyyy #1{\apphead1{#1}} % normally calls appendixsectionzzz \def\appendixsectionzzz #1{% \subsecno=0 \subsubsecno=0 \global\advance \secno by 1 % \gdef\thissection{#1}\secheading {#1}{\appendixletter}{\the\secno}% \writetocentry{sec}{#1}{{\appendixletter}{\the\secno}} \appendixnoderef \nobreak } \outer\def\unnumberedsec{\parsearg\unnumberedsecyyy} \def\unnumberedsecyyy #1{\unnmhead1{#1}} % normally calls unnumberedseczzz \def\unnumberedseczzz #1{% \plainsecheading {#1}\gdef\thissection{#1}% \writetocentry{unnumbsec}{#1}{{\the\chapno}{\the\secno}} \unnumbnoderef \nobreak } % Subsections. \outer\def\numberedsubsec{\parsearg\numberedsubsecyyy} \def\numberedsubsecyyy #1{\numhead2{#1}} % normally calls numberedsubseczzz \def\numberedsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\the\chapno}{\the\secno}{\the\subsecno}% \writetocentry{subsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} \donoderef \nobreak } \outer\def\appendixsubsec{\parsearg\appendixsubsecyyy} \def\appendixsubsecyyy #1{\apphead2{#1}} % normally calls appendixsubseczzz \def\appendixsubseczzz #1{% \gdef\thissection{#1}\subsubsecno=0 \global\advance \subsecno by 1 % \subsecheading {#1}{\appendixletter}{\the\secno}{\the\subsecno}% \writetocentry{subsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}} \appendixnoderef \nobreak } \outer\def\unnumberedsubsec{\parsearg\unnumberedsubsecyyy} \def\unnumberedsubsecyyy #1{\unnmhead2{#1}} %normally calls unnumberedsubseczzz \def\unnumberedsubseczzz #1{% \plainsubsecheading {#1}\gdef\thissection{#1}% \writetocentry{unnumbsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}} \unnumbnoderef \nobreak } % Subsubsections. \outer\def\numberedsubsubsec{\parsearg\numberedsubsubsecyyy} \def\numberedsubsubsecyyy #1{\numhead3{#1}} % normally numberedsubsubseczzz \def\numberedsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}% \writetocentry{subsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} \donoderef \nobreak } \outer\def\appendixsubsubsec{\parsearg\appendixsubsubsecyyy} \def\appendixsubsubsecyyy #1{\apphead3{#1}} % normally appendixsubsubseczzz \def\appendixsubsubseczzz #1{% \gdef\thissection{#1}\global\advance \subsubsecno by 1 % \subsubsecheading {#1} {\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}% \writetocentry{subsubsec}{#1}{{\appendixletter}{\the\secno}{\the\subsecno}{\the\subsubsecno}} \appendixnoderef \nobreak } \outer\def\unnumberedsubsubsec{\parsearg\unnumberedsubsubsecyyy} \def\unnumberedsubsubsecyyy #1{\unnmhead3{#1}} %normally unnumberedsubsubseczzz \def\unnumberedsubsubseczzz #1{% \plainsubsubsecheading {#1}\gdef\thissection{#1}% \writetocentry{unnumbsubsubsec}{#1}{{\the\chapno}{\the\secno}{\the\subsecno}{\the\subsubsecno}} \unnumbnoderef \nobreak } % These are variants which are not "outer", so they can appear in @ifinfo. % Actually, they should now be obsolete; ordinary section commands should work. \def\infotop{\parsearg\unnumberedzzz} \def\infounnumbered{\parsearg\unnumberedzzz} \def\infounnumberedsec{\parsearg\unnumberedseczzz} \def\infounnumberedsubsec{\parsearg\unnumberedsubseczzz} \def\infounnumberedsubsubsec{\parsearg\unnumberedsubsubseczzz} \def\infoappendix{\parsearg\appendixzzz} \def\infoappendixsec{\parsearg\appendixseczzz} \def\infoappendixsubsec{\parsearg\appendixsubseczzz} \def\infoappendixsubsubsec{\parsearg\appendixsubsubseczzz} \def\infochapter{\parsearg\chapterzzz} \def\infosection{\parsearg\sectionzzz} \def\infosubsection{\parsearg\subsectionzzz} \def\infosubsubsection{\parsearg\subsubsectionzzz} % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading % NOTE on use of \vbox for chapter headings, section headings, and such: % 1) We use \vbox rather than the earlier \line to permit % overlong headings to fold. % 2) \hyphenpenalty is set to 10000 because hyphenation in a % heading is obnoxious; this forbids it. % 3) Likewise, headings look best if no \parindent is used, and % if justification is not attempted. Hence \raggedright. \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz #1{% {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}% \bigskip \par\penalty 200\relax \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \def\heading{\parsearg\doheading} \def\subheading{\parsearg\dosubheading} \def\subsubheading{\parsearg\dosubsubheading} \def\doheading#1{\plainsecheading{#1}\suppressfirstparagraphindent} \def\dosubheading#1{\plainsubsecheading{#1}\suppressfirstparagraphindent} \def\dosubsubheading#1{\plainsubsubsecheading{#1}\suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. %%% Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} %%% Define plain chapter starts, and page on/off switching for it % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} \def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi} \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{ \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon \def\CHAPFplain{ \global\let\chapmacro=\chfplain \global\let\unnumbchapmacro=\unnchfplain \global\let\centerchapmacro=\centerchfplain} % Plain chapter opening. % #1 is the text, #2 the chapter number or empty if unnumbered. \def\chfplain#1#2{% \pchapsepmacro {% \chapfonts \rm \def\chapnum{#2}% \setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}% \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % Plain opening for unnumbered. \def\unnchfplain#1{\chfplain{#1}{}} % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerchfplain#1{{% \def\centerparametersmaybe{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt }% \chfplain{#1}{}% }} \CHAPFplain % The default \def\unnchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt\raggedright \rm #1\hfill}}\bigskip \par\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000 \parindent=0pt \hfill {\rm #1}\hfill}}\bigskip \par\nobreak } \def\CHAPFopen{ \global\let\chapmacro=\chfopen \global\let\unnumbchapmacro=\unnchfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip {-1000}} \def\secheading#1#2#3{\sectionheading{sec}{#2.#3}{#1}} \def\plainsecheading#1{\sectionheading{sec}{}{#1}} % Subsection titles. \newskip \subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip {-500}} \def\subsecheading#1#2#3#4{\sectionheading{subsec}{#2.#3.#4}{#1}} \def\plainsubsecheading#1{\sectionheading{subsec}{}{#1}} % Subsubsection titles. \let\subsubsecheadingskip = \subsecheadingskip \let\subsubsecheadingbreak = \subsecheadingbreak \def\subsubsecheading#1#2#3#4#5{\sectionheading{subsubsec}{#2.#3.#4.#5}{#1}} \def\plainsubsubsecheading#1{\sectionheading{subsubsec}{}{#1}} % Print any size section title. % % #1 is the section type (sec/subsec/subsubsec), #2 is the section % number (maybe empty), #3 the text. \def\sectionheading#1#2#3{% {% \expandafter\advance\csname #1headingskip\endcsname by \parskip \csname #1headingbreak\endcsname }% {% % Switch to the right set of fonts. \csname #1fonts\endcsname \rm % % Only insert the separating space if we have a section number. \def\secnum{#2}% \setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}% % \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright \hangindent = \wd0 % zero if no section number \unhbox0 #3}% }% % Add extra space after the heading -- either a line space or a % paragraph space, whichever is more. (Some people like to set % \parskip to large values for some reason.) Don't allow stretch, though. \nobreak \ifdim\parskip>\normalbaselineskip \kern\parskip \else \kern\normalbaselineskip \fi \nobreak } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. We supply {\folio} at the end of the % argument, which will end up as the last argument to the \...entry macro. % % Usage: \writetocentry{chap}{The Name of The Game}{{\the\chapno}} % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % \newif\iftocfileopened \def\writetocentry#1#2#3{% \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks \toks0 = {#2}% \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}#3{\folio}}}% \temp \fi % % Tell \shipout to create a page destination if we're doing pdf, which % will be the target of the links in the table of contents. We can't % just do it on every page because the title pages are numbered 1 and % 2 (the page numbers aren't printed), and so are the first two pages % of the document. Thus, we'd have two destinations named `1', and % two named `2'. \ifpdf \pdfmakepagedesttrue \fi } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Finish up the main text and prepare to read what we've written % to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \unnumbchapmacro{#1}\def\thischapter{}% \savepageno = \pageno \begingroup % Set up to handle contents files properly. \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11 % We can't do this, because then an actual ^ in a section % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97. %\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. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % Normal (long) toc. \def\contents{% \startcontents{\putwordTOC}% \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \pdfmakeoutlines \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\chapentry = \shortchapentry \let\appendixentry = \shortappendixentry \let\unnumbchapentry = \shortunnumberedentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\secentry ##1##2##3##4{} \def\subsecentry ##1##2##3##4##5{} \def\subsubsecentry ##1##2##3##4##5##6{} \let\unnumbsecentry = \secentry \let\unnumbsubsecentry = \subsecentry \let\unnumbsubsubsecentry = \subsubsecentry \openin 1 \jobname.toc \ifeof 1 \else \closein 1 \input \jobname.toc \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents \ifpdf \pdfcatalog{/PageMode /UseOutlines}% \fi % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Chapters, in the main contents. \def\chapentry#1#2#3{\dochapentry{#2\labelspace#1}{#3}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#3\egroup}% } % Appendices, in the main contents. \def\appendixentry#1#2#3{% \dochapentry{\appendixbox{\putwordAppendix{} #2}\labelspace#1}{#3}} % % Appendices, in the short toc. \let\shortappendixentry = \shortchapentry % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `Appendix A' for an appendix, or `3' for a chapter. % We could simplify the code here by writing out an \appendixentry % command in the toc file for appendices, instead of using \chapentry % for both, but it doesn't seem worth it. % \newdimen\shortappendixwidth % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) \dimen0 = 1em \hbox to \dimen0{#1\hss}% } % Unnumbered chapters. \def\unnumbchapentry#1#2#3{\dochapentry{#1}{#3}} \def\shortunnumberedentry#1#2#3{\tocentry{#1}{\doshortpageno\bgroup#3\egroup}} % Sections. \def\secentry#1#2#3#4{\dosecentry{#2.#3\labelspace#1}{#4}} \def\unnumbsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\subsecentry#1#2#3#4#5{\dosubsecentry{#2.#3.#4\labelspace#1}{#5}} \def\unnumbsubsecentry#1#2#3#4#5{\dosubsecentry{#1}{#5}} % And subsubsections. \def\subsubsecentry#1#2#3#4#5#6{% \dosubsubsecentry{#2.#3.#4.#5\labelspace#1}{#6}} \def\unnumbsubsubsecentry#1#2#3#4#5#6{\dosubsubsecentry{#1}{#6}} % This parameter controls the indentation of the various levels. \newdimen\tocindent \tocindent = 3pc % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % Final typesetting of a toc entry; we use the same \entry macro as for % the index entries, but we want to suppress hyphenation here. (We % can't do that in the \entry macro, since index entries might consist % of hyphenated-identifiers-that-do-not-fit-on-a-line-and-nothing-else.) \def\tocentry#1#2{\begingroup \vskip 0pt plus1pt % allow a little stretch for the sake of nice page breaks % Do not use \turnoffactive in these arguments. Since the toc is % typeset in cmr, characters such as _ would come out wrong; we % have to do the usual translation tricks. \entry{#1}{#2}% \endgroup} % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \let\subsecentryfonts = \textfonts \let\subsubsecentryfonts = \textfonts \message{environments,} % @foo ... @end foo. % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, it should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt} % \global\setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{ \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @tex ... @end tex escapes into raw Tex temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain tex @ character. \def\tex{\begingroup \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\==\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \escapechar=`\\ % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% \let\Etex=\endgroup} % Define @lisp ... @end lisp. % @lisp does a \begingroup so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % {\obeyspaces % \gdef\sepspaces{\obeyspaces\let =\tie}} % Define \obeyedspace to be our active space, whatever it is. This is % for use in \parsearg. {\sepspaces% \global\let\obeyedspace= } % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty>10000 \else \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \def\cartouche{% \par % can't be in the midst of a paragraph. \begingroup \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt %we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing=\comment \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \hsize=\cartinner \kern3pt \begingroup \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \def\Ecartouche{% \endgroup \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \endgroup }} % This macro is called at the beginning of all the @example variants, % inside a group. \def\nonfillstart{% \aboveenvbreak \inENV % This group ends at the end of the body \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt \parindent = 0pt \emergencystretch = 0pt % don't try to avoid overfull boxes % @cartouche defines \nonarrowing to inhibit narrowing % at next level down. \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \let\exdent=\nofillexdent \let\nonarrowing=\relax \fi } % Define the \E... control sequence only if we are inside the particular % environment, so the error checking in \end will work. % % To end an @example-like environment, we first end the paragraph (via % \afterenvbreak's vertical glue), and then the group. That way we keep % the zero \parskip that the environments set -- \parskip glue will be % inserted at the beginning of the next paragraph in the document, after % the environment. % \def\nonfillfinish{\afterenvbreak\endgroup} % @lisp: indented, narrowed, typewriter font. \def\lisp{\begingroup \nonfillstart \let\Elisp = \nonfillfinish \tt \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @example: Same as @lisp. \def\example{\begingroup \def\Eexample{\nonfillfinish\endgroup}\lisp} % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. \def\smalllisp{\begingroup \def\Esmalllisp{\nonfillfinish\endgroup}% \def\Esmallexample{\nonfillfinish\endgroup}% \smallexamplefonts \lisp } \let\smallexample = \smalllisp % @display: same as @lisp except keep current font. % \def\display{\begingroup \nonfillstart \let\Edisplay = \nonfillfinish \gobble } % % @smalldisplay: @display plus smaller fonts. % \def\smalldisplay{\begingroup \def\Esmalldisplay{\nonfillfinish\endgroup}% \smallexamplefonts \rm \display } % @format: same as @display except don't narrow margins. % \def\format{\begingroup \let\nonarrowing = t \nonfillstart \let\Eformat = \nonfillfinish \gobble } % % @smallformat: @format plus smaller fonts. % \def\smallformat{\begingroup \def\Esmallformat{\nonfillfinish\endgroup}% \smallexamplefonts \rm \format } % @flushleft (same as @format). % \def\flushleft{\begingroup \def\Eflushleft{\nonfillfinish\endgroup}\format} % @flushright. % \def\flushright{\begingroup \let\nonarrowing = t \nonfillstart \let\Eflushright = \nonfillfinish \advance\leftskip by 0pt plus 1fill \gobble } % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. % \def\quotation{% \begingroup\inENV %This group ends at the end of the @quotation body {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % We have retained a nonzero parskip for the environment, since we're % doing normal filling. So to avoid extra space below the environment... \def\Equotation{\parskip = 0pt \nonfillfinish}% % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \advance\rightskip by \lispnarrowing \exdentamount = \lispnarrowing \let\nonarrowing = \relax \fi } % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=12}\dospecials} % % [Knuth] pp. 380,381,391 % Disable Spanish ligatures ?` and !` of \tt font \begingroup \catcode`\`=\active\gdef`{\relax\lq} \endgroup % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \catcode`\`=\active \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % \def\starttabbox{\setbox0=\hbox\bgroup} \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen0=\wd0 % the width so far, or since the previous tab \divide\dimen0 by\tabw \multiply\dimen0 by\tabw % compute previous multiple of \tabw \advance\dimen0 by\tabw % advance to next multiple of \tabw \wd0=\dimen0 \box0 \starttabbox }% } \endgroup \def\setupverbatim{% % Easiest (and conventionally used) font for verbatim \tt \def\par{\leavevmode\egroup\box0\endgraf}% \catcode`\`=\active \tabexpand % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=12\catcode`\}=12 \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] %% Include LaTeX hack for completeness -- never know %% \begingroup %% \catcode`|=0 \catcode`[=1 %% \catcode`]=2\catcode`\{=12\catcode`\}=12\catcode`\ =\active %% \catcode`\\=12|gdef|doverbatim#1@end verbatim[ %% #1|endgroup|def|Everbatim[]|end[verbatim]] %% |endgroup % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \gdef\doverbatim#1^^M#2@end verbatim{#2\end{verbatim}}% \endgroup % \def\verbatim{% \def\Everbatim{\nonfillfinish\endgroup}% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim\doverbatim } % @verbatiminclude FILE - insert text of file in verbatim environment. % % Allow normal characters that we make active in the argument (a file name). \def\verbatiminclude{% \begingroup \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \parsearg\doverbatiminclude } \def\setupverbatiminclude{% \begingroup \nonfillstart \advance\leftskip by -\defbodyindent \begingroup\setupverbatim } % \def\doverbatiminclude#1{% % Restore active chars for included file. \endgroup \begingroup \let\value=\expandablevalue \def\thisfile{#1}% \expandafter\expandafter\setupverbatiminclude\input\thisfile \endgroup \nonfillfinish \endgroup } % @copying ... @end copying. % Save the text away for @insertcopying later. Many commands won't be % allowed in this context, but that's ok. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\begingroup % Define a command to swallow text until we reach `@end copying'. % \ is the escape char in this texinfo.tex file, so it is the % delimiter for the command; @ will be the escape char when we read % it, but that doesn't matter. \long\def\docopying##1\end copying{\gdef\copyingtext{##1}\enddocopying}% % % We must preserve ^^M's in the input file; see \insertcopying below. \catcode`\^^M = \active \docopying } % What we do to finish off the copying text. % \def\enddocopying{\endgroup\ignorespaces} % @insertcopying. Here we must play games with ^^M's. On the one hand, % we need them to delimit commands such as `@end quotation', so they % must be active. On the other hand, we certainly don't want every % end-of-line to be a \par, as would happen with the normal active % definition of ^^M. On the third hand, two ^^M's in a row should still % generate a \par. % % Our approach is to make ^^M insert a space and a penalty1 normally; % then it can also check if \lastpenalty=1. If it does, then manually % do \par. % % This messes up the normal definitions of @c[omment], so we redefine % it. Similarly for @ignore. (These commands are used in the gcc % manual for man page generation.) % % Seems pretty fragile, most line-oriented commands will presumably % fail, but for the limited use of getting the copying text (which % should be quite simple) inserted, we can hope it's ok. % {\catcode`\^^M=\active % \gdef\insertcopying{\begingroup % \parindent = 0pt % looks wrong on title page \def^^M{% \ifnum \lastpenalty=1 % \par % \else % \space \penalty 1 % \fi % }% % % Fix @c[omment] for catcode 13 ^^M's. \def\c##1^^M{\ignorespaces}% \let\comment = \c % % % Don't bother jumping through all the hoops that \doignore does, it % would be very hard since the catcodes are already set. \long\def\ignore##1\end ignore{\ignorespaces}% % \copyingtext % \endgroup}% } \message{defuns,} % @defun etc. % Allow user to change definition object font (\df) internally \def\setdeffont#1 {\csname DEF#1\endcsname} \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\parencount % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\&=\active \catcode`\[=\active \catcode`\]=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) {\activeparens % Now, smart parens don't turn on until &foo (see \amprm) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \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. \gdef\oprm#1 {{\rm\char`\(}#1 \bf \let(=\opnested \global\advance\parencount by 1 } % % This is the definition of ( when already inside a level of parens. \gdef\opnested{\char`\(\global\advance\parencount by 1 } % \gdef\clrm{% Print a paren in roman if it is taking us back to depth of 0. % also in that case restore the outer-level definition of (. \ifnum \parencount=1 {\rm \char `\)}\sl \let(=\oprm \else \char `\) \fi \global\advance \parencount by -1 } % If we encounter &foo, then turn on ()-hacking afterwards \gdef\amprm#1 {{\rm\}\let(=\oprm \let)=\clrm\ } % \gdef\normalparens{\boldbrax\let&=\ampnr} } % End of definition inside \activeparens %% These parens (in \boldbrax) actually are a little bolder than the %% contained text. This is especially needed for [ and ] \def\opnr{{\sf\char`\(}\global\advance\parencount by 1 } \def\clnr{{\sf\char`\)}\global\advance\parencount by -1 } \let\ampnr = \& \def\lbrb{{\bf\char`\[}} \def\rbrb{{\bf\char`\]}} % Active &'s sneak into the index arguments, so make sure it's defined. { \catcode`& = \active \global\let& = \ampnr } % \defname, which formats the name of the @def (not the args). % #1 is the function name. % #2 is the type of definition, such as "Function". % \def\defname#1#2{% % How we'll output the type name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \ifempty{#2}% \def\defnametype{}% \else \def\defnametype{[\rm #2]}% \fi % % Get the values of \leftskip and \rightskip as they were outside the @def... \dimen2=\leftskip \advance\dimen2 by -\defbodyindent % % Figure out values for the paragraph shape. \setbox0=\hbox{\hskip \deflastargmargin{\defnametype}}% \dimen0=\hsize \advance \dimen0 by -\wd0 % compute size for first line \dimen1=\hsize \advance \dimen1 by -\defargsindent % size for continuations \parshape 2 0in \dimen0 \defargsindent \dimen1 % % Output arg 2 ("Function" or some such) but stuck inside a box of % width 0 so it does not interfere with linebreaking. \noindent % {% Adjust \hsize to exclude the ambient margins, % so that \rightline will obey them. \advance \hsize by -\dimen2 \dimen3 = 0pt % was -1.25pc \rlap{\rightline{\defnametype\kern\dimen3}}% }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \advance\leftskip by -\defbodyindent \exdentamount=\defbodyindent {\df #1}\enskip % output function name % \defunargs will be called next to output the arguments, if any. } % Common pieces to start any @def... % #1 is the \E... control sequence to end the definition (which we define). % #2 is the \...x control sequence (which our caller defines). % #3 is the control sequence to process the header, such as \defunheader. % \def\parsebodycommon#1#2#3{% \begingroup\inENV % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we want to allow a % break after all. Check for penalty 10002 (inserted by % \defargscommonending) instead of 10000, since the sectioning % commands insert a \penalty10000, and we don't want to allow a break % between a section heading and a defun. \ifnum\lastpenalty=10002 \penalty0 \fi \medbreak % % Define the \E... end token that this defining construct specifies % so that it will exit this group. \def#1{\endgraf\endgroup\medbreak}% % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } % Common part of the \...x definitions. % \def\defxbodycommon{% % As with \parsebodycommon above, allow line break if we have multiple % x headers in a row. It's not a great place, though. \ifnum\lastpenalty=10000 \penalty1000 \fi % \begingroup\obeylines } % Process body of @defun, @deffn, @defmac, etc. % \def\defparsebody#1#2#3{% \parsebodycommon{#1}{#2}{#3}% \def#2{\defxbodycommon \activeparens \spacesplit#3}% \catcode\equalChar=\active \begingroup\obeylines\activeparens \spacesplit#3% } % #1, #2, #3 are the common arguments (see \parsebodycommon above). % #4, delimited by the space, is the class name. % \def\defmethparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 {\defxbodycommon \activeparens \spacesplit{#3{##1}}}% \begingroup\obeylines\activeparens % The \empty here prevents misinterpretation of a construct such as % @deffn {whatever} {Enharmonic comma} % See comments at \deftpparsebody, although in our case we don't have % to remove the \empty afterwards, since it is empty. \spacesplit{#3{#4}}\empty } % Used for @deftypemethod and @deftypeivar. % #1, #2, #3 are the common arguments (see \defparsebody). % #4, delimited by a space, is the class name. % #5 is the method's return type. % \def\deftypemethparsebody#1#2#3#4 #5 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 {\defxbodycommon \activeparens \spacesplit{#3{##1}{##2}}}% \begingroup\obeylines\activeparens \spacesplit{#3{#4}{#5}}% } % Used for @deftypeop. The change from \deftypemethparsebody is an % extra argument at the beginning which is the `category', instead of it % being the hardwired string `Method' or `Instance Variable'. We have % to account for this both in the \...x definition and in parsing the % input at hand. Thus also need a control sequence (passed as #5) for % the \E... definition to assign the category name to. % \def\deftypeopparsebody#1#2#3#4#5 #6 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 ##3 {\def#4{##1}% \defxbodycommon \activeparens \spacesplit{#3{##2}{##3}}}% \begingroup\obeylines\activeparens \spacesplit{#3{#5}{#6}}% } % For @defop. \def\defopparsebody #1#2#3#4#5 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 {\def#4{##1}% \defxbodycommon \activeparens \spacesplit{#3{##2}}}% \begingroup\obeylines\activeparens \spacesplit{#3{#5}}% } % These parsing functions are similar to the preceding ones % except that they do not make parens into active characters. % These are used for "variables" since they have no arguments. % \def\defvarparsebody #1#2#3{% \parsebodycommon{#1}{#2}{#3}% \def#2{\defxbodycommon \spacesplit#3}% \catcode\equalChar=\active \begingroup\obeylines \spacesplit#3% } % @defopvar. \def\defopvarparsebody #1#2#3#4#5 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 ##2 {\def#4{##1}% \defxbodycommon \spacesplit{#3{##2}}}% \begingroup\obeylines \spacesplit{#3{#5}}% } \def\defvrparsebody#1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% \begingroup\obeylines \spacesplit{#3{#4}}% } % This loses on `@deftp {Data Type} {struct termios}' -- it thinks the % type is just `struct', because we lose the braces in `{struct % termios}' when \spacesplit reads its undelimited argument. Sigh. % \let\deftpparsebody=\defvrparsebody % % So, to get around this, we put \empty in with the type name. That % way, TeX won't find exactly `{...}' as an undelimited argument, and % won't strip off the braces. % \def\deftpparsebody #1#2#3#4 {% \parsebodycommon{#1}{#2}{#3}% \def#2##1 {\defxbodycommon \spacesplit{#3{##1}}}% \begingroup\obeylines \spacesplit{\parsetpheaderline{#3{#4}}}\empty } % Fine, but then we have to eventually remove the \empty *and* the % braces (if any). That's what this does. % \def\removeemptybraces\empty#1\relax{#1} % After \spacesplit has done its work, this is called -- #1 is the final % thing to call, #2 the type name (which starts with \empty), and #3 % (which might be empty) the arguments. % \def\parsetpheaderline#1#2#3{% #1{\removeemptybraces#2\relax}{#3}% }% % Split up #2 (the rest of the input line) at the first space token. % call #1 with two arguments: % the first is all of #2 before the space token, % the second is all of #2 after that space token. % If #2 contains no space token, all of it is passed as the first arg % and the second is passed as empty. % {\obeylines % \gdef\spacesplit#1#2^^M{\endgroup\spacesplitx{#1}#2 \relax\spacesplitx}% \long\gdef\spacesplitx#1#2 #3#4\spacesplitx{% \ifx\relax #3% #1{#2}{}% \else % #1{#2}{#3#4}% \fi}% } % Define @defun. % This is called to end the arguments processing for all the @def... commands. % \def\defargscommonending{% \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil \endgraf \nobreak\vskip -\parskip \penalty 10002 % signal to \parsebodycommon. } % This expands the args and terminates the paragraph they comprise. % \def\defunargs#1{\functionparens \sl % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Set the font temporarily and use \font in case \setfont made \tensl a macro. {\tensl\hyphenchar\font=0}% #1% {\tensl\hyphenchar\font=45}% \ifnum\parencount=0 \else \errmessage{Unbalanced parentheses in @def}\fi% \defargscommonending } \def\deftypefunargs #1{% % Expand, preventing hyphenation at `-' chars. % Note that groups don't affect changes in \hyphenchar. % Use \boldbraxnoamp, not \functionparens, so that & is not special. \boldbraxnoamp \tclose{#1}% avoid \code because of side effects on active chars \defargscommonending } % Do complete processing of one @defun or @defunx line already parsed. % @deffn Command forward-char nchars \def\deffn{\defmethparsebody\Edeffn\deffnx\deffnheader} \def\deffnheader #1#2#3{\doind {fn}{\code{#2}}% \begingroup\defname {#2}{#1}\defunargs{#3}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defun == @deffn Function \def\defun{\defparsebody\Edefun\defunx\defunheader} \def\defunheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDeffunc}% \defunargs {#2}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefun int foobar (int @var{foo}, float @var{bar}) \def\deftypefun{\defparsebody\Edeftypefun\deftypefunx\deftypefunheader} % #1 is the data type. #2 is the name and args. \def\deftypefunheader #1#2{\deftypefunheaderx{#1}#2 \relax} % #1 is the data type, #2 the name, #3 the args. \def\deftypefunheaderx #1#2 #3\relax{% \doind {fn}{\code{#2}}% Make entry in function index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypefun}% \deftypefunargs {#3}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @deftypefn {Library Function} int foobar (int @var{foo}, float @var{bar}) \def\deftypefn{\defmethparsebody\Edeftypefn\deftypefnx\deftypefnheader} % \defheaderxcond#1\relax$.$ % puts #1 in @code, followed by a space, but does nothing if #1 is null. \def\defheaderxcond#1#2$.${\ifx#1\relax\else\code{#1#2} \fi} % #1 is the classification. #2 is the data type. #3 is the name and args. \def\deftypefnheader #1#2#3{\deftypefnheaderx{#1}{#2}#3 \relax} % #1 is the classification, #2 the data type, #3 the name, #4 the args. \def\deftypefnheaderx #1#2#3 #4\relax{% \doind {fn}{\code{#3}}% Make entry in function index \begingroup \normalparens % notably, turn off `&' magic, which prevents % at least some C++ text from working \defname {\defheaderxcond#2\relax$.$#3}{#1}% \deftypefunargs {#4}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defmac == @deffn Macro \def\defmac{\defparsebody\Edefmac\defmacx\defmacheader} \def\defmacheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefmac}% \defunargs {#2}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defspec == @deffn Special Form \def\defspec{\defparsebody\Edefspec\defspecx\defspecheader} \def\defspecheader #1#2{\doind {fn}{\code{#1}}% Make entry in function index \begingroup\defname {#1}{\putwordDefspec}% \defunargs {#2}\endgroup % \catcode\equalChar=\other % Turn off change made in \defparsebody } % @defop CATEGORY CLASS OPERATION ARG... % \def\defop #1 {\def\defoptype{#1}% \defopparsebody\Edefop\defopx\defopheader\defoptype} % \def\defopheader#1#2#3{% \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% function index entry \begingroup \defname{#2}{\defoptype\ \putwordon\ #1}% \defunargs{#3}% \endgroup } % @deftypeop CATEGORY CLASS TYPE OPERATION ARG... % \def\deftypeop #1 {\def\deftypeopcategory{#1}% \deftypeopparsebody\Edeftypeop\deftypeopx\deftypeopheader \deftypeopcategory} % % #1 is the class name, #2 the data type, #3 the operation name, #4 the args. \def\deftypeopheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$.$#3} {\deftypeopcategory\ \putwordon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypemethod CLASS TYPE METHOD ARG... % \def\deftypemethod{% \deftypemethparsebody\Edeftypemethod\deftypemethodx\deftypemethodheader} % % #1 is the class name, #2 the data type, #3 the method name, #4 the args. \def\deftypemethodheader#1#2#3#4{% \dosubind{fn}{\code{#3}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{\defheaderxcond#2\relax$.$#3}{\putwordMethodon\ \code{#1}}% \deftypefunargs{#4}% \endgroup } % @deftypeivar CLASS TYPE VARNAME % \def\deftypeivar{% \deftypemethparsebody\Edeftypeivar\deftypeivarx\deftypeivarheader} % % #1 is the class name, #2 the data type, #3 the variable name. \def\deftypeivarheader#1#2#3{% \dosubind{vr}{\code{#3}}{\putwordof\ \code{#1}}% entry in variable index \begingroup \defname{\defheaderxcond#2\relax$.$#3} {\putwordInstanceVariableof\ \code{#1}}% \defvarargs{#3}% \endgroup } % @defmethod == @defop Method % \def\defmethod{\defmethparsebody\Edefmethod\defmethodx\defmethodheader} % % #1 is the class name, #2 the method name, #3 the args. \def\defmethodheader#1#2#3{% \dosubind{fn}{\code{#2}}{\putwordon\ \code{#1}}% entry in function index \begingroup \defname{#2}{\putwordMethodon\ \code{#1}}% \defunargs{#3}% \endgroup } % @defcv {Class Option} foo-class foo-flag \def\defcv #1 {\def\defcvtype{#1}% \defopvarparsebody\Edefcv\defcvx\defcvarheader\defcvtype} \def\defcvarheader #1#2#3{% \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% variable index entry \begingroup \defname{#2}{\defcvtype\ \putwordof\ #1}% \defvarargs{#3}% \endgroup } % @defivar CLASS VARNAME == @defcv {Instance Variable} CLASS VARNAME % \def\defivar{\defvrparsebody\Edefivar\defivarx\defivarheader} % \def\defivarheader#1#2#3{% \dosubind{vr}{\code{#2}}{\putwordof\ \code{#1}}% entry in var index \begingroup \defname{#2}{\putwordInstanceVariableof\ #1}% \defvarargs{#3}% \endgroup } % @defvar % First, define the processing that is wanted for arguments of @defvar. % This is actually simple: just print them in roman. % This must expand the args and terminate the paragraph they make up \def\defvarargs #1{\normalparens #1% \defargscommonending } % @defvr Counter foo-count \def\defvr{\defvrparsebody\Edefvr\defvrx\defvrheader} \def\defvrheader #1#2#3{\doind {vr}{\code{#2}}% \begingroup\defname {#2}{#1}\defvarargs{#3}\endgroup} % @defvar == @defvr Variable \def\defvar{\defvarparsebody\Edefvar\defvarx\defvarheader} \def\defvarheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefvar}% \defvarargs {#2}\endgroup % } % @defopt == @defvr {User Option} \def\defopt{\defvarparsebody\Edefopt\defoptx\defoptheader} \def\defoptheader #1#2{\doind {vr}{\code{#1}}% Make entry in var index \begingroup\defname {#1}{\putwordDefopt}% \defvarargs {#2}\endgroup % } % @deftypevar int foobar \def\deftypevar{\defvarparsebody\Edeftypevar\deftypevarx\deftypevarheader} % #1 is the data type. #2 is the name, perhaps followed by text that % is actually part of the data type, which should not be put into the index. \def\deftypevarheader #1#2{% \dovarind#2 \relax% Make entry in variables index \begingroup\defname {\defheaderxcond#1\relax$.$#2}{\putwordDeftypevar}% \defargscommonending \endgroup} \def\dovarind#1 #2\relax{\doind{vr}{\code{#1}}} % @deftypevr {Global Flag} int enable \def\deftypevr{\defvrparsebody\Edeftypevr\deftypevrx\deftypevrheader} \def\deftypevrheader #1#2#3{\dovarind#3 \relax% \begingroup\defname {\defheaderxcond#2\relax$.$#3}{#1} \defargscommonending \endgroup} % Now define @deftp % Args are printed in bold, a slight difference from @defvar. \def\deftpargs #1{\bf \defvarargs{#1}} % @deftp Class window height width ... \def\deftp{\deftpparsebody\Edeftp\deftpx\deftpheader} \def\deftpheader #1#2#3{\doind {tp}{\code{#2}}% \begingroup\defname {#2}{#1}\deftpargs{#3}\endgroup} % These definitions are used if you use @defunx (etc.) % anywhere other than immediately after a @defun or @defunx. % \def\defcvx#1 {\errmessage{@defcvx in invalid context}} \def\deffnx#1 {\errmessage{@deffnx in invalid context}} \def\defivarx#1 {\errmessage{@defivarx in invalid context}} \def\defmacx#1 {\errmessage{@defmacx in invalid context}} \def\defmethodx#1 {\errmessage{@defmethodx in invalid context}} \def\defoptx #1 {\errmessage{@defoptx in invalid context}} \def\defopx#1 {\errmessage{@defopx in invalid context}} \def\defspecx#1 {\errmessage{@defspecx in invalid context}} \def\deftpx#1 {\errmessage{@deftpx in invalid context}} \def\deftypefnx#1 {\errmessage{@deftypefnx in invalid context}} \def\deftypefunx#1 {\errmessage{@deftypefunx in invalid context}} \def\deftypeivarx#1 {\errmessage{@deftypeivarx in invalid context}} \def\deftypemethodx#1 {\errmessage{@deftypemethodx in invalid context}} \def\deftypeopx#1 {\errmessage{@deftypeopx in invalid context}} \def\deftypevarx#1 {\errmessage{@deftypevarx in invalid context}} \def\deftypevrx#1 {\errmessage{@deftypevrx in invalid context}} \def\defunx#1 {\errmessage{@defunx in invalid context}} \def\defvarx#1 {\errmessage{@defvarx in invalid context}} \def\defvrx#1 {\errmessage{@defvrx in invalid context}} \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\undefined \newwrite\macscribble \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ % Append \endinput to make sure that TeX does not see the ending newline. \toks0={#1\endinput}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \let\xeatspaces\eatspaces \input \jobname.tmp \endgroup } \else \def\scanmacro#1{% \begingroup \newlinechar`\^^M % Undo catcode changes of \startcontents and \doprintindex \catcode`\@=0 \catcode`\\=\other \escapechar=`\@ \let\xeatspaces\eatspaces\scantokens{#1\endinput}\endgroup} \fi \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? \def\macrolist{} % List of all defined macros in the form % \do\macro1\do\macro2... % Utility routines. % Thisdoes \let #1 = #2, except with \csnames. \def\cslet#1#2{% \expandafter\expandafter \expandafter\let \expandafter\expandafter \csname#1\endcsname \csname#2\endcsname} % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \. % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. \def\macrobodyctxt{% \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\{=\other \catcode`\}=\other \catcode`\@=\other \catcode`\^^M=\other \usembodybackslash} \def\macroargctxt{% \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\@=\other \catcode`\\=\other} % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0% \else \expandafter\parsemargdef \argl;% \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% % Add the macroname to \macrolist \toks0 = \expandafter{\macrolist\do}% \xdef\macrolist{\the\toks0 \expandafter\noexpand\csname\the\macname\endcsname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \def\unmacro{\parsearg\dounmacro} \def\dounmacro#1{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\do\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx#1\relax % remove this \else \noexpand\do \noexpand #1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname #1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.blah for each blah % in the params list, to be ##N where N is the position in that list. % That gets used by \mbodybackslash (above). % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. \def\parsemargdef#1;{\paramno=0\def\paramlist{}% \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,} \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1% \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% % This defines the macro itself. There are six cases: recursive and % nonrecursive macros of zero, one, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % many \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \fi \fi} \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg) \def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \next} % We mant to disable all macros during \shipout so that they are not % expanded by \write. \def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}% \edef\next{\macrolist}\expandafter\endgroup\next} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Just make them active and then expand them all to nothing. \def\alias{\begingroup\obeyspaces\parsearg\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{\ignoreactivespaces \edef\next{\global\let\expandafter\noexpand\csname#1\endcsname=% \expandafter\noexpand\csname#2\endcsname}% \expandafter\endgroup\next} \message{cross references,} % @xref etc. \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's job is to define \lastnode. \def\node{\ENVcheck\parsearg\nodezzz} \def\nodezzz#1{\nodexxx #1,\finishnodeparse} \def\nodexxx#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\relax % The sectioning commands (@chapter, etc.) call these. \def\donoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}% {Ysectionnumberandtype}% \global\let\lastnode=\relax \fi } \def\unnumbnoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}{Ynothing}% \global\let\lastnode=\relax \fi } \def\appendixnoderef{% \ifx\lastnode\relax\else \expandafter\expandafter\expandafter\setref{\lastnode}% {Yappendixletterandtype}% \global\let\lastnode=\relax \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister \gdef\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \gdef\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \gdef\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), namely NAME-title (the corresponding @chapter/etc. name), % NAME-pg (the page number), and NAME-snt (section number and type). % Called from \foonoderef. % % We have to set \indexdummies so commands such as @code in a section % title aren't expanded. It would be nicer not to expand the titles in % the first place, but there's so many layers that that is hard to do. % % Likewise, use \turnoffactive so that punctuation chars such as underscore % and backslash work in node names. % \def\setref#1#2{{% \atdummies \pdfmkdest{#1}% % \turnoffactive \dosetq{#1-title}{Ytitle}% \dosetq{#1-pg}{Ypagenumber}% \dosetq{#1-snt}{#2}% }} % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces \def\printedmanual{\ignorespaces #5}% \def\printednodename{\ignorespaces #3}% \setbox1=\hbox{\printedmanual}% \setbox0=\hbox{\printednodename}% \ifdim \wd0 = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax % Use the node name inside the square brackets. \def\printednodename{\ignorespaces #1}% \else % Use the actual chapter/section title appear inside % the square brackets. Use the real section title if we have it. \ifdim \wd1 > 0pt % It is in another manual, so we don't have it. \def\printednodename{\ignorespaces #1}% \else \ifhavexrefs % We know the real title if we have the xref values. \def\printednodename{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printednodename{\ignorespaces #1}% \fi% \fi \fi \fi % % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not % insert empty discretionaries after hyphens, which means that it will % not find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, this % is a loss. Therefore, we give the text of the node name again, so it % is as if TeX is seeing it for the first time. \ifpdf \leavevmode \getfilename{#4}% {\turnoffactive \otherbackslash \ifnum\filenamelength>0 \startlink attr{/Border [0 0 0]}% goto file{\the\filename.pdf} name{#1}% \else \startlink attr{/Border [0 0 0]}% goto name{#1}% \fi }% \linkcolor \fi % \ifdim \wd1 > 0pt \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}% \else % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive \otherbackslash % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via a macro. \xrefprintnodename\printednodename % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}% \fi \endlink \endgroup} % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since not square brackets don't work in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % \dosetq is called from \setref to do the actual \write (\iflinks). % \def\dosetq#1#2{% {\let\folio=0% \edef\next{\write\auxfile{\internalsetq{#1}{#2}}}% \iflinks \next \fi }% } % \internalsetq{foo}{page} expands into % CHARACTERS @xrdef{foo}{...expansion of \page...} \def\internalsetq#1#2{@xrdef{#1}{\csname #2\endcsname}} % Things to be expanded by \internalsetq. % \def\Ypagenumber{\folio} \def\Ytitle{\thissection} \def\Ynothing{} \def\Ysectionnumberandtype{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendixletterandtype{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{\the\inputlineno:\space} \fi % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname X#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs \message{\linenumber Undefined cross reference `#1'.}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. % \def\xrdef#1{\expandafter\gdef\csname X#1\endcsname} % Read the last existing aux file, if any. No error if none exists. \def\readauxfile{\begingroup \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % Make the characters 128-255 be printing characters {% \count 1=128 \def\loop{% \catcode\count 1=\other \advance\count 1 by 1 \ifnum \count 1<256 \loop \fi }% }% % % Turn off \ as an escape so we do not lose on % entries which were dumped with control sequences in their names. % For example, @xrdef{$\leq $-fun}{page ...} made by @defun ^^ % Reference to such entries still does not work the way one would wish, % but at least they do not bomb out when the aux file is read in. \catcode`\\=\other % % @ is our escape character in .aux files. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 % \openin 1 \jobname.aux \ifeof 1 \else \closein 1 \input \jobname.aux \global\havexrefstrue \fi % Open the new aux file. TeX will close it automatically at exit. \openout\auxfile=\jobname.aux \endgroup} % Footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for info output only. \let\footnotestyle=\comment \let\ptexfootnote=\footnote {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset and anything else that uses % \parseargline fail inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % % The start of the footnote looks usually like this: \gdef\startfootins{\insert\footins\bgroup} % % ... but this macro is redefined inside @multitable. % \gdef\dofootnote{% \startfootins % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut \futurelet\next\fo@t } }%end \catcode `\@=11 % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt} % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else \closein 1 % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\undefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing this stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \nobreak\bigskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \line\bgroup\hss \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \hss \egroup \bigbreak \fi % space after the image \endgroup} \message{localization,} % and i18n. % @documentlanguage is usually given very early, just after % @setfilename. If done too late, it may not override everything % properly. Single argument is the language abbreviation. % It would be nice if we could set up a hyphenation file here. % \def\documentlanguage{\parsearg\dodocumentlanguage} \def\dodocumentlanguage#1{% \tex % read txi-??.tex file in plain TeX. % Read the file if it exists. \openin 1 txi-#1.tex \ifeof1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \let\temp = \relax \else \def\temp{\input txi-#1.tex }% \fi \temp \endgroup } \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? In the current directory should work if nowhere else does.} % @documentencoding should change something in TeX eventually, most % likely, but for now just recognize it. \let\documentencoding = \comment % Page size parameters. % \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be so finicky about underfull hboxes, either. \hbadness = 2000 % Following George Bush, just get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; 3) voffset; % 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8) % physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{46\baselineskip}{6in}% {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.5 (or so) format. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {\voffset}{.25in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{51\baselineskip}{160mm} {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \def\pagesizes{\parsearg\pagesizesxxx} \def\pagesizesxxx#1{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1 \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \catcode`\~=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\+=\other \catcode`\$=\other \def\normaldoublequote{"} \def\normaltilde{~} \def\normalcaret{^} \def\normalunderscore{_} \def\normalverticalbar{|} \def\normalless{<} \def\normalgreater{>} \def\normalplus{+} \def\normaldollar{$}%$ font-lock fix % This macro is used to make a character print one way in ttfont % where it can probably just be output, and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % Set up an active definition for =, but don't enable it most of the time. {\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 outputs one backslash character in current font, % as in \char`\\. \global\chardef\rawbackslashxx=`\\ % \rawbackslash defines an active \ to do \rawbackslashxx. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. {\catcode`\\=\active @gdef@rawbackslash{@let\=@rawbackslashxx} @gdef@otherbackslash{@let\=@realbackslash} } % \realbackslash is an actual character `\' with catcode other. {\catcode`\\=\other @gdef@realbackslash{\}} % \normalbackslash outputs one backslash in fixed width font. \def\normalbackslash{{\tt\rawbackslashxx}} \catcode`\\=\active % Used sometimes to turn off (effectively) the active characters % even after parsing them. @def@turnoffactive{% @let"=@normaldoublequote @let\=@realbackslash @let~=@normaltilde @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let<=@normalless @let>=@normalgreater @let+=@normalplus @let$=@normaldollar %$ font-lock fix } % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. (Thus, \ is not expandable when this is in % effect.) % @def@normalturnoffactive{@turnoffactive @let\=@normalbackslash} % 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. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % 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 @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These look ok in all fonts, so just make them not special. @catcode`@& = @other @catcode`@# = @other @catcode`@% = @other @c Set initial fonts. @textfonts @rm @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: autoconf2.59-2.59+dfsg/config/mdate-sh0000755000175000017500000001013007752405544016744 0ustar taffittaffit#!/bin/sh # Get modification time of a file or directory and pretty-print it. # Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME save_arg1="$1" # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set - x`$ls_command /` # Find which argument is the month. month= command= until test $month do shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done # Get the extended ls output of the file or directory. set - x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Get the month. Next argument is day, followed by the year or time. case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac day=$2 # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year autoconf2.59-2.59+dfsg/config/m4.m40000644000175000017500000000212607663135107016100 0ustar taffittaffit# Copyright 2000 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # AC_PROG_GNU_M4 # -------------- # Check for GNU m4, at least 1.3 (supports frozen files). AC_DEFUN([AC_PROG_GNU_M4], [AC_PATH_PROGS(M4, gm4 gnum4 m4, m4) AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4, [ac_cv_prog_gnu_m4=no if test x"$M4" != x; then case `$M4 --help < /dev/null 2>&1` in *reload-state*) ac_cv_prog_gnu_m4=yes ;; esac fi])]) autoconf2.59-2.59+dfsg/config/elisp-comp0000755000175000017500000000405607752405545017325 0ustar taffittaffit#!/bin/sh # Copyright (C) 1995, 2000, 2003 Free Software Foundation, Inc. # Franc,ois Pinard , 1995. # # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This script byte-compiles all `.el' files which are part of its # arguments, using GNU Emacs, and put the resulting `.elc' files into # the current directory, so disregarding the original directories used # in `.el' arguments. # # This script manages in such a way that all Emacs LISP files to # be compiled are made visible between themselves, in the event # they require or load-library one another. if test $# = 0; then echo 1>&2 "No files given to $0" exit 1 fi if test -z "$EMACS" || test "$EMACS" = "t"; then # Value of "t" means we are running in a shell under Emacs. # Just assume Emacs is called "emacs". EMACS=emacs fi tempdir=elc.$$ # Cleanup the temporary directory on exit. trap 'status=$?; rm -rf "$tempdir" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 mkdir $tempdir cp "$@" $tempdir ( cd $tempdir echo "(setq load-path (cons nil load-path))" > script $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $? mv *.elc .. ) || exit $? (exit 0); exit autoconf2.59-2.59+dfsg/config/install-sh0000755000175000017500000002017407752405543017330 0ustar taffittaffit#!/bin/sh # install - install a program, script, or datafile scriptversion=2003-09-24.23 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename= transform_arg= instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= usage="Usage: $0 [OPTION]... SRCFILE DSTFILE or: $0 -d DIR1 DIR2... In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. In the second, create the directory path DIR. Options: -b=TRANSFORMBASENAME -c copy source (using $cpprog) instead of moving (using $mvprog). -d create directories instead of installing files. -g GROUP $chgrp installed files to GROUP. -m MODE $chmod installed files to MODE. -o USER $chown installed files to USER. -s strip installed files (using $stripprog). -t=TRANSFORM --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit 0;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; --version) echo "$0 $scriptversion"; exit 0;; *) if test -z "$src"; then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if test -z "$src"; then echo "$0: no input file specified." >&2 exit 1 fi # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then instcmd=: chmodcmd= else instcmd=$mkdirprog fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst"; then echo "$0: no destination specified." >&2 exit 1 fi # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift test -d "$pathcomp" || $mkdirprog "$pathcomp" pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $instcmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else # If we're going to rename the final executable, determine the name now. if test -z "$transformarg"; then dstfile=`basename "$dst"` else dstfile=`basename "$dst" $transformbasename \ | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename. test -z "$dstfile" && dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now remove or move aside any old file at destination location. We # try this two ways since rm can't unlink itself on some systems and # the destination file might be busy for other reasons. In this case, # the final cleanup might fail but the new file should still install # successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: autoconf2.59-2.59+dfsg/config/config.sub0000755000175000017500000007340612067673013017307 0ustar taffittaffit#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-08-18' # 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. # # 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 # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-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/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # 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[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: autoconf2.59-2.59+dfsg/INSTALL0000644000175000017500000002203007752405543015101 0ustar taffittaffitCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the 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 ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== 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 support 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 ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. autoconf2.59-2.59+dfsg/lib/0000755000175000017500000000000007752722361014621 5ustar taffittaffitautoconf2.59-2.59+dfsg/lib/Makefile.am0000644000175000017500000000347507676322662016673 0ustar taffittaffit## Process this file with automake to create Makefile.in ## Copyright 2002 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. SUBDIRS = Autom4te m4sugar autoconf autotest autoscan emacs nodist_pkgdata_DATA = autom4te.cfg EXTRA_DIST = autom4te.in freeze.mk edit = sed \ -e 's,@SHELL\@,$(SHELL),g' \ -e 's,@PERL\@,$(PERL),g' \ -e 's,@bindir\@,$(bindir),g' \ -e 's,@datadir\@,$(pkgdatadir),g' \ -e 's,@prefix\@,$(prefix),g' \ -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \ -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \ -e 's,@autom4te-name\@,'`echo autom4te | sed '$(transform)'`',g' \ -e 's,@M4\@,$(M4),g' \ -e 's,@AWK\@,$(AWK),g' \ -e 's,@VERSION\@,$(VERSION),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' # All the files below depend on Makefile so that they are rebuilt # when the prefix, etc. changes. Unfortunately, suffix rules # cannot have additional dependencies, so we have to use explicit rules. CLEANFILES = autom4te.cfg autom4te.cfg: $(srcdir)/autom4te.in Makefile rm -f autom4te.cfg autom4te.tmp $(edit) $(srcdir)/autom4te.in >autom4te.tmp chmod -w autom4te.tmp mv autom4te.tmp autom4te.cfg autoconf2.59-2.59+dfsg/lib/autoconf/0000755000175000017500000000000007752722361016437 5ustar taffittaffitautoconf2.59-2.59+dfsg/lib/autoconf/autotest.m40000644000175000017500000000751707663163337020566 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Interface with Autotest. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, # 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # AC_CONFIG_TESTDIR(TEST-DIRECTORY, [AUTOTEST-PATH = TEST-DIRECTORY]) # ------------------------------------------------------------------- # Configure an Autotest test suite directory. Invoke it once per dir, # even if there are several test suites in there. # # AUTOTEST-PATH must help the test suite to find the executables. # It is relative to the top level of the package, and is expanded # into all the build dirs of AUTOTEST-PATH, then all the src dirs. # # Do not use _ACEOF as we are being dumped into config.status via # an _ACEOF-heredoc. AC_DEFUN([AC_CONFIG_TESTDIR], [AC_CONFIG_COMMANDS([$1/atconfig], [cat >$1/atconfig < addr) ? 1 : -1; } int main () { exit (find_stack_direction () < 0); }])], [ac_cv_c_stack_direction=1], [ac_cv_c_stack_direction=-1], [ac_cv_c_stack_direction=0])]) AH_VERBATIM([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ @%:@undef STACK_DIRECTION])dnl AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) ])# _AC_LIBOBJ_ALLOCA # AC_FUNC_ALLOCA # -------------- AN_FUNCTION([alloca], [AC_FUNC_ALLOCA]) AN_HEADER([alloca.h], [AC_FUNC_ALLOCA]) AC_DEFUN([AC_FUNC_ALLOCA], [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h, [AC_LINK_IFELSE( [AC_LANG_PROGRAM([[@%:@include ]], [[char *p = (char *) alloca (2 * sizeof (int));]])], [ac_cv_working_alloca_h=yes], [ac_cv_working_alloca_h=no])]) if test $ac_cv_working_alloca_h = yes; then AC_DEFINE(HAVE_ALLOCA_H, 1, [Define to 1 if you have and it should be used (not on Ultrix).]) fi AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, [AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif ]], [[char *p = (char *) alloca (1);]])], [ac_cv_func_alloca_works=yes], [ac_cv_func_alloca_works=no])]) if test $ac_cv_func_alloca_works = yes; then AC_DEFINE(HAVE_ALLOCA, 1, [Define to 1 if you have `alloca', as a function or macro.]) else _AC_LIBOBJ_ALLOCA fi ])# AC_FUNC_ALLOCA # AU::AC_ALLOCA # ------------- AU_ALIAS([AC_ALLOCA], [AC_FUNC_ALLOCA]) # AC_FUNC_CHOWN # ------------- # Determine whether chown accepts arguments of -1 for uid and gid. AN_FUNCTION([chown], [AC_FUNC_CHOWN]) AC_DEFUN([AC_FUNC_CHOWN], [AC_REQUIRE([AC_TYPE_UID_T])dnl AC_CHECK_HEADERS(unistd.h) AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works, [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT #include ], [[ char *f = "conftest.chown"; struct stat before, after; if (creat (f, 0600) < 0) exit (1); if (stat (f, &before) < 0) exit (1); if (chown (f, (uid_t) -1, (gid_t) -1) == -1) exit (1); if (stat (f, &after) < 0) exit (1); exit ((before.st_uid == after.st_uid && before.st_gid == after.st_gid) ? 0 : 1); ]])], [ac_cv_func_chown_works=yes], [ac_cv_func_chown_works=no], [ac_cv_func_chown_works=no]) rm -f conftest.chown ]) if test $ac_cv_func_chown_works = yes; then AC_DEFINE(HAVE_CHOWN, 1, [Define to 1 if your system has a working `chown' function.]) fi ])# AC_FUNC_CHOWN # AC_FUNC_CLOSEDIR_VOID # --------------------- # Check whether closedir returns void, and #define CLOSEDIR_VOID in # that case. AN_FUNCTION([closedir], [AC_FUNC_CLOSEDIR_VOID]) AC_DEFUN([AC_FUNC_CLOSEDIR_VOID], [AC_REQUIRE([AC_HEADER_DIRENT])dnl AC_CACHE_CHECK([whether closedir returns void], [ac_cv_func_closedir_void], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif ], [[exit (closedir (opendir (".")) != 0);]])], [ac_cv_func_closedir_void=no], [ac_cv_func_closedir_void=yes], [ac_cv_func_closedir_void=yes])]) if test $ac_cv_func_closedir_void = yes; then AC_DEFINE(CLOSEDIR_VOID, 1, [Define to 1 if the `closedir' function returns void instead of `int'.]) fi ]) # AC_FUNC_ERROR_AT_LINE # --------------------- AN_FUNCTION([error], [AC_FUNC_ERROR_AT_LINE]) AN_FUNCTION([error_at_line], [AC_FUNC_ERROR_AT_LINE]) AC_DEFUN([AC_FUNC_ERROR_AT_LINE], [AC_LIBSOURCES([error.h, error.c])dnl AC_CACHE_CHECK([for error_at_line], ac_cv_lib_error_at_line, [AC_LINK_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [error_at_line (0, 0, "", 0, "");])], [ac_cv_lib_error_at_line=yes], [ac_cv_lib_error_at_line=no])]) if test $ac_cv_lib_error_at_line = no; then AC_LIBOBJ(error) fi ]) # AU::AM_FUNC_ERROR_AT_LINE # ------------------------- AU_ALIAS([AM_FUNC_ERROR_AT_LINE], [AC_FUNC_ERROR_AT_LINE]) # _AC_FUNC_FNMATCH_IF(STANDARD = GNU | POSIX, CACHE_VAR, IF-TRUE, IF-FALSE) # ------------------------------------------------------------------------- # If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise # IF-FALSE. Use CACHE_VAR. AC_DEFUN([_AC_FUNC_FNMATCH_IF], [AC_CACHE_CHECK( [for working $1 fnmatch], [$2], [# Some versions of Solaris, SCO, and the GNU C Library # have a broken or incompatible fnmatch. # So we run a test program. If we are cross-compiling, take no chance. # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [#include # define y(a, b, c) (fnmatch (a, b, c) == 0) # define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) ], [exit (!(y ("a*", "abc", 0) && n ("d*/*1", "d/s/1", FNM_PATHNAME) && y ("a\\\\bc", "abc", 0) && n ("a\\\\bc", "abc", FNM_NOESCAPE) && y ("*x", ".x", 0) && n ("*x", ".x", FNM_PERIOD) && m4_if([$1], [GNU], [y ("xxXX", "xXxX", FNM_CASEFOLD) && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH) && n ("d*/*1", "d/s/1", FNM_FILE_NAME) && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)], 1)));])], [$2=yes], [$2=no], [$2=cross])]) AS_IF([test $$2 = yes], [$3], [$4]) ])# _AC_FUNC_FNMATCH_IF # AC_FUNC_FNMATCH # --------------- AC_DEFUN([AC_FUNC_FNMATCH], [_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works], [AC_DEFINE([HAVE_FNMATCH], 1, [Define to 1 if your system has a working POSIX `fnmatch' function.])]) ])# AC_FUNC_FNMATCH # _AC_LIBOBJ_FNMATCH # ------------------ # Prepare the replacement of fnmatch. AC_DEFUN([_AC_LIBOBJ_FNMATCH], [AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl AC_CHECK_DECLS([getenv]) AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmempcpy]) AC_CHECK_HEADERS([wchar.h wctype.h]) AC_LIBOBJ([fnmatch]) AC_CONFIG_LINKS([$ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h]) AC_DEFINE(fnmatch, rpl_fnmatch, [Define to rpl_fnmatch if the replacement function should be used.]) ])# _AC_LIBOBJ_FNMATCH # AC_REPLACE_FNMATCH # ------------------ AN_FUNCTION([fnmatch], [AC_REPLACE_FNMATCH]) AC_DEFUN([AC_REPLACE_FNMATCH], [_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works], [rm -f $ac_config_libobj_dir/fnmatch.h], [_AC_LIBOBJ_FNMATCH]) ])# AC_REPLACE_FNMATCH # AC_FUNC_FNMATCH_GNU # ------------------- AC_DEFUN([AC_FUNC_FNMATCH_GNU], [AC_REQUIRE([AC_GNU_SOURCE]) _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu], [rm -f $ac_config_libobj_dir/fnmatch.h], [_AC_LIBOBJ_FNMATCH]) ])# AC_FUNC_FNMATCH_GNU # AU::AM_FUNC_FNMATCH # AU::fp_FUNC_FNMATCH # ------------------- AU_ALIAS([AM_FUNC_FNMATCH], [AC_FUNC_FNMATCH]) AU_ALIAS([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH]) # AC_FUNC_FSEEKO # -------------- AN_FUNCTION([ftello], [AC_FUNC_FSEEKO]) AN_FUNCTION([fseeko], [AC_FUNC_FSEEKO]) AC_DEFUN([AC_FUNC_FSEEKO], [_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, [ac_cv_sys_largefile_source], [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).], [@%:@include ], [return !fseeko;]) # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. AC_CACHE_CHECK([for fseeko], [ac_cv_func_fseeko], [AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include ], [[return fseeko && fseeko (stdin, 0, 0);]])], [ac_cv_func_fseeko=yes], [ac_cv_func_fseeko=no])]) if test $ac_cv_func_fseeko = yes; then AC_DEFINE(HAVE_FSEEKO, 1, [Define to 1 if fseeko (and presumably ftello) exists and is declared.]) fi ])# AC_FUNC_FSEEKO # AC_FUNC_GETGROUPS # ----------------- # Try to find `getgroups', and check that it works. # When cross-compiling, assume getgroups is broken. AN_FUNCTION([getgroups], [AC_FUNC_GETGROUPS]) AC_DEFUN([AC_FUNC_GETGROUPS], [AC_REQUIRE([AC_TYPE_GETGROUPS])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_CHECK_FUNC(getgroups) # If we don't yet have getgroups, see if it's in -lbsd. # This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. ac_save_LIBS=$LIBS if test $ac_cv_func_getgroups = no; then AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd]) fi # Run the program to test the functionality of the system-supplied # getgroups function only if there is such a function. if test $ac_cv_func_getgroups = yes; then AC_CACHE_CHECK([for working getgroups], ac_cv_func_getgroups_works, [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ exit (getgroups (0, 0) == -1 ? 1 : 0);]])], [ac_cv_func_getgroups_works=yes], [ac_cv_func_getgroups_works=no], [ac_cv_func_getgroups_works=no]) ]) if test $ac_cv_func_getgroups_works = yes; then AC_DEFINE(HAVE_GETGROUPS, 1, [Define to 1 if your system has a working `getgroups' function.]) fi fi LIBS=$ac_save_LIBS ])# AC_FUNC_GETGROUPS # _AC_LIBOBJ_GETLOADAVG # --------------------- # Set up the AC_LIBOBJ replacement of `getloadavg'. m4_define([_AC_LIBOBJ_GETLOADAVG], [AC_LIBOBJ(getloadavg) AC_DEFINE(C_GETLOADAVG, 1, [Define to 1 if using `getloadavg.c'.]) # 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, 1, [Define to 1 for DGUX with .]) AC_CHECK_LIB(dgc, dg_sys_info)]) AC_CHECK_HEADER(locale.h) AC_CHECK_FUNCS(setlocale) # We cannot check for , because Solaris 2 does not use dwarf (it # uses stabs), but it is still SVR4. We cannot check for because # Irix 4.0.5F has the header but not the library. if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then ac_have_func=yes AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.]) fi if test $ac_have_func = no; then AC_CHECK_HEADER(inq_stats/cpustats.h, [ac_have_func=yes AC_DEFINE(UMAX, 1, [Define to 1 for Encore UMAX.]) AC_DEFINE(UMAX4_3, 1, [Define to 1 for Encore UMAX 4.3 that has instead of .])]) 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 AC_CHECK_HEADERS(nlist.h, [AC_CHECK_MEMBERS([struct nlist.n_un.n_name], [AC_DEFINE(NLIST_NAME_UNION, 1, [Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend on `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [], [@%:@include ]) ])dnl ])# _AC_LIBOBJ_GETLOADAVG # AC_FUNC_GETLOADAVG # ------------------ AN_FUNCTION([getloadavg], [AC_FUNC_GETLOADAVG]) AC_DEFUN([AC_FUNC_GETLOADAVG], [ac_have_func=no # yes means we've found a way to get the load average. # Make sure getloadavg.c is where it belongs, at configure-time. test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || AC_MSG_ERROR([$srcdir/$ac_config_libobj_dir/getloadavg.c is missing]) ac_save_LIBS=$LIBS # Check for getloadavg, but be sure not to touch the cache variable. (AC_CHECK_FUNC(getloadavg, exit 0, exit 1)) && ac_have_func=yes # On HPUX9, an unprivileged user can get load averages through this function. AC_CHECK_FUNCS(pstat_getdynamic) # Solaris has libkstat which does not require root. AC_CHECK_LIB(kstat, kstat_open) test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes # Some systems with -lutil have (and need) -lkvm as well, some do not. # On Solaris, -lkvm requires nlist from -lelf, so check that first # to get the right answer into the cache. # For kstat on solaris, we need libelf to force the definition of SVR4 below. if test $ac_have_func = no; then AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") fi if test $ac_have_func = no; then 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]) fi 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_getloadavg_LIBS=$LIBS LIBS="-L/usr/local/lib $LIBS" AC_CHECK_LIB(getloadavg, getloadavg, [LIBS="-lgetloadavg $LIBS"], [LIBS=$ac_getloadavg_LIBS]) fi # Make sure it is really in the library, if we think we found it, # otherwise set up the replacement function. AC_CHECK_FUNCS(getloadavg, [], [_AC_LIBOBJ_GETLOADAVG]) # Some definitions of getloadavg require that the program be installed setgid. AC_CACHE_CHECK(whether getloadavg requires setgid, ac_cv_func_getloadavg_setgid, [AC_EGREP_CPP([Yowza Am I SETGID yet], [#include "$srcdir/$ac_config_libobj_dir/getloadavg.c" #ifdef LDAV_PRIVILEGED Yowza Am I SETGID yet @%:@endif], ac_cv_func_getloadavg_setgid=yes, ac_cv_func_getloadavg_setgid=no)]) if test $ac_cv_func_getloadavg_setgid = yes; then NEED_SETGID=true AC_DEFINE(GETLOADAVG_PRIVILEGED, 1, [Define to 1 if the `getloadavg' function needs to be run setuid or setgid.]) else NEED_SETGID=false fi AC_SUBST(NEED_SETGID)dnl if test $ac_cv_func_getloadavg_setgid = yes; then AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem, [ # On Solaris, /dev/kmem is a symlink. Get info on the real file. ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` # If we got an error (system does not support symlinks), try without -L. test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` ac_cv_group_kmem=`echo $ac_ls_output \ | sed -ne ['s/[ ][ ]*/ /g; s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; / /s/.* //;p;']` ]) AC_SUBST(KMEM_GROUP, $ac_cv_group_kmem)dnl fi if test "x$ac_save_LIBS" = x; then GETLOADAVG_LIBS=$LIBS else GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"` fi LIBS=$ac_save_LIBS AC_SUBST(GETLOADAVG_LIBS)dnl ])# AC_FUNC_GETLOADAVG # AU::AC_GETLOADAVG # ----------------- AU_ALIAS([AC_GETLOADAVG], [AC_FUNC_GETLOADAVG]) # AC_FUNC_GETMNTENT # ----------------- AN_FUNCTION([getmntent], [AC_FUNC_GETMNTENT]) AC_DEFUN([AC_FUNC_GETMNTENT], [# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS", [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS", [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])]) AC_CHECK_FUNCS(getmntent) ]) # AC_FUNC_GETPGRP # --------------- # Figure out whether getpgrp requires zero arguments. AN_FUNCTION([getpgrp], [AC_FUNC_GETPGRP]) AC_DEFUN([AC_FUNC_GETPGRP], [AC_CACHE_CHECK(whether getpgrp requires zero arguments, ac_cv_func_getpgrp_void, [# Use it with a single arg. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [getpgrp (0);])], [ac_cv_func_getpgrp_void=no], [ac_cv_func_getpgrp_void=yes]) ]) if test $ac_cv_func_getpgrp_void = yes; then AC_DEFINE(GETPGRP_VOID, 1, [Define to 1 if the `getpgrp' function requires zero arguments.]) fi ])# AC_FUNC_GETPGRP # AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK # ------------------------------------- # When cross-compiling, be pessimistic so we will end up using the # replacement version of lstat that checks for trailing slashes and # calls lstat a second time when necessary. AN_FUNCTION([lstat], [AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [AC_CACHE_CHECK( [whether lstat dereferences a symlink specified with a trailing slash], [ac_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ exit (lstat ("conftest.sym/", &sbuf) ? 0 : 1);])], [ac_cv_func_lstat_dereferences_slashed_symlink=yes], [ac_cv_func_lstat_dereferences_slashed_symlink=no], [ac_cv_func_lstat_dereferences_slashed_symlink=no]) else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file ]) test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, 1, [Define to 1 if `lstat' dereferences a symlink specified with a trailing slash.]) if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then AC_LIBOBJ(lstat) fi ]) # _AC_FUNC_MALLOC_IF(IF-WORKS, IF-NOT) # ------------------------------------ # If `malloc (0)' properly handled, run IF-WORKS, otherwise, IF-NOT. AC_DEFUN([_AC_FUNC_MALLOC_IF], [AC_REQUIRE([AC_HEADER_STDC])dnl AC_CHECK_HEADERS(stdlib.h) AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif ]], [exit (malloc (0) ? 0 : 1);])], [ac_cv_func_malloc_0_nonnull=yes], [ac_cv_func_malloc_0_nonnull=no], [ac_cv_func_malloc_0_nonnull=no])]) AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) ])# AC_FUNC_MALLOC # AC_FUNC_MALLOC # -------------- # Report whether `malloc (0)' properly handled, and replace malloc if # needed. AN_FUNCTION([malloc], [AC_FUNC_MALLOC]) AC_DEFUN([AC_FUNC_MALLOC], [_AC_FUNC_MALLOC_IF( [AC_DEFINE([HAVE_MALLOC], 1, [Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_MALLOC], 0) AC_LIBOBJ(malloc) AC_DEFINE([malloc], [rpl_malloc], [Define to rpl_malloc if the replacement function should be used.])]) ])# AC_FUNC_MALLOC # AC_FUNC_MBRTOWC # --------------- AN_FUNCTION([mbrtowc], [AC_FUNC_MBRTOWC]) AC_DEFUN([AC_FUNC_MBRTOWC], [ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], ac_cv_func_mbrtowc, [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[@%:@include ]], [[mbstate_t state; return ! (sizeof state && mbrtowc);]])], ac_cv_func_mbrtowc=yes, ac_cv_func_mbrtowc=no)]) if test $ac_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], 1, [Define to 1 if mbrtowc and mbstate_t are properly declared.]) fi ]) # AC_FUNC_MEMCMP # -------------- AN_FUNCTION([memcmp], [AC_FUNC_MEMCMP]) AC_DEFUN([AC_FUNC_MEMCMP], [AC_CACHE_CHECK([for working memcmp], ac_cv_func_memcmp_working, [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ /* Some versions of memcmp are not 8-bit clean. */ char c0 = 0x40, c1 = 0x80, c2 = 0x81; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) exit (1); /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) exit (1); } exit (0); } ]])], [ac_cv_func_memcmp_working=yes], [ac_cv_func_memcmp_working=no], [ac_cv_func_memcmp_working=no])]) test $ac_cv_func_memcmp_working = no && AC_LIBOBJ([memcmp]) ])# AC_FUNC_MEMCMP # AC_FUNC_MKTIME # -------------- AN_FUNCTION([mktime], [AC_FUNC_MKTIME]) AC_DEFUN([AC_FUNC_MKTIME], [AC_REQUIRE([AC_HEADER_TIME])dnl AC_CHECK_HEADERS(stdlib.h sys/time.h unistd.h) AC_CHECK_FUNCS(alarm) AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, [AC_RUN_IFELSE([AC_LANG_SOURCE( [[/* Test program from Paul Eggert and Tony Leneis. */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif #if HAVE_STDLIB_H # include #endif #if HAVE_UNISTD_H # include #endif #if !HAVE_ALARM # define alarm(X) /* empty */ #endif /* Work around redefinition to rpl_putenv by other config tests. */ #undef putenv static time_t time_t_max; static time_t time_t_min; /* Values we'll use to set the TZ environment variable. */ static char *tz_strings[] = { (char *) 0, "TZ=GMT0", "TZ=JST-9", "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" }; #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) /* Fail if mktime fails to convert a date in the spring-forward gap. Based on a problem report from Andreas Jaeger. */ static void spring_forward_gap () { /* glibc (up to about 1998-10-07) failed this test. */ struct tm tm; /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" instead of "TZ=America/Vancouver" in order to detect the bug even on systems that don't support the Olson extension, or don't have the full zoneinfo tables installed. */ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); tm.tm_year = 98; tm.tm_mon = 3; tm.tm_mday = 5; tm.tm_hour = 2; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; if (mktime (&tm) == (time_t)-1) exit (1); } static void mktime_test1 (now) time_t now; { struct tm *lt; if ((lt = localtime (&now)) && mktime (lt) != now) exit (1); } static void mktime_test (now) time_t now; { mktime_test1 (now); mktime_test1 ((time_t) (time_t_max - now)); mktime_test1 ((time_t) (time_t_min + now)); } static void irix_6_4_bug () { /* Based on code from Ariel Faigon. */ struct tm tm; tm.tm_year = 96; tm.tm_mon = 3; tm.tm_mday = 0; tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; mktime (&tm); if (tm.tm_mon != 2 || tm.tm_mday != 31) exit (1); } static void bigtime_test (j) int j; { struct tm tm; time_t now; tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; now = mktime (&tm); if (now != (time_t) -1) { struct tm *lt = localtime (&now); if (! (lt && lt->tm_year == tm.tm_year && lt->tm_mon == tm.tm_mon && lt->tm_mday == tm.tm_mday && lt->tm_hour == tm.tm_hour && lt->tm_min == tm.tm_min && lt->tm_sec == tm.tm_sec && lt->tm_yday == tm.tm_yday && lt->tm_wday == tm.tm_wday && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) exit (1); } } int main () { time_t t, delta; int i, j; /* This test makes some buggy mktime implementations loop. Give up after 60 seconds; a mktime slower than that isn't worth using anyway. */ alarm (60); for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) continue; time_t_max--; if ((time_t) -1 < 0) for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) continue; delta = time_t_max / 997; /* a suitable prime number */ for (i = 0; i < N_STRINGS; i++) { if (tz_strings[i]) putenv (tz_strings[i]); for (t = 0; t <= time_t_max - delta; t += delta) mktime_test (t); mktime_test ((time_t) 1); mktime_test ((time_t) (60 * 60)); mktime_test ((time_t) (60 * 60 * 24)); for (j = 1; 0 < j; j *= 2) bigtime_test (j); bigtime_test (j - 1); } irix_6_4_bug (); spring_forward_gap (); exit (0); }]])], [ac_cv_func_working_mktime=yes], [ac_cv_func_working_mktime=no], [ac_cv_func_working_mktime=no])]) if test $ac_cv_func_working_mktime = no; then AC_LIBOBJ([mktime]) fi ])# AC_FUNC_MKTIME # AU::AM_FUNC_MKTIME # ------------------ AU_ALIAS([AM_FUNC_MKTIME], [AC_FUNC_MKTIME]) # AC_FUNC_MMAP # ------------ AN_FUNCTION([mmap], [AC_FUNC_MMAP]) AC_DEFUN([AC_FUNC_MMAP], [AC_CHECK_HEADERS(stdlib.h unistd.h) AC_CHECK_FUNCS(getpagesize) AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, [AC_RUN_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT] [[/* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !STDC_HEADERS && !HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #if !HAVE_GETPAGESIZE /* Assume that all systems that can run configure have sys/param.h. */ # if !HAVE_SYS_PARAM_H # define HAVE_SYS_PARAM_H 1 # endif # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # if HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; int i, pagesize; int fd; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) exit (1); for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) exit (1); if (write (fd, data, pagesize) != pagesize) exit (1); close (fd); /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) exit (1); data2 = (char *) malloc (2 * pagesize); if (!data2) exit (1); data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1); if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) exit (1); /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) exit (1); if (read (fd, data3, pagesize) != pagesize) exit (1); for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) exit (1); close (fd); exit (0); }]])], [ac_cv_func_mmap_fixed_mapped=yes], [ac_cv_func_mmap_fixed_mapped=no], [ac_cv_func_mmap_fixed_mapped=no])]) if test $ac_cv_func_mmap_fixed_mapped = yes; then AC_DEFINE(HAVE_MMAP, 1, [Define to 1 if you have a working `mmap' system call.]) fi rm -f conftest.mmap ])# AC_FUNC_MMAP # AU::AC_MMAP # ----------- AU_ALIAS([AC_MMAP], [AC_FUNC_MMAP]) # AC_FUNC_OBSTACK # --------------- # Ensure obstack support. Yeah, this is not exactly a `FUNC' check. AN_FUNCTION([obstack_init], [AC_FUNC_OBSTACK]) AN_IDENTIFIER([obstack], [AC_FUNC_OBSTACK]) AC_DEFUN([AC_FUNC_OBSTACK], [AC_LIBSOURCES([obstack.h, obstack.c])dnl AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack, [AC_LINK_IFELSE( [AC_LANG_PROGRAM([[@%:@include "obstack.h"]], [[struct obstack *mem; obstack_free(mem,(char *) 0)]])], [ac_cv_func_obstack=yes], [ac_cv_func_obstack=no])]) if test $ac_cv_func_obstack = yes; then AC_DEFINE(HAVE_OBSTACK, 1, [Define to 1 if libc includes obstacks.]) else AC_LIBOBJ(obstack) fi ])# AC_FUNC_OBSTACK # AU::AM_FUNC_OBSTACK # ------------------- AU_ALIAS([AM_FUNC_OBSTACK], [AC_FUNC_OBSTACK]) # _AC_FUNC_REALLOC_IF(IF-WORKS, IF-NOT) # ------------------------------------- # If `realloc (0, 0)' properly handled, run IF-WORKS, otherwise, IF-NOT. AC_DEFUN([_AC_FUNC_REALLOC_IF], [AC_REQUIRE([AC_HEADER_STDC])dnl AC_CHECK_HEADERS(stdlib.h) AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#if STDC_HEADERS || HAVE_STDLIB_H # include #else char *realloc (); #endif ]], [exit (realloc (0, 0) ? 0 : 1);])], [ac_cv_func_realloc_0_nonnull=yes], [ac_cv_func_realloc_0_nonnull=no], [ac_cv_func_realloc_0_nonnull=no])]) AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) ])# AC_FUNC_REALLOC # AC_FUNC_REALLOC # --------------- # Report whether `realloc (0, 0)' properly handled, and replace realloc if # needed. AN_FUNCTION([realloc], [AC_FUNC_REALLOC]) AC_DEFUN([AC_FUNC_REALLOC], [_AC_FUNC_REALLOC_IF( [AC_DEFINE([HAVE_REALLOC], 1, [Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise.])], [AC_DEFINE([HAVE_REALLOC], 0) AC_LIBOBJ([realloc]) AC_DEFINE([realloc], [rpl_realloc], [Define to rpl_realloc if the replacement function should be used.])]) ])# AC_FUNC_REALLOC # AC_FUNC_SELECT_ARGTYPES # ----------------------- # Determine the correct type to be passed to each of the `select' # function's arguments, and define those types in `SELECT_TYPE_ARG1', # `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'. AN_FUNCTION([select], [AC_FUNC_SELECT_ARGTYPES]) AC_DEFUN([AC_FUNC_SELECT_ARGTYPES], [AC_CHECK_HEADERS(sys/select.h sys/socket.h) AC_CACHE_CHECK([types of arguments for select], [ac_cv_func_select_args], [for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT #if HAVE_SYS_SELECT_H # include #endif #if HAVE_SYS_SOCKET_H # include #endif ], [extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5);])], [ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3]) done done done # Provide a safe default value. : ${ac_cv_func_select_args='int,int *,struct timeval *'} ]) ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1], [Define to the type of arg 1 for `select'.]) AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234, ($[2]), [Define to the type of args 2, 3 and 4 for `select'.]) AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, ($[3]), [Define to the type of arg 5 for `select'.]) rm -f conftest* ])# AC_FUNC_SELECT_ARGTYPES # AC_FUNC_SETPGRP # --------------- AN_FUNCTION([setpgrp], [AC_FUNC_SETPGRP]) AC_DEFUN([AC_FUNC_SETPGRP], [AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [#if HAVE_UNISTD_H # include #endif ], [/* If this system has a BSD-style setpgrp which takes arguments, setpgrp(1, 1) will fail with ESRCH and return -1, in that case exit successfully. */ exit (setpgrp (1,1) == -1 ? 0 : 1);])], [ac_cv_func_setpgrp_void=no], [ac_cv_func_setpgrp_void=yes], [AC_MSG_ERROR([cannot check setpgrp when cross compiling])])]) if test $ac_cv_func_setpgrp_void = yes; then AC_DEFINE(SETPGRP_VOID, 1, [Define to 1 if the `setpgrp' function takes no argument.]) fi ])# AC_FUNC_SETPGRP # _AC_FUNC_STAT(STAT | LSTAT) # --------------------------- # Determine whether stat or lstat have the bug that it succeeds when # given the zero-length file name argument. The stat and lstat from # SunOS4.1.4 and the Hurd (as of 1998-11-01) do this. # # If it does, then define HAVE_STAT_EMPTY_STRING_BUG (or # HAVE_LSTAT_EMPTY_STRING_BUG) and arrange to compile the wrapper # function. m4_define([_AC_FUNC_STAT], [AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl AC_CACHE_CHECK([whether $1 accepts an empty string], [ac_cv_func_$1_empty_string_bug], [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[struct stat sbuf; exit ($1 ("", &sbuf) ? 1 : 0);]])], [ac_cv_func_$1_empty_string_bug=yes], [ac_cv_func_$1_empty_string_bug=no], [ac_cv_func_$1_empty_string_bug=yes])]) if test $ac_cv_func_$1_empty_string_bug = yes; then AC_LIBOBJ([$1]) AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1_EMPTY_STRING_BUG]), 1, [Define to 1 if `$1' has the bug that it succeeds when given the zero-length file name argument.]) fi ])# _AC_FUNC_STAT # AC_FUNC_STAT & AC_FUNC_LSTAT # ---------------------------- AN_FUNCTION([stat], [AC_FUNC_STAT]) AC_DEFUN([AC_FUNC_STAT], [_AC_FUNC_STAT(stat)]) AN_FUNCTION([lstat], [AC_FUNC_LSTAT]) AC_DEFUN([AC_FUNC_LSTAT], [_AC_FUNC_STAT(lstat)]) # _AC_LIBOBJ_STRTOD # ----------------- m4_define([_AC_LIBOBJ_STRTOD], [AC_LIBOBJ(strtod) AC_CHECK_FUNC(pow) if test $ac_cv_func_pow = no; then AC_CHECK_LIB(m, pow, [POW_LIB=-lm], [AC_MSG_WARN([cannot find library containing definition of pow])]) fi ])# _AC_LIBOBJ_STRTOD # AC_FUNC_STRTOD # -------------- AN_FUNCTION([strtod], [AC_FUNC_STRTOD]) AC_DEFUN([AC_FUNC_STRTOD], [AC_SUBST(POW_LIB)dnl AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod, [AC_RUN_IFELSE([AC_LANG_SOURCE([[ double strtod (); int main() { { /* Some versions of Linux strtod mis-parse strings with leading '+'. */ char *string = " +69"; char *term; double value; value = strtod (string, &term); if (value != 69 || term != (string + 4)) exit (1); } { /* Under Solaris 2.4, strtod returns the wrong value for the terminating character under some conditions. */ char *string = "NaN"; char *term; strtod (string, &term); if (term != string && *(term - 1) == 0) exit (1); } exit (0); } ]])], ac_cv_func_strtod=yes, ac_cv_func_strtod=no, ac_cv_func_strtod=no)]) if test $ac_cv_func_strtod = no; then _AC_LIBOBJ_STRTOD fi ]) # AU::AM_FUNC_STRTOD # ------------------ AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD]) # AC_FUNC_STRERROR_R # ------------------ AN_FUNCTION([strerror_r], [AC_FUNC_STRERROR_R]) AC_DEFUN([AC_FUNC_STRERROR_R], [AC_CHECK_DECLS([strerror_r]) AC_CHECK_FUNCS([strerror_r]) AC_CACHE_CHECK([whether strerror_r returns char *], ac_cv_func_strerror_r_char_p, [ ac_cv_func_strerror_r_char_p=no if test $ac_cv_have_decl_strerror_r = yes; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ char buf[100]; char x = *strerror_r (0, buf, sizeof buf); char *p = strerror_r (0, buf, sizeof buf); ]])], ac_cv_func_strerror_r_char_p=yes) else # strerror_r is not declared. Choose between # systems that have relatively inaccessible declarations for the # function. BeOS and DEC UNIX 4.0 fall in this category, but the # former has a strerror_r that returns char*, while the latter # has a strerror_r that returns `int'. # This test should segfault on the DEC system. AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT extern char *strerror_r ();], [[char buf[100]; char x = *strerror_r (0, buf, sizeof buf); exit (!isalpha (x));]])], ac_cv_func_strerror_r_char_p=yes, , :) fi ]) if test $ac_cv_func_strerror_r_char_p = yes; then AC_DEFINE([STRERROR_R_CHAR_P], 1, [Define to 1 if strerror_r returns char *.]) fi ])# AC_FUNC_STRERROR_R # AC_FUNC_STRFTIME # ---------------- AN_FUNCTION([strftime], [AC_FUNC_STRFTIME]) AC_DEFUN([AC_FUNC_STRFTIME], [AC_CHECK_FUNCS(strftime, [], [# strftime is in -lintl on SCO UNIX. AC_CHECK_LIB(intl, strftime, [AC_DEFINE(HAVE_STRFTIME) LIBS="-lintl $LIBS"])])dnl ])# AC_FUNC_STRFTIME # AC_FUNC_STRNLEN # -------------- AN_FUNCTION([strnlen], [AC_FUNC_STRNLEN]) AC_DEFUN([AC_FUNC_STRNLEN], [AC_CACHE_CHECK([for working strnlen], ac_cv_func_strnlen_working, [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ #define S "foobar" #define S_LEN (sizeof S - 1) /* At least one implementation is buggy: that of AIX 4.3 would give strnlen (S, 1) == 3. */ int i; for (i = 0; i < S_LEN + 1; ++i) { int expected = i <= S_LEN ? i : S_LEN; if (strnlen (S, i) != expected) exit (1); } exit (0); ]])], [ac_cv_func_strnlen_working=yes], [ac_cv_func_strnlen_working=no], [ac_cv_func_strnlen_working=no])]) test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen]) ])# AC_FUNC_STRNLEN # AC_FUNC_SETVBUF_REVERSED # ------------------------ AN_FUNCTION([setvbuf], [AC_FUNC_SETVBUF_REVERSED]) AC_DEFUN([AC_FUNC_SETVBUF_REVERSED], [AC_REQUIRE([AC_C_PROTOTYPES])dnl AC_CACHE_CHECK(whether setvbuf arguments are reversed, ac_cv_func_setvbuf_reversed, [ac_cv_func_setvbuf_reversed=no AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include # if PROTOTYPES int (setvbuf) (FILE *, int, char *, size_t); # endif]], [[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include # if PROTOTYPES int (setvbuf) (FILE *, int, char *, size_t); # endif]], [[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])], [# It compiles and links either way, so it must not be declared # with a prototype and most likely this is a K&R C compiler. # Try running it. AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include ]], [[/* This call has the arguments reversed. A reversed system may check and see that the address of buf is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ char buf; if (setvbuf (stdout, _IOLBF, &buf, 1) != 0) exit (1); putchar ('\r'); exit (0); /* Non-reversed systems SEGV here. */]])], [ac_cv_func_setvbuf_reversed=yes], [rm -f core *.core], [[: # Assume setvbuf is not reversed when cross-compiling.]])] ac_cv_func_setvbuf_reversed=yes)])]) if test $ac_cv_func_setvbuf_reversed = yes; then AC_DEFINE(SETVBUF_REVERSED, 1, [Define to 1 if the `setvbuf' function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3.]) fi ])# AC_FUNC_SETVBUF_REVERSED # AU::AC_SETVBUF_REVERSED # ----------------------- AU_ALIAS([AC_SETVBUF_REVERSED], [AC_FUNC_SETVBUF_REVERSED]) # AC_FUNC_STRCOLL # --------------- AN_FUNCTION([strcoll], [AC_FUNC_STRCOLL]) AC_DEFUN([AC_FUNC_STRCOLL], [AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[exit (strcoll ("abc", "def") >= 0 || strcoll ("ABC", "DEF") >= 0 || strcoll ("123", "456") >= 0)]])], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no, ac_cv_func_strcoll_works=no)]) if test $ac_cv_func_strcoll_works = yes; then AC_DEFINE(HAVE_STRCOLL, 1, [Define to 1 if you have the `strcoll' function and it is properly defined.]) fi ])# AC_FUNC_STRCOLL # AU::AC_STRCOLL # -------------- AU_ALIAS([AC_STRCOLL], [AC_FUNC_STRCOLL]) # AC_FUNC_UTIME_NULL # ------------------ AN_FUNCTION([utime], [AC_FUNC_UTIME_NULL]) AC_DEFUN([AC_FUNC_UTIME_NULL], [AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null, [rm -f conftest.data; >conftest.data # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[struct stat s, t; exit (!(stat ("conftest.data", &s) == 0 && utime ("conftest.data", (long *)0) == 0 && stat ("conftest.data", &t) == 0 && t.st_mtime >= s.st_mtime && 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 *.core]) if test $ac_cv_func_utime_null = yes; then AC_DEFINE(HAVE_UTIME_NULL, 1, [Define to 1 if `utime(file, NULL)' sets file's timestamp to the present.]) fi rm -f conftest.data ])# AC_FUNC_UTIME_NULL # AU::AC_UTIME_NULL # ----------------- AU_ALIAS([AC_UTIME_NULL], [AC_FUNC_UTIME_NULL]) # AC_FUNC_FORK # ------------- AN_FUNCTION([fork], [AC_FUNC_FORK]) AN_FUNCTION([vfork], [AC_FUNC_FORK]) AC_DEFUN([AC_FUNC_FORK], [AC_REQUIRE([AC_TYPE_PID_T])dnl AC_CHECK_HEADERS(unistd.h vfork.h) AC_CHECK_FUNCS(fork vfork) if test "x$ac_cv_func_fork" = xyes; then _AC_FUNC_FORK else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac AC_MSG_WARN([result $ac_cv_func_fork_works guessed because of cross compilation]) fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then _AC_FUNC_VFORK fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork AC_MSG_WARN([result $ac_cv_func_vfork_works guessed because of cross compilation]) fi if test "x$ac_cv_func_vfork_works" = xyes; then AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define to 1 if `vfork' works.]) else AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.]) fi if test "x$ac_cv_func_fork_works" = xyes; then AC_DEFINE(HAVE_WORKING_FORK, 1, [Define to 1 if `fork' works.]) fi ])# AC_FUNC_FORK # _AC_FUNC_FORK # ------------- AC_DEFUN([_AC_FUNC_FORK], [AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works, [AC_RUN_IFELSE([/* By Ruediger Kuhlmann. */ #include #if HAVE_UNISTD_H # include #endif /* Some systems only have a dummy stub for fork() */ int main () { if (fork() < 0) exit (1); exit (0); }], [ac_cv_func_fork_works=yes], [ac_cv_func_fork_works=no], [ac_cv_func_fork_works=cross])])] )# _AC_FUNC_FORK # _AC_FUNC_VFORK # ------------- AC_DEFUN([_AC_FUNC_VFORK], [AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, [AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Thanks to Paul Eggert for this test. */ #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. 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 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. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* 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, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; exit( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } }]])], [ac_cv_func_vfork_works=yes], [ac_cv_func_vfork_works=no], [ac_cv_func_vfork_works=cross])]) ])# _AC_FUNC_VFORK # AU::AC_FUNC_VFORK # ------------ AU_ALIAS([AC_FUNC_VFORK], [AC_FUNC_FORK]) # AU::AC_VFORK # ------------ AU_ALIAS([AC_VFORK], [AC_FUNC_FORK]) # AC_FUNC_VPRINTF # --------------- # Why the heck is that _doprnt does not define HAVE__DOPRNT??? # That the logical name! AN_FUNCTION([vfprintf], [AC_FUNC_VPRINTF]) AN_FUNCTION([vprintf], [AC_FUNC_VPRINTF]) AN_FUNCTION([vsprintf], [AC_FUNC_VPRINTF]) AN_FUNCTION([_doprnt], [AC_FUNC_VPRINTF]) AC_DEFUN([AC_FUNC_VPRINTF], [AC_CHECK_FUNCS(vprintf, [] [AC_CHECK_FUNC(_doprnt, [AC_DEFINE(HAVE_DOPRNT, 1, [Define to 1 if you don't have `vprintf' but do have `_doprnt.'])])]) ]) # AU::AC_VPRINTF # -------------- AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF]) # AC_FUNC_WAIT3 # ------------- # Don't bother too hard maintaining this macro, as it's obsoleted. # We don't AU define it, since we don't have any alternative to propose, # any invocation should be removed, and the code adjusted. AN_FUNCTION([wait3], [AC_FUNC_WAIT3]) AC_DEFUN([AC_FUNC_WAIT3], [AC_DIAGNOSE([obsolete], [$0: `wait3' is being removed from the Open Group standards. Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl AC_CACHE_CHECK([for wait3 that fills in rusage], [ac_cv_func_wait3_rusage], [AC_RUN_IFELSE([AC_LANG_SOURCE( [[#include #include #include #include /* HP-UX has wait3 but does not fill in rusage at all. */ int main () { struct rusage r; int i; /* 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. 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. */ _exit(0); break; case -1: /* What can we do? */ _exit(0); break; default: /* Parent. */ wait3(&i, 0, &r); /* Avoid "text file busy" from rm on fast HP-UX machines. */ sleep(2); 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_rusage=yes], [ac_cv_func_wait3_rusage=no], [ac_cv_func_wait3_rusage=no])]) if test $ac_cv_func_wait3_rusage = yes; then AC_DEFINE(HAVE_WAIT3, 1, [Define to 1 if you have the `wait3' system call. Deprecated, you should no longer depend upon `wait3'.]) fi ])# AC_FUNC_WAIT3 # AU::AC_WAIT3 # ------------ AU_ALIAS([AC_WAIT3], [AC_FUNC_WAIT3]) autoconf2.59-2.59+dfsg/lib/autoconf/lang.m40000644000175000017500000005043607745703403017630 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Programming languages support. # Copyright (C) 2000, 2001, 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # Table of Contents: # # 1. Language selection # and routines to produce programs in a given language. # a. generic routines # b. C # c. C++ # d. Fortran 77 # # 2. Producing programs in a given language. # a. generic routines # b. C # c. C++ # d. Fortran 77 # # 3. Looking for a compiler # And possibly the associated preprocessor. # a. Generic routines. # b. C # c. C++ # d. Fortran 77 # # 4. Compilers' characteristics. # a. Generic routines. # b. C # c. C++ # d. Fortran 77 ## ----------------------- ## ## 1. Language selection. ## ## ----------------------- ## # -------------------------------- # # 1a. Generic language selection. # # -------------------------------- # # AC_LANG_CASE(LANG1, IF-LANG1, LANG2, IF-LANG2, ..., DEFAULT) # ------------------------------------------------------------ # Expand into IF-LANG1 if the current language is LANG1 etc. else # into default. m4_define([AC_LANG_CASE], [m4_case(_AC_LANG, $@)]) # _AC_LANG_DISPATCH(MACRO, LANG, ARGS) # ------------------------------------ # Call the specialization of MACRO for LANG with ARGS. Complain if # unavailable. m4_define([_AC_LANG_DISPATCH], [m4_ifdef([$1($2)], [m4_indir([$1($2)], m4_shiftn(2, $@))], [AC_FATAL([$1: unknown language: $2])])]) # _AC_LANG_SET(OLD, NEW) # ---------------------- # Output the shell code needed to switch from OLD language to NEW language. # Do not try to optimize like this: # # m4_defun([_AC_LANG_SET], # [m4_if([$1], [$2], [], # [_AC_LANG_DISPATCH([AC_LANG], [$2])])]) # # as it can introduce differences between the sh-current language and the # m4-current-language when m4_require is used. Something more subtle # might be possible, but at least for the time being, play it safe. m4_defun([_AC_LANG_SET], [_AC_LANG_DISPATCH([AC_LANG], [$2])]) # AC_LANG(LANG) # ------------- # Set the current language to LANG. m4_defun([AC_LANG], [_AC_LANG_SET(m4_ifdef([_AC_LANG], [m4_defn([_AC_LANG])]), [$1])dnl m4_define([_AC_LANG], [$1])]) # AC_LANG_PUSH(LANG) # ------------------ # Save the current language, and use LANG. m4_defun([AC_LANG_PUSH], [_AC_LANG_SET(m4_ifdef([_AC_LANG], [m4_defn([_AC_LANG])]), [$1])dnl m4_pushdef([_AC_LANG], [$1])]) # AC_LANG_POP([LANG]) # ------------------- # If given, check that the current language is LANG, and restore the # previous language. m4_defun([AC_LANG_POP], [m4_ifval([$1], [m4_if([$1], m4_defn([_AC_LANG]), [], [m4_fatal([$0($1): unexpected current language: ]m4_defn([_AC_LANG]))])])dnl m4_pushdef([$0 OLD], m4_defn([_AC_LANG]))dnl m4_popdef([_AC_LANG])dnl _AC_LANG_SET(m4_defn([$0 OLD]), m4_defn([_AC_LANG]))dnl m4_popdef([$0 OLD])dnl ]) # AC_LANG_SAVE # ------------ # Save the current language, but don't change language. AU_DEFUN([AC_LANG_SAVE], [AC_DIAGNOSE([obsolete], [instead of using `AC_LANG', `AC_LANG_SAVE', and `AC_LANG_RESTORE', you should use `AC_LANG_PUSH' and `AC_LANG_POP'.]) m4_pushdef([_AC_LANG], _AC_LANG)]) # AC_LANG_RESTORE # --------------- # Restore the current language from the stack. AU_DEFUN([AC_LANG_RESTORE], [AC_LANG_POP($@)]) # _AC_LANG_ABBREV # --------------- # Return a short signature of _AC_LANG which can be used in shell # variable names, or in M4 macro names. m4_defun([_AC_LANG_ABBREV], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # _AC_LANG_PREFIX # --------------- # Return a short (upper case) signature of _AC_LANG that is used to # prefix environment variables like FLAGS. m4_defun([_AC_LANG_PREFIX], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_ASSERT(LANG) # -------------------- # Current language must be LANG. m4_defun([AC_LANG_ASSERT], [m4_if(_AC_LANG, $1, [], [m4_fatal([$0: current language is not $1: ] _AC_LANG)])]) ## ---------------------- ## ## 2.Producing programs. ## ## ---------------------- ## # ---------------------- # # 2a. Generic routines. # # ---------------------- # # AC_LANG_CONFTEST(BODY) # ---------------------- # Save the BODY in `conftest.$ac_ext'. Add a trailing new line. m4_define([AC_LANG_CONFTEST], [cat >conftest.$ac_ext <<_ACEOF $1 _ACEOF]) # AC_LANG_SOURCE(BODY) # -------------------- # Produce a valid source for the current language, which includes the # BODY, and as much as possible `confdefs.h'. AC_DEFUN([AC_LANG_SOURCE], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_PROGRAM([PROLOGUE], [BODY]) # ----------------------------------- # Produce a valid source for the current language. Prepend the # PROLOGUE (typically CPP directives and/or declarations) to an # execution the BODY (typically glued inside the `main' function, or # equivalent). AC_DEFUN([AC_LANG_PROGRAM], [AC_LANG_SOURCE([_AC_LANG_DISPATCH([$0], _AC_LANG, $@)])]) # AC_LANG_CALL(PROLOGUE, FUNCTION) # -------------------------------- # Call the FUNCTION. AC_DEFUN([AC_LANG_CALL], [m4_ifval([$2], [], [m4_warn([syntax], [$0: no function given])])dnl _AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_FUNC_LINK_TRY(FUNCTION) # ------------------------------- # Produce a source which links correctly iff the FUNCTION exists. AC_DEFUN([AC_LANG_FUNC_LINK_TRY], [m4_ifval([$1], [], [m4_warn([syntax], [$0: no function given])])dnl _AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_BOOL_COMPILE_TRY(PROLOGUE, EXPRESSION) # ---------------------------------------------- # Produce a program that compiles with success iff the boolean EXPRESSION # evaluates to true at compile time. AC_DEFUN([AC_LANG_BOOL_COMPILE_TRY], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_INT_SAVE(PROLOGUE, EXPRESSION) # -------------------------------------- # Produce a program that saves the runtime evaluation of the integer # EXPRESSION into `conftest.val'. AC_DEFUN([AC_LANG_INT_SAVE], [_AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## # ----------------------------------------------------- # # 3a. Generic routines in compilers and preprocessors. # # ----------------------------------------------------- # # AC_LANG_COMPILER # ---------------- # Find a compiler for the current LANG. Be sure to be run before # AC_LANG_PREPROC. # # Note that because we might AC_REQUIRE `AC_LANG_COMPILER(C)' for # instance, the latter must be AC_DEFUN'd, not just define'd. m4_define([AC_LANG_COMPILER], [AC_BEFORE([AC_LANG_COMPILER(]_AC_LANG[)], [AC_LANG_PREPROC(]_AC_LANG[)])dnl _AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_COMPILER_REQUIRE # ------------------------ # Ensure we have a compiler for the current LANG. AC_DEFUN([AC_LANG_COMPILER_REQUIRE], [m4_require([AC_LANG_COMPILER(]_AC_LANG[)], [AC_LANG_COMPILER])]) # _AC_LANG_COMPILER_GNU # --------------------- # Check whether the compiler for the current language is GNU. # # It doesn't seem necessary right now to have a different source # according to the current language, since this works fine. Some day # it might be needed. Nevertheless, pay attention to the fact that # the position of `choke me' on the seventh column is meant: otherwise # some Fortran compilers (e.g., SGI) might consider it's a # continuation line, and warn instead of reporting an error. m4_define([_AC_LANG_COMPILER_GNU], [AC_CACHE_CHECK([whether we are using the GNU _AC_LANG compiler], [ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __GNUC__ choke me #endif ]])], [ac_compiler_gnu=yes], [ac_compiler_gnu=no]) ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu=$ac_compiler_gnu ])])# _AC_LANG_COMPILER_GNU # AC_LANG_PREPROC # --------------- # Find a preprocessor for the current language. Note that because we # might AC_REQUIRE `AC_LANG_PREPROC(C)' for instance, the latter must # be AC_DEFUN'd, not just define'd. Since the preprocessor depends # upon the compiler, look for the compiler. m4_define([AC_LANG_PREPROC], [AC_LANG_COMPILER_REQUIRE()dnl _AC_LANG_DISPATCH([$0], _AC_LANG, $@)]) # AC_LANG_PREPROC_REQUIRE # ----------------------- # Ensure we have a preprocessor for the current language. AC_DEFUN([AC_LANG_PREPROC_REQUIRE], [m4_require([AC_LANG_PREPROC(]_AC_LANG[)], [AC_LANG_PREPROC])]) # AC_REQUIRE_CPP # -------------- # Require the preprocessor for the current language. # FIXME: AU_ALIAS once AC_LANG is officially documented (2.51?). AC_DEFUN([AC_REQUIRE_CPP], [AC_LANG_PREPROC_REQUIRE]) # AC_NO_EXECUTABLES # ----------------- # FIXME: The GCC team has specific needs which the current Autoconf # framework cannot solve elegantly. This macro implements a dirty # hack until Autoconf is able to provide the services its users # need. # # Several of the support libraries that are often built with GCC can't # assume the tool-chain is already capable of linking a program: the # compiler often expects to be able to link with some of such # libraries. # # In several of these libraries, workarounds have been introduced to # avoid the AC_PROG_CC_WORKS test, that would just abort their # configuration. The introduction of AC_EXEEXT, enabled either by # libtool or by CVS autoconf, have just made matters worse. # # Unlike an earlier version of this macro, using AC_NO_EXECUTABLES does # not disable link tests at autoconf time, but at configure time. # This allows AC_NO_EXECUTABLES to be invoked conditionally. AC_DEFUN_ONCE([AC_NO_EXECUTABLES], [m4_divert_push([KILL]) m4_divert_text([DEFAULTS], [ac_no_link=no]) AC_BEFORE([$0], [_AC_COMPILER_EXEEXT]) AC_BEFORE([$0], [AC_LINK_IFELSE]) m4_define([_AC_COMPILER_EXEEXT], [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) if AC_TRY_EVAL(ac_link); then ac_no_link=no ]m4_defn([_AC_COMPILER_EXEEXT])[ else ac_no_link=yes # Setting cross_compile will disable run tests; it will # also disable AC_CHECK_FILE but that's generally # correct if we can't link. cross_compiling=yes EXEEXT= _AC_COMPILER_EXEEXT_CROSS fi ]) m4_define([AC_LINK_IFELSE], [if test x$ac_no_link = xyes; then AC_MSG_ERROR([Link tests are not allowed after AC@&t@_NO_EXECUTABLES.]) fi ]m4_defn([AC_LINK_IFELSE])) m4_divert_pop()dnl ])# AC_NO_EXECUTABLES # ----------------------------- # # Computing EXEEXT and OBJEXT. # # ----------------------------- # # Files to ignore # --------------- # Ignore .d files produced by CFLAGS=-MD. # # On UWIN (which uses a cc wrapper for MSVC), the compiler also generates # a .pdb file # # When the w32 free Borland C++ command line compiler links a program # (conftest.exe), it also produces a file named `conftest.tds' in # addition to `conftest.obj'. # # - *.bb, *.bbg # Created per object by GCC when given -ftest-coverage. # # - *.xSYM # Created on BeOS. Seems to be per executable. # _AC_COMPILER_OBJEXT_REJECT # -------------------------- # Case/esac pattern matching the files to be ignored when looking for # compiled object files. m4_define([_AC_COMPILER_OBJEXT_REJECT], [*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg]) # _AC_COMPILER_EXEEXT_REJECT # -------------------------- # Case/esac pattern matching the files to be ignored when looking for # compiled executables. m4_define([_AC_COMPILER_EXEEXT_REJECT], [_AC_COMPILER_OBJEXT_REJECT | *.o | *.obj]) # We must not AU define them, because autoupdate would then remove # them, which is right, but Automake 1.4 would remove the support for # $(EXEEXT) etc. # FIXME: Remove this once Automake fixed. AC_DEFUN([AC_EXEEXT], []) AC_DEFUN([AC_OBJEXT], []) # _AC_COMPILER_EXEEXT_DEFAULT # --------------------------- # Check for the extension used for the default name for executables. # # We do this in order to find out what is the extension we must for # compiling executables (see _AC_COMPILER_EXEEXT's comments). # # Beware of `expr' that may return `0' or `'. Since this macro is # the first one in touch with the compiler, it should also check that # it compiles properly. # # On OpenVMS 7.1 system, the DEC C 5.5 compiler when called through a # GNV (gnv.sourceforge.net) cc wrapper, produces the output file named # `a_out.exe'. m4_define([_AC_COMPILER_EXEEXT_DEFAULT], [# Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. AC_MSG_CHECKING([for _AC_LANG compiler default output file name]) ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']` AS_IF([AC_TRY_EVAL(ac_link_default)], [# Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in _AC_COMPILER_EXEEXT_REJECT ) ;; conftest.$ac_ext ) # This is the source file. ;; [[ab]].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done], [_AC_MSG_LOG_CONFTEST AC_MSG_FAILURE([_AC_LANG compiler cannot create executables], 77)]) ac_exeext=$ac_cv_exeext AC_MSG_RESULT([$ac_file]) ])# _AC_COMPILER_EXEEXT_DEFAULT # _AC_COMPILER_EXEEXT_WORKS # ------------------------- m4_define([_AC_COMPILER_EXEEXT_WORKS], [# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. AC_MSG_CHECKING([whether the _AC_LANG compiler works]) # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if AC_TRY_COMMAND([./$ac_file]); then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else AC_MSG_FAILURE([cannot run _AC_LANG compiled programs. If you meant to cross compile, use `--host'.]) fi fi fi AC_MSG_RESULT([yes]) ])# _AC_COMPILER_EXEEXT_WORKS # _AC_COMPILER_EXEEXT_CROSS # ------------------------- m4_define([_AC_COMPILER_EXEEXT_CROSS], [# Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. AC_MSG_CHECKING([whether we are cross compiling]) AC_MSG_RESULT([$cross_compiling]) ])# _AC_COMPILER_EXEEXT_CROSS # _AC_COMPILER_EXEEXT_O # --------------------- # Check for the extension used when `-o foo'. Try to see if ac_cv_exeext, # as computed by _AC_COMPILER_EXEEXT_DEFAULT is OK. m4_define([_AC_COMPILER_EXEEXT_O], [AC_MSG_CHECKING([for suffix of executables]) AS_IF([AC_TRY_EVAL(ac_link)], [# If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in _AC_COMPILER_EXEEXT_REJECT ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']` export ac_cv_exeext break;; * ) break;; esac done], [AC_MSG_FAILURE([cannot compute suffix of executables: cannot compile and link])]) rm -f conftest$ac_cv_exeext AC_MSG_RESULT([$ac_cv_exeext]) ])# _AC_COMPILER_EXEEXT_O # _AC_COMPILER_EXEEXT # ------------------- # Check for the extension used for executables. It compiles a test # executable. If this is called, the executable extensions will be # automatically used by link commands run by the configure script. # # Note that some compilers (cross or not), strictly obey to `-o foo' while # the host requires `foo.exe', so we should not depend upon `-o' to # test EXEEXT. But then, be sure no to destroy user files. # # Must be run before _AC_COMPILER_OBJEXT because _AC_COMPILER_EXEEXT_DEFAULT # checks whether the compiler works. m4_define([_AC_COMPILER_EXEEXT], [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" _AC_COMPILER_EXEEXT_DEFAULT _AC_COMPILER_EXEEXT_WORKS rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save _AC_COMPILER_EXEEXT_CROSS _AC_COMPILER_EXEEXT_O rm -f conftest.$ac_ext AC_SUBST([EXEEXT], [$ac_cv_exeext])dnl ac_exeext=$EXEEXT ])# _AC_COMPILER_EXEEXT # _AC_COMPILER_OBJEXT # ------------------- # Check the object extension used by the compiler: typically `.o' or # `.obj'. If this is called, some other behavior will change, # determined by ac_objext. # # This macro is called by AC_LANG_COMPILER, the latter being required # by the AC_COMPILE_IFELSE macros, so use _AC_COMPILE_IFELSE. And in fact, # don't, since _AC_COMPILE_IFELSE needs to know ac_objext for the `test -s' # it includes. So do it by hand. m4_define([_AC_COMPILER_OBJEXT], [AC_CACHE_CHECK([for suffix of object files], ac_cv_objext, [AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) rm -f conftest.o conftest.obj AS_IF([AC_TRY_EVAL(ac_compile)], [for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in _AC_COMPILER_OBJEXT_REJECT ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done], [_AC_MSG_LOG_CONFTEST AC_MSG_FAILURE([cannot compute suffix of object files: cannot compile])]) rm -f conftest.$ac_cv_objext conftest.$ac_ext]) AC_SUBST([OBJEXT], [$ac_cv_objext])dnl ac_objext=$OBJEXT ])# _AC_COMPILER_OBJEXT ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ## # AC_LANG_WERROR # ------------------ # Treat warnings from the current language's preprocessor, compiler, and # linker as fatal errors. AC_DEFUN([AC_LANG_WERROR], [m4_divert_text([DEFAULTS], [ac_[]_AC_LANG_ABBREV[]_werror_flag=no]) ac_[]_AC_LANG_ABBREV[]_werror_flag=yes])# AC_LANG_WERROR autoconf2.59-2.59+dfsg/lib/autoconf/Makefile.in0000644000175000017500000003445107752412547020515 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(dist_autoconflib_DATA) $(srcdir)/../freeze.mk \ $(srcdir)/Makefile.in Makefile.am subdir = lib/autoconf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = $(DESTDIR)$(autoconflibdir) $(DESTDIR)$(autoconflibdir) dist_autoconflibDATA_INSTALL = $(INSTALL_DATA) nodist_autoconflibDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_autoconflib_DATA) $(nodist_autoconflib_DATA) ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ autoconflibdir = $(pkgdatadir)/autoconf dist_autoconflib_DATA = \ autoconf.m4 \ general.m4 status.m4 oldnames.m4 specific.m4 \ autoheader.m4 autoupdate.m4 autotest.m4 autoscan.m4 \ lang.m4 c.m4 fortran.m4 \ functions.m4 headers.m4 types.m4 libs.m4 programs.m4 nodist_autoconflib_DATA = autoconf.m4f CLEANFILES = $(nodist_autoconflib_DATA) TAGS_FILES = $(dist_autoconflib_DATA) ETAGS_ARGS = $(ETAGS_FOR_AUTOCONF) forbidden_patterns = -e '^_*EOF' -e ' cmp ' forbidden_patterns_files = $(dist_autoconflib_DATA) SUFFIXES = .m4 .m4f # Do not use AUTOM4TE here, since Makefile.maint (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. But we _ship_ tests/autom4te, so it doesn't # apply to us. MY_AUTOM4TE = $(top_builddir)/tests/autom4te AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Factor the dependencies between all the frozen files. # Some day we should explain to Automake how to use autom4te to compute # the dependencies... src_libdir = $(top_srcdir)/lib build_libdir = $(top_builddir)/lib m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG) m4sugar_m4f_dependencies = \ $(m4f_dependencies) \ $(src_libdir)/m4sugar/m4sugar.m4 \ $(build_libdir)/m4sugar/version.m4 m4sh_m4f_dependencies = \ $(m4sugar_m4f_dependencies) \ $(src_libdir)/m4sugar/m4sh.m4 autotest_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autotest/autotest.m4 \ $(src_libdir)/autotest/general.m4 autoconf_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autoconf/autoscan.m4 \ $(src_libdir)/autoconf/general.m4 \ $(src_libdir)/autoconf/autoheader.m4 \ $(src_libdir)/autoconf/autoupdate.m4 \ $(src_libdir)/autoconf/autotest.m4 \ $(src_libdir)/autoconf/status.m4 \ $(src_libdir)/autoconf/oldnames.m4 \ $(src_libdir)/autoconf/specific.m4 \ $(src_libdir)/autoconf/lang.m4 \ $(src_libdir)/autoconf/c.m4 \ $(src_libdir)/autoconf/fortran.m4 \ $(src_libdir)/autoconf/functions.m4 \ $(src_libdir)/autoconf/headers.m4 \ $(src_libdir)/autoconf/types.m4 \ $(src_libdir)/autoconf/libs.m4 \ $(src_libdir)/autoconf/programs.m4 \ $(src_libdir)/autoconf/autoconf.m4 ETAGS_FOR_M4 = \ --lang=none \ --regex='/\(m4_define\|define\)(\[\([^]]*\)\]/\2/' ETAGS_FOR_M4SUGAR = \ $(ETAGS_FOR_M4) \ --regex='/m4_defun(\[\([^]]*\)\]/\1/' ETAGS_FOR_AUTOCONF = \ $(ETAGS_FOR_M4SUGAR) \ --regex='/\(A[CU]_DEFUN\|AU_ALIAS\)(\[\([^]]*\)\]/\2/' \ --regex='/AN_\(FUNCTION\|HEADER\|IDENTIFIER\|LIBRARY\|MAKEVAR\|PROGRAM\)(\[\([^]]*\)\]/\2/' all: all-am .SUFFIXES: .SUFFIXES: .m4 .m4f $(srcdir)/Makefile.in: Makefile.am $(srcdir)/../freeze.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/autoconf/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/autoconf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-dist_autoconflibDATA: $(dist_autoconflib_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(autoconflibdir) @list='$(dist_autoconflib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(dist_autoconflibDATA_INSTALL) $$d$$p $(DESTDIR)$(autoconflibdir)/$$f"; \ $(dist_autoconflibDATA_INSTALL) $$d$$p $(DESTDIR)$(autoconflibdir)/$$f; \ done uninstall-dist_autoconflibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_autoconflib_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(autoconflibdir)/$$f"; \ rm -f $(DESTDIR)$(autoconflibdir)/$$f; \ done install-nodist_autoconflibDATA: $(nodist_autoconflib_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(autoconflibdir) @list='$(nodist_autoconflib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(nodist_autoconflibDATA_INSTALL) $$d$$p $(DESTDIR)$(autoconflibdir)/$$f"; \ $(nodist_autoconflibDATA_INSTALL) $$d$$p $(DESTDIR)$(autoconflibdir)/$$f; \ done uninstall-nodist_autoconflibDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_autoconflib_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(autoconflibdir)/$$f"; \ rm -f $(DESTDIR)$(autoconflibdir)/$$f; \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile $(DATA) installdirs: $(mkinstalldirs) $(DESTDIR)$(autoconflibdir) $(DESTDIR)$(autoconflibdir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dist_autoconflibDATA \ install-nodist_autoconflibDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_autoconflibDATA uninstall-info-am \ uninstall-nodist_autoconflibDATA .PHONY: CTAGS GTAGS all all-am check check-am check-local clean \ clean-generic ctags distclean distclean-generic distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am \ install-dist_autoconflibDATA install-exec install-exec-am \ install-info install-info-am install-man \ install-nodist_autoconflibDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-dist_autoconflibDATA uninstall-info-am \ uninstall-nodist_autoconflibDATA check-local: check-forbidden-patterns autoconf.m4f: $(autoconf_m4f_dependencies) $(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg # When processing the file with diversion disabled, there must be no # output but comments and empty lines. # If freezing produces output, something went wrong: a bad `divert', # or an improper paren etc. # It may happen that the output does not end with a end of line, hence # force an end of line when reporting errors. .m4.m4f: $(MY_AUTOM4TE) \ --language=$* \ --freeze \ --output=$@ # For parallel builds. $(build_libdir)/m4sugar/version.m4: cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4 check-forbidden-patterns: if (cd $(srcdir) && \ grep $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ sed "s,^,$*.m4: ," &2; \ echo >&2; \ exit 1; \ else \ rm -f forbidden.log; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/lib/autoconf/autoheader.m40000644000175000017500000000775707663136371021043 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Interface with autoheader. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # AH_OUTPUT(KEY, TEXT) # -------------------- # Pass TEXT to autoheader. # This macro is `read' only via `autoconf --trace', it outputs nothing. m4_define([AH_OUTPUT], []) # AH_VERBATIM(KEY, TEMPLATE) # -------------------------- # If KEY is direct (i.e., no indirection such as in KEY=$my_func which # may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader # TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is # output as is, with no formatting. # # Quote for Perl '' strings, which are those used by Autoheader. m4_define([AH_VERBATIM], [AS_LITERAL_IF([$1], [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\\'']))]) ]) # AH_TEMPLATE(KEY, DESCRIPTION) # ----------------------------- # Issue an autoheader template for KEY, i.e., a comment composed of # DESCRIPTION (properly wrapped), and then #undef KEY. m4_define([AH_TEMPLATE], [AH_VERBATIM([$1], m4_text_wrap([$2 */], [ ], [/* ])[ #undef $1])]) # AH_TOP(TEXT) # ------------ # Output TEXT at the top of `config.h.in'. m4_define([AH_TOP], [m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl AH_VERBATIM([0000]_AH_COUNTER, [$1])]) # AH_BOTTOM(TEXT) # --------------- # Output TEXT at the bottom of `config.h.in'. m4_define([AH_BOTTOM], [m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl AH_VERBATIM([zzzz]_AH_COUNTER, [$1])]) # Initialize. m4_define([_AH_COUNTER], [0]) autoconf2.59-2.59+dfsg/lib/autoconf/autoupdate.m40000644000175000017500000001022107663163363021052 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Interface with autoupdate. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. ## --------------------------------- ## ## Defining macros in autoupdate::. ## ## --------------------------------- ## # AU_DEFINE(NAME, GLUE-CODE, [MESSAGE]) # ------------------------------------- # # Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed # wrapping actions required by `autoupdate'. # We do not define anything in `autoconf::'. m4_define([AU_DEFINE], [AC_DEFUN([$1], [$2])]) # AU_DEFUN(NAME, NEW-CODE, [MESSAGE]) # ----------------------------------- # Declare that the macro NAME is now obsoleted, and should be replaced # by NEW-CODE. Tell the user she should run autoupdate, and include # the additional MESSAGE. # # Also define NAME as a macro which code is NEW-CODE. # # This allows to share the same code for both supporting obsoleted macros, # and to update a configure.ac. # See `acobsolete.m4' for a longer description. m4_define([AU_DEFUN], [AU_DEFINE([$1], [AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete. You should run autoupdate.])dnl $2], [$3])dnl ]) # AU_ALIAS(OLD-NAME, NEW-NAME) # ---------------------------- # The OLD-NAME is no longer used, just use NEW-NAME instead. There is # little difference with using AU_DEFUN but the fact there is little # interest in running the test suite on both OLD-NAME and NEW-NAME. # This macro makes it possible to distinguish such cases. # # Do not use `defn' since then autoupdate would replace an old macro # call with the new macro body instead of the new macro call. m4_define([AU_ALIAS], [AU_DEFUN([$1], [$2($][@)])]) autoconf2.59-2.59+dfsg/lib/autoconf/general.m40000644000175000017500000023572307747176500020334 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Parameterized macros. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. ## ---------------- ## ## The diversions. ## ## ---------------- ## # We heavily use m4's diversions both for the initializations and for # required macros (see AC_REQUIRE), because in both cases we have to # issue high in `configure' something which is discovered late. # # KILL is only used to suppress output. # # The layers of `configure'. We let m4 undivert them by itself, when # it reaches the end of `configure.ac'. # # - BINSH # #! /bin/sh # - HEADER-REVISION # Sent by AC_REVISION # - HEADER-COMMENT # Purpose of the script. # - HEADER-COPYRIGHT # Copyright notice(s) # - M4SH-INIT # Initialization of bottom layers. # # - DEFAULTS # early initializations (defaults) # - PARSE_ARGS # initialization code, option handling loop. # # - HELP_BEGIN # Handling `configure --help'. # - HELP_CANON # Help msg for AC_CANONICAL_* # - HELP_ENABLE # Help msg from AC_ARG_ENABLE. # - HELP_WITH # Help msg from AC_ARG_WITH. # - HELP_VAR # Help msg from AC_ARG_VAR. # - HELP_VAR_END # A small paragraph on the use of the variables. # - HELP_END # Tail of the handling of --help. # # - VERSION_BEGIN # Head of the handling of --version. # - VERSION_FSF # FSF copyright notice for --version. # - VERSION_USER # User copyright notice for --version. # - VERSION_END # Tail of the handling of --version. # # - INIT_PREPARE # Tail of initialization code. # # - BODY # the tests and output code # # _m4_divert(DIVERSION-NAME) # -------------------------- # Convert a diversion name into its number. Otherwise, return # DIVERSION-NAME which is supposed to be an actual diversion number. # Of course it would be nicer to use m4_case here, instead of zillions # of little macros, but it then takes twice longer to run `autoconf'! # # From M4sugar: # -1. KILL # 10000. GROW # # From M4sh: # 0. BINSH # 1. HEADER-REVISION # 2. HEADER-COMMENT # 3. HEADER-COPYRIGHT # 4. M4SH-INIT # 1000. BODY m4_define([_m4_divert(DEFAULTS)], 10) m4_define([_m4_divert(PARSE_ARGS)], 20) m4_define([_m4_divert(HELP_BEGIN)], 100) m4_define([_m4_divert(HELP_CANON)], 101) m4_define([_m4_divert(HELP_ENABLE)], 102) m4_define([_m4_divert(HELP_WITH)], 103) m4_define([_m4_divert(HELP_VAR)], 104) m4_define([_m4_divert(HELP_VAR_END)], 105) m4_define([_m4_divert(HELP_END)], 106) m4_define([_m4_divert(VERSION_BEGIN)], 200) m4_define([_m4_divert(VERSION_FSF)], 201) m4_define([_m4_divert(VERSION_USER)], 202) m4_define([_m4_divert(VERSION_END)], 203) m4_define([_m4_divert(INIT_PREPARE)], 300) # AC_DIVERT_PUSH(DIVERSION-NAME) # AC_DIVERT_POP # ------------------------------ m4_copy([m4_divert_push],[AC_DIVERT_PUSH]) m4_copy([m4_divert_pop], [AC_DIVERT_POP]) ## ------------------------------------ ## ## Defining/requiring Autoconf macros. ## ## ------------------------------------ ## # AC_DEFUN(NAME, EXPANSION) # AC_DEFUN_ONCE(NAME, EXPANSION) # AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME) # AC_REQUIRE(STRING) # AC_PROVIDE(MACRO-NAME) # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- m4_copy([m4_defun], [AC_DEFUN]) m4_copy([m4_defun_once], [AC_DEFUN_ONCE]) m4_copy([m4_before], [AC_BEFORE]) m4_copy([m4_require], [AC_REQUIRE]) m4_copy([m4_provide], [AC_PROVIDE]) m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE]) # AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION]) # ------------------------------------------ m4_define([AC_OBSOLETE], [AC_DIAGNOSE([obsolete], [$1 is obsolete$2])]) ## ----------------------------- ## ## Implementing Autoconf loops. ## ## ----------------------------- ## # AC_FOREACH(VARIABLE, LIST, EXPRESSION) # -------------------------------------- # # Compute EXPRESSION assigning to VARIABLE each value of the LIST. # LIST is a /bin/sh list, i.e., it has the form ` item_1 item_2 # ... item_n ': white spaces are separators, and leading and trailing # spaces are meaningless. # # This macro is robust to active symbols: # AC_FOREACH([Var], [ active # b act\ # ive ], [-Var-])end # => -active--b--active-end m4_define([AC_FOREACH], [m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])]) ## ----------------------------------- ## ## Helping macros to display strings. ## ## ----------------------------------- ## # AU::AC_HELP_STRING(LHS, RHS, [COLUMN]) # -------------------------------------- AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING]) ## ---------------------------------------------- ## ## Information on the package being Autoconf'ed. ## ## ---------------------------------------------- ## # It is suggested that the macros in this section appear before # AC_INIT in `configure.ac'. Nevertheless, this is just stylistic, # and from the implementation point of, AC_INIT *must* be expanded # beforehand: it puts data in diversions which must appear before the # data provided by the macros of this section. # The solution is to require AC_INIT in each of these macros. AC_INIT # has the needed magic so that it can't be expanded twice. # _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME]) # -------------------------------------------------------------- m4_define([_AC_INIT_PACKAGE], [AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])]) AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])]) AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])]) m4_ifndef([AC_PACKAGE_NAME], [m4_define([AC_PACKAGE_NAME], [$1])]) m4_ifndef([AC_PACKAGE_TARNAME], [m4_define([AC_PACKAGE_TARNAME], m4_default([$4], [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]], [GNU ])), [[^_abcdefghijklmnopqrstuvwxyz0123456789]], [-])]))]) m4_ifndef([AC_PACKAGE_VERSION], [m4_define([AC_PACKAGE_VERSION], [$2])]) m4_ifndef([AC_PACKAGE_STRING], [m4_define([AC_PACKAGE_STRING], [$1 $2])]) m4_ifndef([AC_PACKAGE_BUGREPORT], [m4_define([AC_PACKAGE_BUGREPORT], [$3])]) ]) # AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER]) # ------------------------------------------------------ # Append Copyright information in the top of `configure'. TEXT is # evaluated once, hence TEXT can use macros. Note that we do not # prepend `# ' but `@%:@ ', since m4 does not evaluate the comments. # Had we used `# ', the Copyright sent in the beginning of `configure' # would have not been evaluated. Another solution, a bit fragile, # would have be to use m4_quote to force an evaluation: # # m4_bpatsubst(m4_quote($1), [^], [# ]) m4_define([AC_COPYRIGHT], [m4_divert_text([HEADER-COPYRIGHT], [m4_bpatsubst([ $1], [^], [@%:@ ])])dnl m4_divert_text(m4_default([$2], [VERSION_USER]), [ $1])dnl ])# AC_COPYRIGHT # AC_REVISION(REVISION-INFO) # -------------------------- # The second quote in the translit is just to cope with font-lock-mode # which sees the opening of a string. m4_define([AC_REVISION], [m4_divert_text([HEADER-REVISION], [@%:@ From __file__ m4_translit([$1], [$""]).])dnl ]) ## ---------------------------------------- ## ## Requirements over the Autoconf version. ## ## ---------------------------------------- ## # AU::AC_PREREQ(VERSION) # ---------------------- # Update this `AC_PREREQ' statement to require the current version of # Autoconf. But fail if ever this autoupdate is too old. # # Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before # calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be # quite complex for autoupdate to import the value of # `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but # this would replace all its occurrences with the current version of # Autoconf, which is certainly not what the user intended. AU_DEFUN([AC_PREREQ], [m4_version_prereq([$1])[]dnl [AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]]) # AC_PREREQ(VERSION) # ------------------ # Complain and exit if the Autoconf version is less than VERSION. m4_copy([m4_version_prereq], [AC_PREREQ]) ## ---------------- ## ## Initialization. ## ## ---------------- ## # All the following macros are used by AC_INIT. Ideally, they should # be presented in the order in which they are output. Please, help us # sorting it, or at least, don't augment the entropy. # _AC_INIT_NOTICE # --------------- m4_define([_AC_INIT_NOTICE], [m4_divert_text([HEADER-COMMENT], [@%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by m4_PACKAGE_STRING[]dnl m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).]) m4_ifset([AC_PACKAGE_BUGREPORT], [m4_divert_text([HEADER-COMMENT], [@%:@ @%:@ Report bugs to .])]) ]) # _AC_INIT_COPYRIGHT # ------------------ # We dump to VERSION_FSF to make sure we are inserted before the # user copyrights, and after the setup of the --version handling. m4_define([_AC_INIT_COPYRIGHT], [AC_COPYRIGHT( [Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it.], [VERSION_FSF])dnl ]) # File Descriptors # ---------------- # Set up the file descriptors used by `configure'. # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # AS_MESSAGE_LOG_FD compiler messages saved in config.log # AS_MESSAGE_FD checking for... messages and results m4_define([AS_MESSAGE_FD], 6) # That's how they used to be named. AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD]) AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD]) # _AC_INIT_DEFAULTS # ----------------- # Values which defaults can be set from `configure.ac'. # `/bin/machine' is used in `glibcbug'. The others are used in config.* m4_define([_AC_INIT_DEFAULTS], [m4_divert_push([DEFAULTS])dnl # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec AS_MESSAGE_FD>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl AC_SUBST([PATH_SEPARATOR])dnl # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl m4_divert_pop([DEFAULTS])dnl m4_wrap([m4_divert_text([DEFAULTS], [ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])' ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])'])])dnl ])# _AC_INIT_DEFAULTS # AC_PREFIX_DEFAULT(PREFIX) # ------------------------- AC_DEFUN([AC_PREFIX_DEFAULT], [m4_divert_text([DEFAULTS], [ac_default_prefix=$1])]) # AC_PREFIX_PROGRAM(PROGRAM) # -------------------------- # Guess the value for the `prefix' variable by looking for # the argument program along PATH and taking its parent. # Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, # set `prefix' to /usr/local/gnu. # This comes too late to find a site file based on the prefix, # and it might use a cached value for the path. # No big loss, I think, since most configures don't use this macro anyway. AC_DEFUN([AC_PREFIX_PROGRAM], [if test "x$prefix" = xNONE; then dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. _AS_ECHO_N([checking for prefix by ]) AC_PATH_PROG(ac_prefix_program, [$1]) if test -n "$ac_prefix_program"; then prefix=`AS_DIRNAME(["$ac_prefix_program"])` prefix=`AS_DIRNAME(["$prefix"])` fi fi ])# AC_PREFIX_PROGRAM # AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR]) # --------------------------------------------- # UNIQUE-FILE-IN-SOURCE-DIR is a filename unique to this package, # relative to the directory that configure is in, which we can look # for to find out if srcdir is correct. AC_DEFUN([AC_CONFIG_SRCDIR], [m4_divert_text([DEFAULTS], [ac_unique_file="$1"])]) # _AC_INIT_SRCDIR # --------------- # Compute `srcdir' based on `$ac_unique_file'. m4_define([_AC_INIT_SRCDIR], [m4_divert_push([PARSE_ARGS])dnl # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`AS_DIRNAME(["$[0]"])` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $ac_confdir or ..]) else AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir]) fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || AC_MSG_ERROR([sources are in $srcdir, but `cd $srcdir' does not work]) dnl Double slashes in pathnames in object file debugging info dnl mess up M-x gdb in Emacs. srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'` m4_divert_pop([PARSE_ARGS])dnl ])# _AC_INIT_SRCDIR # _AC_INIT_PARSE_ARGS # ------------------- m4_define([_AC_INIT_PARSE_ARGS], [m4_divert_push([PARSE_ARGS])dnl # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null AC_SUBST(exec_prefix, NONE)dnl no_create= no_recursion= AC_SUBST(prefix, NONE)dnl program_prefix=NONE program_suffix=NONE AC_SUBST(program_transform_name, [s,x,x,])dnl silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl AC_SUBST([datadir], ['${prefix}/share'])dnl AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl AC_SUBST([localstatedir], ['${prefix}/var'])dnl AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl AC_SUBST([includedir], ['${prefix}/include'])dnl AC_SUBST([oldincludedir], ['/usr/include'])dnl AC_SUBST([infodir], ['${prefix}/info'])dnl AC_SUBST([mandir], ['${prefix}/man'])dnl ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid feature name: $ac_feature]) ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid feature name: $ac_feature]) ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid package name: $ac_package]) ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid package name: $ac_package]) ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) AC_MSG_ERROR([unrecognized option: $ac_option Try `$[0] --help' for more information.]) ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null && AC_MSG_ERROR([invalid variable name: $ac_envvar]) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. AC_MSG_WARN([you should use --build, --host, --target]) expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null && AC_MSG_WARN([invalid host type: $ac_option]) : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` AC_MSG_ERROR([missing argument to $ac_option]) fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;; *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [[\\/$]]* | ?:[[\\/]]* ) ;; *) AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]);; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe AC_MSG_WARN([If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used.]) elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null m4_divert_pop([PARSE_ARGS])dnl ])# _AC_INIT_PARSE_ARGS # _AC_INIT_HELP # ------------- # Handle the `configure --help' message. m4_define([_AC_INIT_HELP], [m4_divert_push([HELP_BEGIN])dnl # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures m4_ifset([AC_PACKAGE_STRING], [AC_PACKAGE_STRING], [this package]) to adapt to many kinds of systems. Usage: $[0] [[OPTION]]... [[VAR=VALUE]]... [To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF] m4_divert_pop([HELP_BEGIN])dnl dnl The order of the diversions here is dnl - HELP_BEGIN dnl which may be extended by extra generic options such as with X or dnl AC_ARG_PROGRAM. Displayed only in long --help. dnl dnl - HELP_CANON dnl Support for cross compilation (--build, --host and --target). dnl Display only in long --help. dnl dnl - HELP_ENABLE dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section, dnl then implements the header of the non generic options. dnl dnl - HELP_WITH dnl dnl - HELP_VAR dnl dnl - HELP_VAR_END dnl dnl - HELP_END dnl initialized below, in which we dump the trailer (handling of the dnl recursion for instance). m4_divert_push([HELP_ENABLE])dnl _ACEOF fi if test -n "$ac_init_help"; then m4_ifset([AC_PACKAGE_STRING], [ case $ac_init_help in short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";; esac]) cat <<\_ACEOF m4_divert_pop([HELP_ENABLE])dnl m4_divert_push([HELP_END])dnl m4_ifset([AC_PACKAGE_BUGREPORT], [ Report bugs to .]) _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue _AC_SRCPATHS(["$ac_dir"]) cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else AC_MSG_WARN([no configuration information is in $ac_dir]) fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 m4_divert_pop([HELP_END])dnl ])# _AC_INIT_HELP # _AC_INIT_VERSION # ---------------- # Handle the `configure --version' message. m4_define([_AC_INIT_VERSION], [m4_divert_text([VERSION_BEGIN], [if $ac_init_version; then cat <<\_ACEOF])dnl m4_ifset([AC_PACKAGE_STRING], [m4_divert_text([VERSION_BEGIN], [dnl m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) generated by m4_PACKAGE_STRING])]) m4_divert_text([VERSION_END], [_ACEOF exit 0 fi])dnl ])# _AC_INIT_VERSION # _AC_INIT_CONFIG_LOG # ------------------- # Initialize the config.log file descriptor and write header to it. m4_define([_AC_INIT_CONFIG_LOG], [m4_divert_text([INIT_PREPARE], [m4_define([AS_MESSAGE_LOG_FD], 5)dnl exec AS_MESSAGE_LOG_FD>config.log cat >&AS_MESSAGE_LOG_FD <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was generated by m4_PACKAGE_STRING. Invocation command line was $ $[0] $[@] _ACEOF AS_UNAME >&AS_MESSAGE_LOG_FD cat >&AS_MESSAGE_LOG_FD <<_ACEOF m4_text_box([Core tests.]) _ACEOF ])])# _AC_INIT_CONFIG_LOG # _AC_INIT_PREPARE # ---------------- # Called by AC_INIT to build the preamble of the `configure' scripts. # 1. Trap and clean up various tmp files. # 2. Set up the fd and output files # 3. Remember the options given to `configure' for `config.status --recheck'. # 4. Ensure a correct environment # 5. Required macros (cache, default AC_SUBST etc.) m4_define([_AC_INIT_PREPARE], [m4_divert_push([INIT_PREPARE])dnl # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; dnl If you change this globbing pattern, test it on an old shell -- dnl it's sensitive. Putting any kind of quote in it causes syntax errors. [ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)] ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" dnl If trying to remove duplicates, be sure to (i) keep the *last* dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only), dnl and (ii) not to strip long options (--prefix foo --prefix bar might dnl give --prefix foo bar). if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in dnl Use broad patterns, as arguments that would have already made configure dnl exit don't matter. *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done AS_UNSET(ac_configure_args0) AS_UNSET(ac_configure_args1) # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo AS_BOX([Cache variables.]) echo m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]), [^ *\(#.*\)? ], [], ['], ['"'"']) echo AS_BOX([Output variables.]) echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then AS_BOX([Output files.]) echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then AS_BOX([confdefs.h.]) echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&AS_MESSAGE_LOG_FD rm -f core *.core && rm -rf conftest* confdefs* conf$[$]* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"], [Define to the full name of this package.]) AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"], [Define to the one symbol short name of this package.]) AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"], [Define to the version of this package.]) AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"], [Define to the full name and version of this package.]) AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"], [Define to the address where bug reports for this package should be sent.]) # Let the site file select an alternate cache file if it wants to. AC_SITE_LOAD AC_CACHE_LOAD _AC_ARG_VAR_VALIDATE _AC_ARG_VAR_PRECIOUS([build_alias])dnl _AC_ARG_VAR_PRECIOUS([host_alias])dnl _AC_ARG_VAR_PRECIOUS([target_alias])dnl AC_LANG_PUSH(C) dnl Substitute for predefined variables. AC_SUBST([DEFS])dnl AC_SUBST([ECHO_C])dnl AC_SUBST([ECHO_N])dnl AC_SUBST([ECHO_T])dnl AC_SUBST([LIBS])dnl m4_divert_pop([INIT_PREPARE])dnl ])# _AC_INIT_PREPARE # AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR]) # ---------------------------------------- # This macro is used only for Autoupdate. AU_DEFUN([AC_INIT], [m4_ifval([$2], [[AC_INIT($@)]], [m4_ifval([$1], [[AC_INIT] AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl ]) # AC_INIT([PACKAGE, VERSION, [BUG-REPORT]) # ---------------------------------------- # Include the user macro files, prepare the diversions, and output the # preamble of the `configure' script. # Note that the order is important: first initialize, then set the # AC_CONFIG_SRCDIR. m4_define([AC_INIT], [# Forbidden tokens and exceptions. m4_pattern_forbid([^_?A[CHUM]_]) m4_pattern_forbid([_AC_]) m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) # Actually reserved by M4sh. m4_pattern_allow([^AS_FLAGS$]) AS_INIT AS_PREPARE m4_ifval([$2], [_AC_INIT_PACKAGE($@)]) _AC_INIT_DEFAULTS _AC_INIT_PARSE_ARGS _AC_INIT_SRCDIR _AC_INIT_HELP _AC_INIT_VERSION _AC_INIT_CONFIG_LOG _AC_INIT_PREPARE _AC_INIT_NOTICE _AC_INIT_COPYRIGHT m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl ]) ## ----------------------------- ## ## Selecting optional features. ## ## ----------------------------- ## # AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------------------ AC_DEFUN([AC_ARG_ENABLE], [m4_divert_once([HELP_ENABLE], [[ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl m4_divert_once([HELP_ENABLE], [$2])dnl # Check whether --enable-$1 or --disable-$1 was given. if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then enableval="[$enable_]m4_bpatsubst([$1], -, _)" $3 m4_ifvaln([$4], [else $4])dnl fi; dnl ])# AC_ARG_ENABLE AU_DEFUN([AC_ENABLE], [AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])]) ## ------------------------------ ## ## Working with optional software ## ## ------------------------------ ## # AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE]) # -------------------------------------------------------------------- AC_DEFUN([AC_ARG_WITH], [m4_divert_once([HELP_WITH], [[ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]]) m4_divert_once([HELP_WITH], [$2])dnl # Check whether --with-$1 or --without-$1 was given. if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then withval="[$with_]m4_bpatsubst([$1], -, _)" $3 m4_ifvaln([$4], [else $4])dnl fi; dnl ])# AC_ARG_WITH AU_DEFUN([AC_WITH], [AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])]) ## ----------------------------------------- ## ## Remembering variables for reconfiguring. ## ## ----------------------------------------- ## # _AC_ARG_VAR_PRECIOUS(VARNAME) # ----------------------------- # Declare VARNAME is precious. # # We try to diagnose when precious variables have changed. To do this, # make two early snapshots (after the option processing to take # explicit variables into account) of those variables: one (ac_env_) # which represents the current run, and a second (ac_cv_env_) which, # at the first run, will be saved in the cache. As an exception to # the cache mechanism, its loading will override these variables (non # `ac_cv_env_' cache value are only set when unset). # # In subsequent runs, after having loaded the cache, compare # ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE. m4_define([_AC_ARG_VAR_PRECIOUS], [AC_SUBST([$1])dnl m4_divert_once([PARSE_ARGS], [ac_env_$1_set=${$1+set} ac_env_$1_value=$$1 ac_cv_env_$1_set=${$1+set} ac_cv_env_$1_value=$$1])dnl ]) # _AC_ARG_VAR_VALIDATE # -------------------- # The precious variables are saved twice at the beginning of # configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_SET' and # `ac_env_PRECIOUS_VALUE' on the one hand and `ac_cv_env_PRECIOUS_SET' # and `ac_cv_env_PRECIOUS_VALUE' on the other hand. # # Now the cache has just been loaded, so `ac_cv_env_' represents the # content of the cached values, while `ac_env_' represents that of the # current values. # # So we check that `ac_env_' and `ac_cv_env_' are consistent. If # they aren't, die. m4_define([_AC_ARG_VAR_VALIDATE], [# Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2) ac_cache_corrupted=: ;; ,set) AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2) ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2) AS_MESSAGE([ former value: $ac_old_val], 2) AS_MESSAGE([ current value: $ac_new_val], 2) ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in dnl If you change this globbing pattern, test it on an old shell -- dnl it's sensitive. Putting any kind of quote in it causes syntax errors. [ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)] ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then AS_MESSAGE([error: changes in the environment can compromise the build], 2) AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over]) fi ])# _AC_ARG_VAR_VALIDATE # AC_ARG_VAR(VARNAME, DOCUMENTATION) # ---------------------------------- # Register VARNAME as a precious variable, and document it in # `configure --help' (but only once). AC_DEFUN([AC_ARG_VAR], [m4_divert_once([HELP_VAR], [[ Some influential environment variables:]])dnl m4_divert_once([HELP_VAR_END], [[ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations.]])dnl m4_expand_once([m4_divert_once([HELP_VAR], [AS_HELP_STRING([$1], [$2], [ ])])], [$0($1)])dnl _AC_ARG_VAR_PRECIOUS([$1])dnl ])# AC_ARG_VAR ## ---------------------------- ## ## Transforming program names. ## ## ---------------------------- ## # AC_ARG_PROGRAM # -------------- # This macro is expanded only once, to avoid that `foo' ends up being # installed as `ggfoo'. AC_DEFUN_ONCE([AC_ARG_PROGRAM], [dnl Document the options. m4_divert_push([HELP_BEGIN])dnl Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names m4_divert_pop([HELP_BEGIN])dnl test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed [s/[\\$]/&&/g;s/;s,x,x,$//] _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed ])# AC_ARG_PROGRAM ## ------------------------- ## ## Finding auxiliary files. ## ## ------------------------- ## # AC_CONFIG_AUX_DIR(DIR) # ---------------------- # Find install-sh, config.sub, config.guess, and Cygnus configure # in directory DIR. These are auxiliary files used in configuration. # DIR can be either absolute or relative to $srcdir. AC_DEFUN([AC_CONFIG_AUX_DIR], [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)]) # AC_CONFIG_AUX_DIR_DEFAULT # ------------------------- # The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'. # There's no need to call this macro explicitly; just AC_REQUIRE it. AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT], [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)]) # AC_CONFIG_AUX_DIRS(DIR ...) # --------------------------- # Internal subroutine. # Search for the configuration auxiliary files in directory list $1. # We look only for install-sh, so users of AC_PROG_INSTALL # do not automatically need to distribute the other auxiliary files. AC_DEFUN([AC_CONFIG_AUX_DIRS], [ac_aux_dir= for ac_dir in $1; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then AC_MSG_ERROR([cannot find install-sh or install.sh in $1]) fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl ])# AC_CONFIG_AUX_DIRS ## ------------------------ ## ## Finding aclocal macros. ## ## ------------------------ ## # AC_CONFIG_MACRO_DIR(DIR) # ------------------------ # Declare directory containing additional macros for aclocal. # DIR can be either absolute or relative to $srcdir. AC_DEFUN([AC_CONFIG_MACRO_DIR], [case $1 in [[\\/]]* | ?:[[\\/]]* ) ac_macro_dir=$1 ;; *) ac_macro_dir=$srcdir/$1 ;; esac if test -d "$ac_macro_dir"; then : else AC_MSG_ERROR([cannot find macro directory `$1']) fi ])# AC_CONFIG_MACRO_DIR ## ----------------------------------- ## ## Getting the canonical system type. ## ## ----------------------------------- ## # The inputs are: # configure --host=HOST --target=TARGET --build=BUILD # # The rules are: # 1. Build defaults to the current platform, as determined by config.guess. # 2. Host defaults to build. # 3. Target defaults to host. # _AC_CANONICAL_SPLIT(THING) # -------------------------- # Generate the variables THING, THING_{alias cpu vendor os}. m4_define([_AC_CANONICAL_SPLIT], [AC_SUBST([$1], [$ac_cv_$1])dnl dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl AC_SUBST([$1_cpu], [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl AC_SUBST([$1_vendor], [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl AC_SUBST([$1_os], [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl ])# _AC_CANONICAL_SPLIT # AC_CANONICAL_BUILD # ------------------ AC_DEFUN_ONCE([AC_CANONICAL_BUILD], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl m4_divert_text([HELP_CANON], [[ System types: --build=BUILD configure for building on BUILD [guessed]]])dnl # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || AC_MSG_ERROR([cannot run $ac_config_sub]) AC_CACHE_CHECK([build system type], [ac_cv_build], [ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && AC_MSG_ERROR([cannot guess build type; you must specify one]) ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed]) ]) _AC_CANONICAL_SPLIT(build) ])# AC_CANONICAL_BUILD # AC_CANONICAL_HOST # ----------------- AC_DEFUN_ONCE([AC_CANONICAL_HOST], [AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_divert_text([HELP_CANON], [[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl AC_CACHE_CHECK([host system type], [ac_cv_host], [ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed]) ]) _AC_CANONICAL_SPLIT([host]) ])# AC_CANONICAL_HOST # AC_CANONICAL_TARGET # ------------------- AC_DEFUN_ONCE([AC_CANONICAL_TARGET], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl m4_divert_text([HELP_CANON], [[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl AC_CACHE_CHECK([target system type], [ac_cv_target], [dnl Set target_alias. ac_cv_target_alias=$target_alias test "x$ac_cv_target_alias" = "x" && ac_cv_target_alias=$ac_cv_host_alias ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed]) ]) _AC_CANONICAL_SPLIT([target]) # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}-[]dnl ])# AC_CANONICAL_TARGET AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET]) # AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD]) # ------------------------------------------ # If the cache file is inconsistent with the current host, # target and build system types, execute CMD or print a default # error message. Now handled via _AC_ARG_VAR_PRECIOUS. AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) ## ---------------------- ## ## Caching test results. ## ## ---------------------- ## # AC_SITE_LOAD # ------------ # Look for site or system specific initialization scripts. m4_define([AC_SITE_LOAD], [# Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then AC_MSG_NOTICE([loading site script $ac_site_file]) sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD . "$ac_site_file" fi done ]) # AC_CACHE_LOAD # ------------- m4_define([AC_CACHE_LOAD], [if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then AC_MSG_NOTICE([loading cache $cache_file]) case $cache_file in [[\\/]]* | ?:[[\\/]]* ) . $cache_file;; *) . ./$cache_file;; esac fi else AC_MSG_NOTICE([creating cache $cache_file]) >$cache_file fi ])# AC_CACHE_LOAD # _AC_CACHE_DUMP # -------------- # Dump the cache to stdout. It can be in a pipe (this is a requirement). m4_define([_AC_CACHE_DUMP], [# The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ ["s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"] ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"] ;; esac; }dnl ])# _AC_CACHE_DUMP # AC_CACHE_SAVE # ------------- # Save the cache. # Allow a site initialization script to override cache values. m4_define([AC_CACHE_SAVE], [cat >confcache <<\_ACEOF # 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, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF _AC_CACHE_DUMP() | sed [' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end'] >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache[]dnl ])# AC_CACHE_SAVE # AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) # ------------------------------------------ # The name of shell var CACHE-ID must contain `_cv_' in order to get saved. # Should be dnl'ed. Try to catch common mistakes. m4_defun([AC_CACHE_VAL], [m4_bmatch([$2], [AC_DEFINE], [AC_DIAGNOSE(syntax, [$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl [where no actions should be taken])])dnl AS_VAR_SET_IF([$1], [_AS_ECHO_N([(cached) ])], [$2])]) # AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS) # ------------------------------------------- # Do not call this macro with a dnl right behind. m4_defun([AC_CACHE_CHECK], [AC_MSG_CHECKING([$1]) AC_CACHE_VAL([$2], [$3])dnl AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])]) ## ---------------------- ## ## Defining CPP symbols. ## ## ---------------------- ## # AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL) # ------------------------------------------- # This macro is useless, it is used only with --trace to collect the # list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED. m4_define([AC_DEFINE_TRACE_LITERAL]) # AC_DEFINE_TRACE(CPP-SYMBOL) # --------------------------- # This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters # out non literal symbols. m4_define([AC_DEFINE_TRACE], [AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])]) # AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION]) # ------------------------------------------- # Set VARIABLE to VALUE, verbatim, or 1. Remember the value # and if VARIABLE is affected the same VALUE, do nothing, else # die. The third argument is used by autoheader. m4_define([AC_DEFINE], [AC_DEFINE_TRACE([$1])dnl m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl cat >>confdefs.h <<\_ACEOF [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1) _ACEOF ]) # AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION]) # ---------------------------------------------------- # Similar, but perform shell substitutions $ ` \ once on VALUE. m4_define([AC_DEFINE_UNQUOTED], [AC_DEFINE_TRACE([$1])dnl m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl cat >>confdefs.h <<_ACEOF [@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1) _ACEOF ]) ## -------------------------- ## ## Setting output variables. ## ## -------------------------- ## # AC_SUBST(VARIABLE, [VALUE]) # --------------------------- # Create an output variable from a shell VARIABLE. If VALUE is given # assign it to VARIABLE. Use `""' is you want to set VARIABLE to an # empty value, not an empty second argument. # # Beware that if you change this macro, you also have to change the # sed script at the top of _AC_OUTPUT_FILES. m4_define([AC_SUBST], [m4_ifvaln([$2], [$1=$2])[]dnl m4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl ])# AC_SUBST # AC_SUBST_FILE(VARIABLE) # ----------------------- # Read the comments of the preceding macro. m4_define([AC_SUBST_FILE], [m4_append_uniq([_AC_SUBST_FILES], [$1], [ ])]) ## --------------------------------------- ## ## Printing messages at autoconf runtime. ## ## --------------------------------------- ## # In fact, I think we should promote the use of m4_warn and m4_fatal # directly. This will also avoid to some people to get it wrong # between AC_FATAL and AC_MSG_ERROR. # AC_DIAGNOSE(CATEGORY, MESSAGE) # AC_FATAL(MESSAGE, [EXIT-STATUS]) # -------------------------------- m4_define([AC_DIAGNOSE], [m4_warn($@)]) m4_define([AC_FATAL], [m4_fatal($@)]) # AC_WARNING(MESSAGE) # ------------------- # Report a MESSAGE to the user of autoconf if `-W' or `-W all' was # specified. m4_define([AC_WARNING], [AC_DIAGNOSE([syntax], [$1])]) ## ---------------------------------------- ## ## Printing messages at configure runtime. ## ## ---------------------------------------- ## # AC_MSG_CHECKING(FEATURE) # ------------------------ m4_define([AC_MSG_CHECKING], [_AS_ECHO([$as_me:$LINENO: checking $1], AS_MESSAGE_LOG_FD) _AS_ECHO_N([checking $1... ])[]dnl ]) # AC_MSG_RESULT(RESULT) # --------------------- m4_define([AC_MSG_RESULT], [_AS_ECHO([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD) _AS_ECHO([${ECHO_T}$1])[]dnl ]) # AC_MSG_RESULT_UNQUOTED(RESULT) # ------------------------------ # Likewise, but perform $ ` \ shell substitutions. m4_define([AC_MSG_RESULT_UNQUOTED], [_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD) _AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl ]) # AC_MSG_WARN(PROBLEM) # AC_MSG_NOTICE(STRING) # AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1]) # AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1]) # ---------------------------------------- m4_copy([AS_WARN], [AC_MSG_WARN]) m4_copy([AS_MESSAGE], [AC_MSG_NOTICE]) m4_copy([AS_ERROR], [AC_MSG_ERROR]) m4_define([AC_MSG_FAILURE], [AC_MSG_ERROR([$1 See `config.log' for more details.], [$2])]) # _AC_MSG_LOG_CONFTEST # -------------------- m4_define([_AC_MSG_LOG_CONFTEST], [echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD ]) # AU::AC_CHECKING(FEATURE) # ------------------------ AU_DEFUN([AC_CHECKING], [AS_MESSAGE([checking $1...])]) # AU::AC_VERBOSE(STRING) # ---------------------- AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT]) ## ---------------------------- ## ## Compiler-running mechanics. ## ## ---------------------------- ## # _AC_RUN_LOG(COMMAND, LOG-COMMANDS) # ---------------------------------- # Eval COMMAND, save the exit status in ac_status, and log it. AC_DEFUN([_AC_RUN_LOG], [{ ($2) >&AS_MESSAGE_LOG_FD ($1) 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS) # ----------------------------------------- # Run COMMAND, save its stderr into conftest.err, save the exit status # in ac_status, and log it. Don't forget to clean up conftest.err after # use. # Note that when tracing, most shells will leave the traces in stderr # starting with "+": that's what this macro tries to address. AC_DEFUN([_AC_RUN_LOG_STDERR], [{ ($2) >&AS_MESSAGE_LOG_FD ($1) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # _AC_EVAL(COMMAND) # ----------------- # Eval COMMAND, save the exit status in ac_status, and log it. AC_DEFUN([_AC_EVAL], [_AC_RUN_LOG([eval $1], [eval echo "$as_me:$LINENO: \"$1\""])]) # _AC_EVAL_STDERR(COMMAND) # ------------------------ # Same as _AC_RUN_LOG_STDERR, but evals (instead of the running) the # COMMAND. AC_DEFUN([_AC_EVAL_STDERR], [_AC_RUN_LOG_STDERR([eval $1], [eval echo "$as_me:$LINENO: \"$1\""])]) # AC_TRY_EVAL(VARIABLE) # --------------------- # The purpose of this macro is to "configure:123: command line" # written into config.log for every test run. AC_DEFUN([AC_TRY_EVAL], [_AC_EVAL([$$1])]) # AC_TRY_COMMAND(COMMAND) # ----------------------- AC_DEFUN([AC_TRY_COMMAND], [{ ac_try='$1' _AC_EVAL([$ac_try]); }]) # AC_RUN_LOG(COMMAND) # ------------------- AC_DEFUN([AC_RUN_LOG], [_AC_RUN_LOG([$1], [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])]) ## ------------------------ ## ## Examining declarations. ## ## ------------------------ ## # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ---------------------------------------------------------------- # Try to preprocess PROGRAM. # # This macro can be used during the selection of a preprocessor. # Run cpp and set ac_cpp_err to "yes" for an error, to # "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if # neither warnings nor errors have been detected. eval is necessary # to expand ac_cpp. AC_DEFUN([_AC_PREPROC_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_[]_AC_LANG_ABBREV[]_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then m4_default([$2], :) else _AC_MSG_LOG_CONFTEST $3 fi rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _AC_PREPROC_IFELSE # AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------- # Try to preprocess PROGRAM. Requires that the preprocessor for the # current language was checked for, hence do not use this macro in macros # looking for a preprocessor. AC_DEFUN([AC_PREPROC_IFELSE], [AC_LANG_PREPROC_REQUIRE()dnl _AC_PREPROC_IFELSE($@)]) # AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------- # AC_TRY_CPP is used to check whether particular header files exist. # (But it actually tests whether INCLUDES produces no CPP errors.) # # INCLUDES are not defaulted and are double quoted. AU_DEFUN([AC_TRY_CPP], [AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])]) # AC_EGREP_CPP(PATTERN, PROGRAM, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------------------ # Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must # come early, it is not included in AC_BEFORE checks. AC_DEFUN([AC_EGREP_CPP], [AC_LANG_PREPROC_REQUIRE()dnl AC_REQUIRE([AC_PROG_EGREP])dnl AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) dnl eval is necessary to expand ac_cpp. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | dnl Quote $1 to prevent m4 from eating character classes $EGREP "[$1]" >/dev/null 2>&1; then m4_default([$3], :) m4_ifvaln([$4], [else $4])dnl fi rm -f conftest* ])# AC_EGREP_CPP # AC_EGREP_HEADER(PATTERN, HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------- AC_DEFUN([AC_EGREP_HEADER], [AC_EGREP_CPP([$1], [#include <$2> ], [$3], [$4])]) ## ------------------ ## ## Examining syntax. ## ## ------------------ ## # _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------- # Try to compile PROGRAM. # This macro can be used during the selection of a compiler. m4_define([_AC_COMPILE_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest.$ac_objext AS_IF([_AC_EVAL_STDERR($ac_compile) && AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) && AC_TRY_COMMAND([test -s conftest.$ac_objext])], [$2], [_AC_MSG_LOG_CONFTEST m4_ifvaln([$3],[$3])dnl])dnl rm -f conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _AC_COMPILE_IFELSE # AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------------------- # Try to compile PROGRAM. Requires that the compiler for the current # language was checked for, hence do not use this macro in macros looking # for a compiler. AC_DEFUN([AC_COMPILE_IFELSE], [AC_LANG_COMPILER_REQUIRE()dnl _AC_COMPILE_IFELSE($@)]) # AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- AU_DEFUN([AC_TRY_COMPILE], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])]) ## --------------------- ## ## Examining libraries. ## ## --------------------- ## # _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------------------------------ # Try to link PROGRAM. # This macro can be used during the selection of a compiler. m4_define([_AC_LINK_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest.$ac_objext conftest$ac_exeext AS_IF([_AC_EVAL_STDERR($ac_link) && AC_TRY_COMMAND([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) && AC_TRY_COMMAND([test -s conftest$ac_exeext])], [$2], [_AC_MSG_LOG_CONFTEST m4_ifvaln([$3], [$3])dnl])[]dnl rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _AC_LINK_IFELSE # AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------------------------- # Try to link PROGRAM. Requires that the compiler for the current # language was checked for, hence do not use this macro in macros looking # for a compiler. AC_DEFUN([AC_LINK_IFELSE], [AC_LANG_COMPILER_REQUIRE()dnl _AC_LINK_IFELSE($@)]) # AC_TRY_LINK(INCLUDES, FUNCTION-BODY, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------------- # Contrarily to AC_LINK_IFELSE, this macro double quote its first two args. AU_DEFUN([AC_TRY_LINK], [AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])]) # AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY, # ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------- AU_DEFUN([AC_COMPILE_CHECK], [m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5]) ]) ## -------------------------------- ## ## Checking for run-time features. ## ## -------------------------------- ## # _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # ------------------------------------------------------------ # Compile, link, and run. # This macro can be used during the selection of a compiler. # We also remove conftest.o as if the compilation fails, some compilers # don't remove it. We remove gmon.out and bb.out, which may be # created during the run if the program is built with profiling support. m4_define([_AC_RUN_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest$ac_exeext AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)], [$2], [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD _AC_MSG_LOG_CONFTEST m4_ifvaln([$3], [( exit $ac_status ) $3])dnl])[]dnl rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl ])# _AC_RUN_IFELSE # AC_RUN_IFELSE(PROGRAM, # [ACTION-IF-TRUE], [ACTION-IF-FALSE], # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) # ---------------------------------------------------------- # Compile, link, and run. Requires that the compiler for the current # language was checked for, hence do not use this macro in macros looking # for a compiler. AC_DEFUN([AC_RUN_IFELSE], [AC_LANG_COMPILER_REQUIRE()dnl m4_ifval([$4], [], [AC_DIAGNOSE([cross], [$0 called without default to allow cross compiling])])dnl if test "$cross_compiling" = yes; then m4_default([$4], [AC_MSG_FAILURE([cannot run test program while cross compiling])]) else _AC_RUN_IFELSE($@) fi]) # AC_TRY_RUN(PROGRAM, # [ACTION-IF-TRUE], [ACTION-IF-FALSE], # [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) # -------------------------------------------------------- AU_DEFUN([AC_TRY_RUN], [AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])]) ## ------------------------------------- ## ## Checking for the existence of files. ## ## ------------------------------------- ## # AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ------------------------------------------------------------- # # Check for the existence of FILE. AC_DEFUN([AC_CHECK_FILE], [AC_DIAGNOSE([cross], [cannot check for file existence when cross compiling])dnl AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl AC_CACHE_CHECK([for $1], ac_File, [test "$cross_compiling" = yes && AC_MSG_ERROR([cannot check for file existence when cross compiling]) if test -r "$1"; then AS_VAR_SET(ac_File, yes) else AS_VAR_SET(ac_File, no) fi]) AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_File])dnl ])# AC_CHECK_FILE # AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------------------------- AC_DEFUN([AC_CHECK_FILES], [AC_FOREACH([AC_FILE_NAME], [$1], [AC_CHECK_FILE(AC_FILE_NAME, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1, [Define to 1 if you have the file `]AC_File['.]) $2], [$3])])]) ## ------------------------------- ## ## Checking for declared symbols. ## ## ------------------------------- ## # AC_CHECK_DECL(SYMBOL, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # ------------------------------------------------------- # Check if SYMBOL (a variable or a function) is declared. AC_DEFUN([AC_CHECK_DECL], [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl AC_CACHE_CHECK([whether $1 is declared], ac_Symbol, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], [#ifndef $1 char *p = (char *) $1; #endif ])], [AS_VAR_SET(ac_Symbol, yes)], [AS_VAR_SET(ac_Symbol, no)])]) AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Symbol])dnl ])# AC_CHECK_DECL # AC_CHECK_DECLS(SYMBOLS, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # -------------------------------------------------------- # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the # documentation for a detailed explanation of this difference with # other AC_CHECK_*S macros. SYMBOLS is an m4 list. AC_DEFUN([AC_CHECK_DECLS], [m4_foreach([AC_Symbol], [$1], [AC_CHECK_DECL(AC_Symbol, [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1, [Define to 1 if you have the declaration of `]AC_Symbol[', and to 0 if you don't.]) $2], [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0) $3], [$4])]) ])# AC_CHECK_DECLS ## ---------------------------------- ## ## Replacement of library functions. ## ## ---------------------------------- ## # AC_CONFIG_LIBOBJ_DIR(DIRNAME) # ----------------------------- # Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME. AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR], [m4_bmatch([$1], [^]m4_defn([m4_cr_symbols2]), [AC_WARNING([invalid replacement directory: $1])])dnl m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])[]dnl ]) # AC_LIBSOURCE(FILENAME) # ---------------------- # Announce we might need the file `FILENAME'. m4_define([AC_LIBSOURCE], []) # AC_LIBSOURCES([FILENAME1, ...]) # ------------------------------- # Announce we might need these files. m4_define([AC_LIBSOURCES], [m4_foreach([_AC_FILENAME], [$1], [AC_LIBSOURCE(_AC_FILENAME)])]) # _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR) # ------------------------------------------- # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'. # We don't use AC_SUBST/2 because it forces an unnecessary eol. m4_define([_AC_LIBOBJ], [AS_LITERAL_IF([$1], [AC_LIBSOURCE([$1.c])], [$2])dnl AC_SUBST([LIB@&t@OBJS])dnl case $LIB@&t@OBJS in "$1.$ac_objext" | \ *" $1.$ac_objext" | \ "$1.$ac_objext "* | \ *" $1.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS $1.$ac_objext" ;; esac ]) # AC_LIBOBJ(FILENAME-NOEXT) # ------------------------- # We need `FILENAME-NOEXT.o', save this into `LIBOBJS'. # We don't use AC_SUBST/2 because it forces an unnecessary eol. m4_define([AC_LIBOBJ], [_AC_LIBOBJ([$1], [AC_DIAGNOSE(syntax, [$0($1): you should use literals])])dnl ]) # _AC_LIBOBJS_NORMALIZE # --------------------- # Clean up LIBOBJS abd LTLIBOBJS so that they work with 1. ac_objext, # 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three. # Used with AC_CONFIG_COMMANDS_PRE. AC_DEFUN([_AC_LIBOBJS_NORMALIZE], [ac_libobjs= ac_ltlibobjs= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) ]) ## ----------------------------------- ## ## Checking compiler characteristics. ## ## ----------------------------------- ## # _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS]) # --------------------------------------------------------------------- # Compute the integer EXPRESSION and store the result in the VARIABLE. # Works OK if cross compiling, but assumes twos-complement arithmetic. m4_define([_AC_COMPUTE_INT_COMPILE], [# Depending upon the size, compute the lo and hi bounds. AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])], [ac_lo=0 ac_mid=0 while :; do AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])], [ac_hi=$ac_mid; break], [ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1`]) done], [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])], [ac_hi=-1 ac_mid=-1 while :; do AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])], [ac_lo=$ac_mid; break], [ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid`]) done], [ac_lo= ac_hi=])]) # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])], [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`]) done case $ac_lo in ?*) $2=$ac_lo;; '') $4 ;; esac[]dnl ])# _AC_COMPUTE_INT_COMPILE # _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS]) # ----------------------------------------------------------------- # Store the evaluation of the integer EXPRESSION in VARIABLE. m4_define([_AC_COMPUTE_INT_RUN], [AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])], [$2=`cat conftest.val`], [$4])]) # _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS) # --------------------------------------------------------- m4_define([_AC_COMPUTE_INT], [if test "$cross_compiling" = yes; then _AC_COMPUTE_INT_COMPILE([$1], [$2], [$3], [$4]) else _AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4]) fi rm -f conftest.val[]dnl ])# _AC_COMPUTE_INT autoconf2.59-2.59+dfsg/lib/autoconf/status.m40000644000175000017500000014724107752405140020226 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Parameterizing and creating config.status. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # This file handles about all the preparation aspects for # `config.status': registering the configuration files, the headers, # the links, and the commands `config.status' will run. There is a # little mixture though of things actually handled by `configure', # such as running the `configure' in the sub directories. Minor # detail. # # There are two kinds of commands: # # COMMANDS: # # They are output into `config.status' via a quoted here doc. These # commands are always associated to a tag which the user can use to # tell `config.status' what are the commands she wants to run. # # INIT-CMDS: # # They are output via an *unquoted* here-doc. As a consequence $var # will be output as the value of VAR. This is typically used by # `configure' to give `config,.status' some variables it needs to run # the COMMANDS. At the difference of `COMMANDS', the INIT-CMDS are # always run. # # # Some uniformity exists around here, please respect it! # # A macro named AC_CONFIG_FOOS has three args: the `TAG...' (or # `FILE...' when it applies), the `COMMANDS' and the `INIT-CMDS'. It # first checks that TAG was not registered elsewhere thanks to # AC_CONFIG_UNIQUE. Then it registers `TAG...' in AC_LIST_FOOS, and for # each `TAG', a special line in AC_LIST_FOOS_COMMANDS which is used in # `config.status' like this: # # case $ac_tag in # AC_LIST_FOOS_COMMANDS # esac # # Finally, the `INIT-CMDS' are dumped into a special diversion, via # `_AC_CONFIG_COMMANDS_INIT'. While `COMMANDS' are output once per TAG, # `INIT-CMDS' are dumped only once per call to AC_CONFIG_FOOS. # # It also leave the TAG in the shell variable ac_config_foo which contains # those which will actually be executed. In other words: # # if false; then # AC_CONFIG_FOOS(bar, [touch bar]) # fi # # will not create bar. # # AC_CONFIG_FOOS can be called several times (with different TAGs of # course). # # Because these macros should not output anything, there should be `dnl' # everywhere. A pain my friend, a pain. So instead in each macro we # divert(-1) and restore the diversion at the end. # # # Honorable members of this family are AC_CONFIG_FILES, # AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS. Bad boys # are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with # arguments. False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS # and AC_CONFIG_AUX_DIR. Cousins are AC_CONFIG_COMMANDS_PRE and # AC_CONFIG_COMMANDS_POST. ## ------------------ ## ## Auxiliary macros. ## ## ------------------ ## # _AC_SRCPATHS(BUILD-DIR-NAME) # ---------------------------- # Inputs: # - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src' # - `$srcdir' is `top-build -> top-src' # # Ouputs: # - `ac_builddir' is `.', for symmetry only. # - `ac_top_builddir' is `build -> top_build'. # If not empty, has a trailing slash. # - `ac_srcdir' is `build -> src'. # - `ac_top_srcdir' is `build -> top-src'. # # and `ac_abs_builddir' etc., the absolute paths. m4_define([_AC_SRCPATHS], [ac_builddir=. if test $1 != .; then ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[[^\\/]]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [[\\/]]* | ?:[[\\/]]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. AS_SET_CATFILE([ac_abs_builddir], [`pwd`], [$1]) AS_SET_CATFILE([ac_abs_top_builddir], [$ac_abs_builddir], [${ac_top_builddir}.]) AS_SET_CATFILE([ac_abs_srcdir], [$ac_abs_builddir], [$ac_srcdir]) AS_SET_CATFILE([ac_abs_top_srcdir], [$ac_abs_builddir], [$ac_top_srcdir]) ])# _AC_SRCPATHS ## ------------------------------------- ## ## Ensuring the uniqueness of the tags. ## ## ------------------------------------- ## # AC_CONFIG_IF_MEMBER(DEST, LIST-NAME, ACTION-IF-TRUE, ACTION-IF-FALSE) # ---------------------------------------------------------------- # If DEST is member of LIST-NAME, expand to ACTION-IF-TRUE, else # ACTION-IF-FALSE. # # LIST is an AC_CONFIG list, i.e., a list of DEST[:SOURCE], separated # with spaces. # # FIXME: This macro is badly designed, but I'm not guilty: m4 is. There # is just no way to simply compare two strings in m4, but to use pattern # matching. The big problem is then that the active characters should # be quoted. Currently `+*.' are quoted. m4_define([AC_CONFIG_IF_MEMBER], [m4_bmatch(m4_defn([$2]), [\(^\| \)]m4_re_escape([$1])[\([: ]\|$\)], [$3], [$4])]) # AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...]) # ----------------------------------------------------- # This macro does nothing, it's a hook to be read with `autoconf --trace'. # It announces DEST depends upon the SOURCE1 etc. m4_define([AC_FILE_DEPENDENCY_TRACE], []) # _AC_CONFIG_DEPENDENCY(DEST, [SOURCE1], [SOURCE2...]) # ---------------------------------------------------- # Be sure that a missing dependency is expressed as a dependency upon # `DEST.in'. m4_define([_AC_CONFIG_DEPENDENCY], [m4_ifval([$2], [AC_FILE_DEPENDENCY_TRACE($@)], [AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])]) # _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...) # ------------------------------------------------------- # Declare the DESTs depend upon their SOURCE1 etc. m4_define([_AC_CONFIG_DEPENDENCIES], [AC_FOREACH([AC_File], [$1], [_AC_CONFIG_DEPENDENCY(m4_bpatsubst(AC_File, [:], [,]))])dnl ]) # _AC_CONFIG_UNIQUE(DEST[:SOURCE]...) # ----------------------------------- # # Verify that there is no double definition of an output file # (precisely, guarantees there is no common elements between # CONFIG_HEADERS, CONFIG_FILES, CONFIG_LINKS, and CONFIG_SUBDIRS). # # Note that this macro does not check if the list $[1] itself # contains doubles. m4_define([_AC_CONFIG_UNIQUE], [AC_FOREACH([AC_File], [$1], [m4_pushdef([AC_Dest], m4_bpatsubst(AC_File, [:.*]))dnl AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS], [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_HEADERS.])])dnl AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_LINKS], [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_LINKS.])])dnl AC_CONFIG_IF_MEMBER(AC_Dest, [_AC_LIST_SUBDIRS], [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_SUBDIRS.])])dnl AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_COMMANDS], [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_COMMANDS.])])dnl AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES], [AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES.])])dnl m4_popdef([AC_Dest])])dnl ]) ## ------------------------ ## ## Configuration commands. ## ## ------------------------ ## # _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS]) # ----------------------------------------- # # Register INIT-COMMANDS as command pasted *unquoted* in # `config.status'. This is typically used to pass variables from # `configure' to `config.status'. Note that $[1] is not over quoted as # was the case in AC_OUTPUT_COMMANDS. m4_define([_AC_CONFIG_COMMANDS_INIT], [m4_ifval([$1], [m4_append([_AC_OUTPUT_COMMANDS_INIT], [$1 ])])]) # Initialize. m4_define([_AC_OUTPUT_COMMANDS_INIT]) # _AC_CONFIG_COMMAND(NAME, [COMMANDS]) # ------------------------------------ # See below. m4_define([_AC_CONFIG_COMMAND], [_AC_CONFIG_UNIQUE([$1])dnl m4_append([AC_LIST_COMMANDS], [ $1])dnl m4_ifval([$2], [m4_append([AC_LIST_COMMANDS_COMMANDS], [ ]m4_bpatsubst([$1], [:.*])[ ) $2 ;; ])])dnl ]) # AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS]) # --------------------------------------------------- # # Specify additional commands to be run by config.status. This # commands must be associated with a NAME, which should be thought # as the name of a file the COMMANDS create. AC_DEFUN([AC_CONFIG_COMMANDS], [AC_FOREACH([AC_Name], [$1], [_AC_CONFIG_COMMAND(m4_defn([AC_Name]), [$2])])dnl _AC_CONFIG_COMMANDS_INIT([$3])dnl ac_config_commands="$ac_config_commands $1" ]) # Initialize the lists. m4_define([AC_LIST_COMMANDS]) m4_define([AC_LIST_COMMANDS_COMMANDS]) # AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) # ----------------------------------------- # # Add additional commands for AC_OUTPUT to put into config.status. # # This macro is an obsolete version of AC_CONFIG_COMMANDS. The only # difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is # to give a unique key. The scheme we have chosen is `default-1', # `default-2' etc. for each call. # # Unfortunately this scheme is fragile: bad things might happen # if you update an included file and configure.ac: you might have # clashes :( On the other hand, I'd like to avoid weird keys (e.g., # depending upon __file__ or the pid). AU_DEFUN([AC_OUTPUT_COMMANDS], [m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl dnl Double quoted since that was the case in the original macro. AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl ]) # Initialize. AU_DEFUN([_AC_OUTPUT_COMMANDS_CNT], 0) # AC_CONFIG_COMMANDS_PRE(CMDS) # ---------------------------- # Commands to run right before config.status is created. Accumulates. AC_DEFUN([AC_CONFIG_COMMANDS_PRE], [m4_append([AC_OUTPUT_COMMANDS_PRE], [$1 ])]) # AC_OUTPUT_COMMANDS_PRE # ---------------------- # A *variable* in which we append all the actions that must be # performed before *creating* config.status. For a start, clean # up all the LIBOBJ mess. m4_define([AC_OUTPUT_COMMANDS_PRE], [_AC_LIBOBJS_NORMALIZE() ]) # AC_CONFIG_COMMANDS_POST(CMDS) # ----------------------------- # Commands to run after config.status was created. Accumulates. AC_DEFUN([AC_CONFIG_COMMANDS_POST], [m4_append([AC_OUTPUT_COMMANDS_POST], [$1 ])]) # Initialize. m4_define([AC_OUTPUT_COMMANDS_POST]) # _AC_OUTPUT_COMMANDS # ------------------- # This is a subroutine of AC_OUTPUT, in charge of issuing the code # related to AC_CONFIG_COMMANDS. # # It has to send itself into $CONFIG_STATUS (eg, via here documents). # Upon exit, no here document shall be opened. m4_define([_AC_OUTPUT_COMMANDS], [cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_dir=`AS_DIRNAME(["$ac_dest"])` AS_MKDIR_P(["$ac_dir"]) _AC_SRCPATHS(["$ac_dir"]) AC_MSG_NOTICE([executing $ac_dest commands]) dnl Some shells don't like empty case/esac m4_ifset([AC_LIST_COMMANDS_COMMANDS], [ case $ac_dest in AC_LIST_COMMANDS_COMMANDS()dnl esac ])dnl done _ACEOF ])# _AC_OUTPUT_COMMANDS ## ----------------------- ## ## Configuration headers. ## ## ----------------------- ## # _AC_CONFIG_HEADER(HEADER, [COMMANDS]) # ------------------------------------- # See below. m4_define([_AC_CONFIG_HEADER], [_AC_CONFIG_UNIQUE([$1])dnl m4_append([AC_LIST_HEADERS], [ $1])dnl _AC_CONFIG_DEPENDENCIES([$1])dnl dnl Register the commands m4_ifval([$2], [m4_append([AC_LIST_HEADERS_COMMANDS], [ ]m4_bpatsubst([$1], [:.*])[ ) $2 ;; ])])dnl ]) # AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS]) # ------------------------------------------------------ # Specify that the HEADERS are to be created by instantiation of the # AC_DEFINEs. Associate the COMMANDS to the HEADERS. This macro # accumulates if called several times. # # The commands are stored in a growing string AC_LIST_HEADERS_COMMANDS # which should be used like this: # # case $ac_file in # AC_LIST_HEADERS_COMMANDS # esac AC_DEFUN([AC_CONFIG_HEADERS], [AC_FOREACH([AC_File], [$1], [_AC_CONFIG_HEADER(m4_defn([AC_File]), [$2])])dnl _AC_CONFIG_COMMANDS_INIT([$3])dnl ac_config_headers="$ac_config_headers m4_normalize([$1])" ]) # Initialize to empty. It is much easier and uniform to have a config # list expand to empty when undefined, instead of special casing when # not defined (since in this case, AC_CONFIG_FOO expands to AC_CONFIG_FOO). m4_define([AC_LIST_HEADERS]) m4_define([AC_LIST_HEADERS_COMMANDS]) # AC_CONFIG_HEADER(HEADER-TO-CREATE ...) # -------------------------------------- # FIXME: Make it obsolete? AC_DEFUN([AC_CONFIG_HEADER], [AC_CONFIG_HEADERS([$1])]) # _AC_OUTPUT_HEADERS # ------------------ # # Output the code which instantiates the `config.h' files from their # `config.h.in'. # # This is a subroutine of _AC_OUTPUT_CONFIG_STATUS. It has to send # itself into $CONFIG_STATUS (eg, via here documents). Upon exit, no # here document shall be opened. # # # The code produced used to be extremely costly: there are was a # single sed script (n lines) handling both `#define' templates, # `#undef' templates with trailing space, and `#undef' templates # without trailing spaces. The full script was run on each of the m # lines of `config.h.in', i.e., about n x m. # # Now there are two scripts: `conftest.defines' for the `#define' # templates, and `conftest.undef' for the `#undef' templates. # # Optimization 1. It is incredibly costly to run two `#undef' # scripts, so just remove trailing spaces first. Removes about a # third of the cost. # # Optimization 2. Since `#define' are rare and obsoleted, # `conftest.defines' is built and run only if grep says there are # `#define'. Improves by at least a factor 2, since in addition we # avoid the cost of *producing* the sed script. # # Optimization 3. In each script, first check that the current input # line is a template. This avoids running the full sed script on # empty lines and comments (divides the cost by about 3 since each # template chunk is typically a comment, a template, an empty line). # # Optimization 4. Once a substitution performed, since there can be # only one per line, immediately restart the script on the next input # line (using the `t' sed instruction). Divides by about 2. # *Note:* In the case of the AC_SUBST sed script (_AC_OUTPUT_FILES) # this optimization cannot be applied as is, because there can be # several substitutions per line. # # # The result is about, hm, ... times blah... plus.... Ahem. The # result is about much faster. m4_define([_AC_OUTPUT_HEADERS], [cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. dnl Double quote for the `[ ]' and `define'. [ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t'] for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && AC_MSG_NOTICE([creating $ac_file]) # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [[\\/$]]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || AC_MSG_ERROR([cannot find input file: $f]) # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree AC_MSG_ERROR([cannot find input file: $f]) fi;; esac done` || AS_EXIT([1]) # Remove the trailing spaces. sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF dnl Double quote for `[ ]' and `define'. [s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end] _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF [s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,] _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep ["^[ ]*#[ ]*define"] $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo ['/^[ ]*#[ ]*define/!b'] >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo ['/^[ ]*#[ ]*undef/!b'] >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs dnl Now back to your regularly scheduled config.status. cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then AC_MSG_NOTICE([$ac_file is unchanged]) else ac_dir=`AS_DIRNAME(["$ac_file"])` AS_MKDIR_P(["$ac_dir"]) rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi dnl If running for Automake, be ready to perform additional dnl commands to set up the timestamp files. m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK], [_AC_AM_CONFIG_HEADER_HOOK([$ac_file]) ])dnl m4_ifset([AC_LIST_HEADERS_COMMANDS], [ # Run the commands associated with the file. case $ac_file in AC_LIST_HEADERS_COMMANDS()dnl esac ])dnl done _ACEOF ])# _AC_OUTPUT_HEADERS ## --------------------- ## ## Configuration links. ## ## --------------------- ## # _AC_CONFIG_LINK(DEST:SOURCE, [COMMANDS]) # ---------------------------------------- # See below. m4_define([_AC_CONFIG_LINK], [_AC_CONFIG_UNIQUE([$1])dnl m4_append([AC_LIST_LINKS], [ $1])dnl _AC_CONFIG_DEPENDENCIES([$1])dnl m4_bmatch([$1], [^\.:\| \.:], [m4_fatal([$0: invalid destination: `.'])])dnl dnl Register the commands m4_ifval([$2], [m4_append([AC_LIST_LINKS_COMMANDS], [ ]m4_bpatsubst([$1], [:.*])[ ) $2 ;; ])])dnl ]) # AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS]) # -------------------------------------------------------- # Specify that config.status should establish a (symbolic if possible) # link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST. # Reject DEST=., because it is makes it hard for ./config.status # to guess the links to establish (`./config.status .'). AC_DEFUN([AC_CONFIG_LINKS], [AC_FOREACH([AC_File], [$1], [_AC_CONFIG_LINK(m4_defn([AC_File]), [$2])])dnl _AC_CONFIG_COMMANDS_INIT([$3])dnl ac_config_links="$ac_config_links m4_normalize([$1])" ]) # Initialize the list. m4_define([AC_LIST_LINKS]) m4_define([AC_LIST_LINKS_COMMANDS]) # AC_LINK_FILES(SOURCE..., DEST...) # --------------------------------- # Link each of the existing files SOURCE... to the corresponding # link name in DEST... # # Unfortunately we can't provide a very good autoupdate service here, # since in `AC_LINK_FILES($from, $to)' it is possible that `$from' # and `$to' are actually lists. It would then be completely wrong to # replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the # case of literal values though, but because I don't think there is any # interest in creating config links with literal values, no special # mechanism is implemented to handle them. # # _AC_LINK_CNT is used to be robust to multiple calls. AU_DEFUN([AC_LINK_FILES], [m4_if($#, 2, , [m4_fatal([$0: incorrect number of arguments])])dnl m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl ac_sources="$1" ac_dests="$2" while test -n "$ac_sources"; do set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*] set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*] [ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source" done AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl ], [ It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant update, you should probably tune the result yourself.])# AC_LINK_FILES # Initialize. AU_DEFUN([_AC_LINK_FILES_CNT], 0) # _AC_OUTPUT_LINKS # ---------------- # This is a subroutine of AC_OUTPUT. # # It has to send itself into $CONFIG_STATUS (eg, via here documents). # Upon exit, no here document shall be opened. m4_define([_AC_OUTPUT_LINKS], [cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_LINKS section. # dnl Here we use : instead of .. because if AC_LINK_FILES was used dnl with empty parameters (as in gettext.m4), then we obtain here dnl `:', which we want to skip. So let's keep a single exception: `:'. for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'` AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_dest]) if test ! -r $srcdir/$ac_source; then AC_MSG_ERROR([$srcdir/$ac_source: file not found]) fi rm -f $ac_dest # Make relative symlinks. ac_dest_dir=`AS_DIRNAME(["$ac_dest"])` AS_MKDIR_P(["$ac_dest_dir"]) _AC_SRCPATHS(["$ac_dest_dir"]) case $srcdir in [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;; *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;; esac # Try a symlink, then a hard link, then a copy. ln -s $ac_rel_source $ac_dest 2>/dev/null || ln $srcdir/$ac_source $ac_dest 2>/dev/null || cp -p $srcdir/$ac_source $ac_dest || AC_MSG_ERROR([cannot link or copy $srcdir/$ac_source to $ac_dest]) m4_ifset([AC_LIST_LINKS_COMMANDS], [ # Run the commands associated with the file. case $ac_file in AC_LIST_LINKS_COMMANDS()dnl esac ])dnl done _ACEOF ])# _AC_OUTPUT_LINKS ## --------------------- ## ## Configuration files. ## ## --------------------- ## # _AC_CONFIG_FILE(FILE..., [COMMANDS]) # ------------------------------------ # See below. m4_define([_AC_CONFIG_FILE], [_AC_CONFIG_UNIQUE([$1])dnl m4_append([AC_LIST_FILES], [ $1])dnl _AC_CONFIG_DEPENDENCIES([$1])dnl dnl Register the commands. m4_ifval([$2], [m4_append([AC_LIST_FILES_COMMANDS], [ ]m4_bpatsubst([$1], [:.*])[ ) $2 ;; ])])dnl ]) # AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS]) # ------------------------------------------------- # Specify output files, as with AC_OUTPUT, i.e., files that are # configured with AC_SUBST. Associate the COMMANDS to each FILE, # i.e., when config.status creates FILE, run COMMANDS afterwards. # # The commands are stored in a growing string AC_LIST_FILES_COMMANDS # which should be used like this: # # case $ac_file in # AC_LIST_FILES_COMMANDS # esac AC_DEFUN([AC_CONFIG_FILES], [AC_FOREACH([AC_File], [$1], [_AC_CONFIG_FILE(m4_defn([AC_File]), [$2])])dnl _AC_CONFIG_COMMANDS_INIT([$3])dnl ac_config_files="$ac_config_files m4_normalize([$1])" ]) # Initialize the lists. m4_define([AC_LIST_FILES]) m4_define([AC_LIST_FILES_COMMANDS]) # _AC_OUTPUT_FILES # ---------------- # Do the variable substitutions to create the Makefiles or whatever. # This is a subroutine of AC_OUTPUT. # # It has to send itself into $CONFIG_STATUS (eg, via here documents). # Upon exit, no here document shall be opened. m4_define([_AC_OUTPUT_FILES], [cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. dnl Please, pay attention that this sed code depends a lot on the shape dnl of the sed commands issued by AC_SUBST. So if you change one, change dnl the other too. [ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF] dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once. dnl Insert the sed substitutions of variables. m4_ifdef([_AC_SUBST_VARS], [AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [s,@AC_Var@,$AC_Var,;t t ])])dnl m4_ifdef([_AC_SUBST_FILES], [AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_FILES]), [/@AC_Var@/r $AC_Var s,@AC_Var@,,;t t ])])dnl CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. dnl One cannot portably go further than 100 commands because of HP-UX. dnl Here, there are 2 cmd per line, and two cmd are added later. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo [':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b'] && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`AS_DIRNAME(["$ac_file"])` AS_MKDIR_P(["$ac_dir"]) _AC_SRCPATHS(["$ac_dir"]) AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [ case $INSTALL in [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac ])dnl if test x"$ac_file" != x-; then AC_MSG_NOTICE([creating $ac_file]) rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [[\\/$]]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || AC_MSG_ERROR([cannot find input file: $f]) echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree AC_MSG_ERROR([cannot find input file: $f]) fi;; esac done` || AS_EXIT([1]) _ACEOF cat >>$CONFIG_STATUS <<_ACEOF dnl Neutralize VPATH when `$srcdir' = `.'. sed "$ac_vpsub dnl Shell code in configure.ac might set extrasub. dnl FIXME: do we really want to maintain this feature? $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t [/@[a-zA-Z_][a-zA-Z_0-9]*@/!b] s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t ])dnl dnl The parens around the eval prevent an "illegal io" in Ultrix sh. " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin dnl This would break Makefile dependencies. dnl if diff $ac_file $tmp/out >/dev/null 2>&1; then dnl echo "$ac_file is unchanged" dnl else dnl rm -f $ac_file dnl mv $tmp/out $ac_file dnl fi if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi m4_ifset([AC_LIST_FILES_COMMANDS], [ # Run the commands associated with the file. case $ac_file in AC_LIST_FILES_COMMANDS()dnl esac ])dnl done _ACEOF ])# _AC_OUTPUT_FILES ## ----------------------- ## ## Configuration subdirs. ## ## ----------------------- ## # AC_CONFIG_SUBDIRS(DIR ...) # -------------------------- # We define two variables: # - ac_subdirs_all # is built in the `default' section, and should contain *all* # the arguments of AC_CONFIG_SUBDIRS. It is used for --help=recursive. # It makes no sense for arguments which are sh variables. # - subdirs # which is built at runtime, so some of these dirs might not be # included, if for instance the user refused a part of the tree. # This is used in _AC_OUTPUT_SUBDIRS. # _AC_LIST_SUBDIRS is used only for _AC_CONFIG_UNIQUE. AC_DEFUN([AC_CONFIG_SUBDIRS], [_AC_CONFIG_UNIQUE([$1])dnl AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl m4_append([_AC_LIST_SUBDIRS], [ $1])dnl AS_LITERAL_IF([$1], [], [AC_DIAGNOSE(syntax, [$0: you should use literals])]) m4_divert_text([DEFAULTS], [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"]) AC_SUBST(subdirs, "$subdirs $1")dnl ]) # Initialize the list. m4_define([_AC_LIST_SUBDIRS]) # _AC_OUTPUT_SUBDIRS # ------------------ # This is a subroutine of AC_OUTPUT, but it does not go into # config.status, rather, it is called after running config.status. m4_define([_AC_OUTPUT_SUBDIRS], [ # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= for ac_arg in $ac_configure_args; do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d $srcdir/$ac_dir || continue AC_MSG_NOTICE([configuring in $ac_dir]) AS_MKDIR_P(["$ac_dir"]) _AC_SRCPATHS(["$ac_dir"]) cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" elif test -f $ac_srcdir/configure; then ac_sub_configure="$SHELL '$ac_srcdir/configure'" elif test -f $ac_srcdir/configure.in; then ac_sub_configure=$ac_configure else AC_MSG_WARN([no configuration information is in $ac_dir]) ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;; *) # Relative path. ac_sub_cache_file=$ac_top_builddir$cache_file ;; esac AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir]) # The eval makes quoting arguments work. eval $ac_sub_configure $ac_sub_configure_args \ --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir]) fi cd $ac_popdir done fi ])# _AC_OUTPUT_SUBDIRS ## -------------------------- ## ## Outputting config.status. ## ## -------------------------- ## # autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS]) # ------------------------------------------------------------------- # # If there are arguments given to AC_OUTPUT, dispatch them to the # proper modern macros. AU_DEFUN([AC_OUTPUT], [m4_ifvaln([$1], [AC_CONFIG_FILES([$1])])dnl m4_ifvaln([$2$3], [AC_CONFIG_COMMANDS(default, [[$2]], [[$3]])])dnl [AC_OUTPUT]]) # AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS]) # ------------------------------------------------------- # The big finish. # Produce config.status, config.h, and links; and configure subdirs. # The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADERS. # Pay special attention not to have too long here docs: some old # shells die. Unfortunately the limit is not known precisely... m4_define([AC_OUTPUT], [dnl Dispatch the extra arguments to their native macros. m4_ifval([$1], [AC_CONFIG_FILES([$1])])dnl m4_ifval([$2$3], [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl m4_ifval([$1$2$3], [AC_DIAGNOSE([obsolete], [$0 should be used without arguments. You should run autoupdate.])])dnl AC_CACHE_SAVE test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub=['/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }'] fi m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()]) dnl Commands to run before creating config.status. AC_OUTPUT_COMMANDS_PRE()dnl : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" _AC_OUTPUT_CONFIG_STATUS()dnl ac_clean_files=$ac_clean_files_save dnl Commands to run after config.status was created AC_OUTPUT_COMMANDS_POST()dnl # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec AS_MESSAGE_LOG_FD>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || AS_EXIT([1]) fi dnl config.status should not do recursion. AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl ])# AC_OUTPUT # _AC_OUTPUT_CONFIG_STATUS # ------------------------ # Produce config.status. Called by AC_OUTPUT. # Pay special attention not to have too long here docs: some old # shells die. Unfortunately the limit is not known precisely... m4_define([_AC_OUTPUT_CONFIG_STATUS], [AC_MSG_NOTICE([creating $CONFIG_STATUS]) cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF AS_SHELL_SANITIZE dnl Watch out, this is directly the initializations, do not use dnl AS_PREPARE, otherwise you'd get it output in the initialization dnl of configure, not config.status. _AS_PREPARE exec AS_MESSAGE_FD>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD cat >&AS_MESSAGE_LOG_FD <<_CSEOF This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl $as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was generated by m4_PACKAGE_STRING. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $[0] $[@] _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&AS_MESSAGE_LOG_FD echo >&AS_MESSAGE_LOG_FD _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $[0] [[OPTIONS]] [[FILE]]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions m4_ifset([AC_LIST_FILES], [[ --file=FILE[:TEMPLATE] instantiate the configuration file FILE ]])dnl m4_ifset([AC_LIST_HEADERS], [[ --header=FILE[:TEMPLATE] instantiate the configuration header FILE ]])dnl m4_ifset([AC_LIST_FILES], [Configuration files: $config_files ])dnl m4_ifset([AC_LIST_HEADERS], [Configuration headers: $config_headers ])dnl m4_ifset([AC_LIST_LINKS], [Configuration links: $config_links ])dnl m4_ifset([AC_LIST_COMMANDS], [Configuration commands: $config_commands ])dnl Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING, with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [dnl Leave those double quotes here: this $INSTALL is evaluated in a dnl here document, which might result in `INSTALL=/bin/install -c'. INSTALL="$INSTALL" ])dnl _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $[#] != 0 do case $[1] in --*=*) ac_option=`expr "x$[1]" : 'x\([[^=]]*\)='` ac_optarg=`expr "x$[1]" : 'x[[^=]]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$[1] ac_optarg=$[2] ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$[1] ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header AC_MSG_ERROR([ambiguous option: $[1] Try `$[0] --help' for more information.]);; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) AC_MSG_ERROR([unrecognized option: $[1] Try `$[0] --help' for more information.]) ;; *) ac_config_targets="$ac_config_targets $[1]" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec AS_MESSAGE_FD>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $[0] " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD exec $SHELL $[0] $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF dnl We output the INIT-CMDS first for obvious reasons :) m4_ifset([_AC_OUTPUT_COMMANDS_INIT], [cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # _AC_OUTPUT_COMMANDS_INIT() _ACEOF]) dnl Issue this section only if there were actually config files. dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_LIST_COMMANDS, dnl or AC_LIST_LINKS is set. m4_ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(), [ cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. AC_FOREACH([AC_File], AC_LIST_FILES, [ "m4_bpatsubst(AC_File, [:.*])" )dnl CONFIG_FILES="$CONFIG_FILES AC_File" ;; ])dnl AC_FOREACH([AC_File], AC_LIST_LINKS, [ "m4_bpatsubst(AC_File, [:.*])" )dnl CONFIG_LINKS="$CONFIG_LINKS AC_File" ;; ])dnl AC_FOREACH([AC_File], AC_LIST_COMMANDS, [ "m4_bpatsubst(AC_File, [:.*])" )dnl CONFIG_COMMANDS="$CONFIG_COMMANDS AC_File" ;; ])dnl AC_FOREACH([AC_File], AC_LIST_HEADERS, [ "m4_bpatsubst(AC_File, [:.*])" )dnl CONFIG_HEADERS="$CONFIG_HEADERS AC_File" ;; ])dnl *) AC_MSG_ERROR([invalid argument: $ac_config_target]);; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then m4_ifset([AC_LIST_FILES], [ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ])dnl m4_ifset([AC_LIST_HEADERS], [ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ])dnl m4_ifset([AC_LIST_LINKS], [ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links ])dnl m4_ifset([AC_LIST_COMMANDS], [ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands ])dnl fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. AS_TMPDIR([confstat], [.]) _ACEOF ])[]dnl m4_ifval dnl The following four sections are in charge of their own here dnl documenting into $CONFIG_STATUS. m4_ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl m4_ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl m4_ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl m4_ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl cat >>$CONFIG_STATUS <<\_ACEOF AS_EXIT(0) _ACEOF chmod +x $CONFIG_STATUS ])# _AC_OUTPUT_CONFIG_STATUS # AC_OUTPUT_MAKE_DEFS # ------------------- # Set the DEFS variable to the -D options determined earlier. # This is a subroutine of AC_OUTPUT. # It is called inside configure, outside of config.status. # Using a here document instead of a string reduces the quoting nightmare. m4_define([AC_OUTPUT_MAKE_DEFS], [[# Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then we branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. cat >confdef2opt.sed <<\_ACEOF t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g t quote s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g t quote d : quote s,[ `~#$^&*(){}\\|;'"<>?],\\&,g s,\[,\\&,g s,\],\\&,g s,\$,$$,g p _ACEOF # We use echo to avoid assuming a particular line-breaking character. # The extra dot is to prevent the shell from consuming trailing # line-breaks from the sub-command output. A line-break within # single-quotes doesn't work because, if this script is created in a # platform that uses two characters for line-breaks (e.g., DOS), tr # would break. ac_LF_and_DOT=`echo; echo .` DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` rm -f confdef2opt.sed ]])# AC_OUTPUT_MAKE_DEFS autoconf2.59-2.59+dfsg/lib/autoconf/types.m40000644000175000017500000005061707663136372020060 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Type related macros: existence, sizeof, and structure members. # Copyright (C) 2000, 2001, 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. ## ---------------- ## ## Type existence. ## ## ---------------- ## # ---------------- # # General checks. # # ---------------- # # Up to 2.13 included, Autoconf used to provide the macro # # AC_CHECK_TYPE(TYPE, DEFAULT) # # Since, it provides another version which fits better with the other # AC_CHECK_ families: # # AC_CHECK_TYPE(TYPE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # # In order to provide backward compatibility, the new scheme is # implemented as _AC_CHECK_TYPE_NEW, the old scheme as _AC_CHECK_TYPE_OLD, # and AC_CHECK_TYPE branches to one or the other, depending upon its # arguments. # _AC_CHECK_TYPE_NEW(TYPE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # ------------------------------------------------------------ # Check whether the type TYPE is supported by the system, maybe via the # the provided includes. This macro implements the former task of # AC_CHECK_TYPE, with one big difference though: AC_CHECK_TYPE was # grepping in the headers, which, BTW, led to many problems until the # extended regular expression was correct and did not given false positives. # It turned out there are even portability issues with egrep... # # The most obvious way to check for a TYPE is just to compile a variable # definition: # # TYPE my_var; # # Unfortunately this does not work for const qualified types in C++, # where you need an initializer. So you think of # # TYPE my_var = (TYPE) 0; # # Unfortunately, again, this is not valid for some C++ classes. # # Then you look for another scheme. For instance you think of declaring # a function which uses a parameter of type TYPE: # # int foo (TYPE param); # # but of course you soon realize this does not make it with K&R # compilers. And by no ways you want to # # int foo (param) # TYPE param # { ; } # # since this time it's C++ who is not happy. # # Don't even think of the return type of a function, since K&R cries # there too. So you start thinking of declaring a *pointer* to this TYPE: # # TYPE *p; # # but you know fairly well that this is legal in C for aggregates which # are unknown (TYPE = struct does-not-exist). # # Then you think of using sizeof to make sure the TYPE is really # defined: # # sizeof (TYPE); # # But this succeeds if TYPE is a variable: you get the size of the # variable's type!!! # # This time you tell yourself the last two options *together* will make # it. And indeed this is the solution invented by Alexandre Oliva. # # Also note that we use # # if (sizeof (TYPE)) # # to `read' sizeof (to avoid warnings), while not depending on its type # (not necessarily size_t etc.). Equally, instead of defining an unused # variable, we just use a cast to avoid warnings from the compiler. # Suggested by Paul Eggert. m4_define([_AC_CHECK_TYPE_NEW], [AS_VAR_PUSHDEF([ac_Type], [ac_cv_type_$1])dnl AC_CACHE_CHECK([for $1], ac_Type, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], [if (($1 *) 0) return 0; if (sizeof ($1)) return 0;])], [AS_VAR_SET(ac_Type, yes)], [AS_VAR_SET(ac_Type, no)])]) AS_IF([test AS_VAR_GET(ac_Type) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Type])dnl ])# _AC_CHECK_TYPE_NEW # AC_CHECK_TYPES(TYPES, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # -------------------------------------------------------- # TYPES is an m4 list. There are no ambiguities here, we mean the newer # AC_CHECK_TYPE. AC_DEFUN([AC_CHECK_TYPES], [m4_foreach([AC_Type], [$1], [_AC_CHECK_TYPE_NEW(AC_Type, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Type), 1, [Define to 1 if the system has the type `]AC_Type['.]) $2], [$3], [$4])])]) # _AC_CHECK_TYPE_OLD(TYPE, DEFAULT) # --------------------------------- # FIXME: This is an extremely badly chosen name, since this # macro actually performs an AC_REPLACE_TYPE. Some day we # have to clean this up. m4_define([_AC_CHECK_TYPE_OLD], [_AC_CHECK_TYPE_NEW([$1],, [AC_DEFINE_UNQUOTED([$1], [$2], [Define to `$2' if does not define.])])dnl ])# _AC_CHECK_TYPE_OLD # _AC_CHECK_TYPE_REPLACEMENT_TYPE_P(STRING) # ----------------------------------------- # Return `1' if STRING seems to be a builtin C/C++ type, i.e., if it # starts with `_Bool', `bool', `char', `double', `float', `int', # `long', `short', `signed', or `unsigned' followed by characters # that are defining types. # Because many people have used `off_t' and `size_t' too, they are added # for better common-useward backward compatibility. m4_define([_AC_CHECK_TYPE_REPLACEMENT_TYPE_P], [m4_bmatch([$1], [^\(_Bool\|bool\|char\|double\|float\|int\|long\|short\|\(un\)?signed\|[_a-zA-Z][_a-zA-Z0-9]*_t\)[][_a-zA-Z0-9() *]*$], 1, 0)dnl ])# _AC_CHECK_TYPE_REPLACEMENT_TYPE_P # _AC_CHECK_TYPE_MAYBE_TYPE_P(STRING) # ----------------------------------- # Return `1' if STRING looks like a C/C++ type. m4_define([_AC_CHECK_TYPE_MAYBE_TYPE_P], [m4_bmatch([$1], [^[_a-zA-Z0-9 ]+\([_a-zA-Z0-9() *]\|\[\|\]\)*$], 1, 0)dnl ])# _AC_CHECK_TYPE_MAYBE_TYPE_P # AC_CHECK_TYPE(TYPE, DEFAULT) # or # AC_CHECK_TYPE(TYPE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES = DEFAULT-INCLUDES]) # ------------------------------------------------------- # # Dispatch respectively to _AC_CHECK_TYPE_OLD or _AC_CHECK_TYPE_NEW. # 1. More than two arguments => NEW # 2. $2 seems to be replacement type => OLD # See _AC_CHECK_TYPE_REPLACEMENT_TYPE_P for `replacement type'. # 3. $2 seems to be a type => NEW plus a warning # 4. default => NEW AC_DEFUN([AC_CHECK_TYPE], [m4_if($#, 3, [_AC_CHECK_TYPE_NEW($@)], $#, 4, [_AC_CHECK_TYPE_NEW($@)], _AC_CHECK_TYPE_REPLACEMENT_TYPE_P([$2]), 1, [_AC_CHECK_TYPE_OLD($@)], _AC_CHECK_TYPE_MAYBE_TYPE_P([$2]), 1, [AC_DIAGNOSE([syntax], [$0: assuming `$2' is not a type])_AC_CHECK_TYPE_NEW($@)], [_AC_CHECK_TYPE_NEW($@)])[]dnl ])# AC_CHECK_TYPE # ---------------------------- # # Types that must be checked. # # ---------------------------- # AN_IDENTIFIER([ptrdiff_t], [AC_CHECK_TYPES]) # ----------------- # # Specific checks. # # ----------------- # # AC_TYPE_GETGROUPS # ----------------- AC_DEFUN([AC_TYPE_GETGROUPS], [AC_REQUIRE([AC_TYPE_UID_T])dnl AC_CACHE_CHECK(type of array argument to getgroups, ac_cv_type_getgroups, [AC_RUN_IFELSE([AC_LANG_SOURCE( [[/* Thanks to Mike Rendell for this test. */ #include #define NGID 256 #undef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) int main () { gid_t gidset[NGID]; int i, n; union { gid_t gval; long lval; } val; val.lval = -1; for (i = 0; i < NGID; i++) gidset[i] = val.gval; n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1, gidset); /* Exit non-zero if getgroups seems to require an array of ints. This happens when gid_t is short but getgroups modifies an array of ints. */ exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0); }]])], [ac_cv_type_getgroups=gid_t], [ac_cv_type_getgroups=int], [ac_cv_type_getgroups=cross]) if test $ac_cv_type_getgroups = cross; then dnl When we can't run the test program (we are cross compiling), presume dnl that has either an accurate prototype for getgroups or none. dnl Old systems without prototypes probably use int. AC_EGREP_HEADER([getgroups.*int.*gid_t], unistd.h, ac_cv_type_getgroups=gid_t, ac_cv_type_getgroups=int) fi]) AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups, [Define to the type of elements in the array set by `getgroups'. Usually this is either `int' or `gid_t'.]) ])# AC_TYPE_GETGROUPS # AU::AM_TYPE_PTRDIFF_T # --------------------- AU_DEFUN([AM_TYPE_PTRDIFF_T], [AC_CHECK_TYPES(ptrdiff_t)]) # AC_TYPE_MBSTATE_T # ----------------- AC_DEFUN([AC_TYPE_MBSTATE_T], [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [AC_INCLUDES_DEFAULT # include ], [mbstate_t x; return sizeof x;])], [ac_cv_type_mbstate_t=yes], [ac_cv_type_mbstate_t=no])]) if test $ac_cv_type_mbstate_t = yes; then AC_DEFINE([HAVE_MBSTATE_T], 1, [Define to 1 if declares mbstate_t.]) else AC_DEFINE([mbstate_t], int, [Define to a type if does not define.]) fi]) # AC_TYPE_UID_T # ------------- # FIXME: Rewrite using AC_CHECK_TYPE. AN_IDENTIFIER([gid_t], [AC_TYPE_UID_T]) AN_IDENTIFIER([uid_t], [AC_TYPE_UID_T]) AC_DEFUN([AC_TYPE_UID_T], [AC_CACHE_CHECK(for uid_t in sys/types.h, ac_cv_type_uid_t, [AC_EGREP_HEADER(uid_t, sys/types.h, ac_cv_type_uid_t=yes, ac_cv_type_uid_t=no)]) if test $ac_cv_type_uid_t = no; then AC_DEFINE(uid_t, int, [Define to `int' if doesn't define.]) AC_DEFINE(gid_t, int, [Define to `int' if doesn't define.]) fi ]) AN_IDENTIFIER([size_t], [AC_TYPE_SIZE_T]) AC_DEFUN([AC_TYPE_SIZE_T], [AC_CHECK_TYPE(size_t, unsigned)]) AN_IDENTIFIER([pid_t], [AC_TYPE_PID_T]) AC_DEFUN([AC_TYPE_PID_T], [AC_CHECK_TYPE(pid_t, int)]) AN_IDENTIFIER([off_t], [AC_TYPE_OFF_T]) AC_DEFUN([AC_TYPE_OFF_T], [AC_CHECK_TYPE(off_t, long)]) AN_IDENTIFIER([mode_t], [AC_TYPE_MODE_T]) AC_DEFUN([AC_TYPE_MODE_T], [AC_CHECK_TYPE(mode_t, int)]) # AC_TYPE_SIGNAL # -------------- # Note that identifiers starting with SIG are reserved by ANSI C. AN_FUNCTION([signal], [AC_TYPE_SIGNAL]) AC_DEFUN([AC_TYPE_SIGNAL], [AC_CACHE_CHECK([return type of signal handlers], ac_cv_type_signal, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include #include #ifdef signal # undef signal #endif #ifdef __cplusplus extern "C" void (*signal (int, void (*)(int)))(int); #else void (*signal ()) (); #endif ], [int i;])], [ac_cv_type_signal=void], [ac_cv_type_signal=int])]) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal, [Define as the return type of signal handlers (`int' or `void').]) ]) ## ------------------------ ## ## Checking size of types. ## ## ------------------------ ## # ---------------- # # Generic checks. # # ---------------- # # AC_CHECK_SIZEOF(TYPE, [IGNORED], [INCLUDES = DEFAULT-INCLUDES]) # --------------------------------------------------------------- AC_DEFUN([AC_CHECK_SIZEOF], [AS_LITERAL_IF([$1], [], [AC_FATAL([$0: requires literal arguments])])dnl AC_CHECK_TYPE([$1], [], [], [$3]) AC_CACHE_CHECK([size of $1], AS_TR_SH([ac_cv_sizeof_$1]), [if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then # The cast to unsigned long works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. _AC_COMPUTE_INT([(long) (sizeof ($1))], [AS_TR_SH([ac_cv_sizeof_$1])], [AC_INCLUDES_DEFAULT([$3])], [AC_MSG_FAILURE([cannot compute sizeof ($1), 77])]) else AS_TR_SH([ac_cv_sizeof_$1])=0 fi])dnl AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]), [The size of a `$1', as computed by sizeof.]) ])# AC_CHECK_SIZEOF # ---------------- # # Generic checks. # # ---------------- # # AU::AC_INT_16_BITS # ------------------ # What a great name :) AU_DEFUN([AC_INT_16_BITS], [AC_CHECK_SIZEOF([int]) AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `INT_16_BITS', but upon `SIZEOF_INT'. Remove this warning and the `AC_DEFINE' when you adjust the code.])dnl test $ac_cv_sizeof_int = 2 && AC_DEFINE(INT_16_BITS, 1, [Define to 1 if `sizeof (int)' = 2. Obsolete, use `SIZEOF_INT'.]) ]) # AU::AC_LONG_64_BITS # ------------------- AU_DEFUN([AC_LONG_64_BITS], [AC_CHECK_SIZEOF([long int]) AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `LONG_64_BITS', but upon `SIZEOF_LONG_INT'. Remove this warning and the `AC_DEFINE' when you adjust the code.])dnl test $ac_cv_sizeof_long_int = 8 && AC_DEFINE(LONG_64_BITS, 1, [Define to 1 if `sizeof (long int)' = 8. Obsolete, use `SIZEOF_LONG_INT'.]) ]) ## -------------------------- ## ## Generic structure checks. ## ## -------------------------- ## # ---------------- # # Generic checks. # # ---------------- # # AC_CHECK_MEMBER(AGGREGATE.MEMBER, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # --------------------------------------------------------- # AGGREGATE.MEMBER is for instance `struct passwd.pw_gecos', shell # variables are not a valid argument. AC_DEFUN([AC_CHECK_MEMBER], [AS_LITERAL_IF([$1], [], [AC_FATAL([$0: requires literal arguments])])dnl m4_bmatch([$1], [\.], , [m4_fatal([$0: Did not see any dot in `$1'])])dnl AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl dnl Extract the aggregate name, and the member name AC_CACHE_CHECK([for $1], ac_Member, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], [dnl AGGREGATE ac_aggr; static m4_bpatsubst([$1], [\..*]) ac_aggr; dnl ac_aggr.MEMBER; if (ac_aggr.m4_bpatsubst([$1], [^[^.]*\.])) return 0;])], [AS_VAR_SET(ac_Member, yes)], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], [dnl AGGREGATE ac_aggr; static m4_bpatsubst([$1], [\..*]) ac_aggr; dnl sizeof ac_aggr.MEMBER; if (sizeof ac_aggr.m4_bpatsubst([$1], [^[^.]*\.])) return 0;])], [AS_VAR_SET(ac_Member, yes)], [AS_VAR_SET(ac_Member, no)])])]) AS_IF([test AS_VAR_GET(ac_Member) = yes], [$2], [$3])dnl AS_VAR_POPDEF([ac_Member])dnl ])# AC_CHECK_MEMBER # AC_CHECK_MEMBERS([AGGREGATE.MEMBER, ...], # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] # [INCLUDES]) # --------------------------------------------------------- # The first argument is an m4 list. AC_DEFUN([AC_CHECK_MEMBERS], [m4_foreach([AC_Member], [$1], [AC_CHECK_MEMBER(AC_Member, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_Member), 1, [Define to 1 if `]m4_bpatsubst(AC_Member, [^[^.]*\.])[' is member of `]m4_bpatsubst(AC_Member, [\..*])['.]) $2], [$3], [$4])])]) # ------------------------------------------------------- # # Members that ought to be tested with AC_CHECK_MEMBERS. # # ------------------------------------------------------- # AN_IDENTIFIER([st_blksize], [AC_CHECK_MEMBERS([struct stat.st_blksize])]) AN_IDENTIFIER([st_rdev], [AC_CHECK_MEMBERS([struct stat.st_rdev])]) # Alphabetic order, please. # AC_STRUCT_ST_BLKSIZE # -------------------- AU_DEFUN([AC_STRUCT_ST_BLKSIZE], [AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `HAVE_ST_BLKSIZE', but `HAVE_STRUCT_STAT_ST_BLKSIZE'. Remove this warning and the `AC_DEFINE' when you adjust the code.]) AC_CHECK_MEMBERS([struct stat.st_blksize], [AC_DEFINE(HAVE_ST_BLKSIZE, 1, [Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLKSIZE' instead.])]) ])# AC_STRUCT_ST_BLKSIZE # AC_STRUCT_ST_BLOCKS # ------------------- # If `struct stat' contains an `st_blocks' member, define # HAVE_STRUCT_STAT_ST_BLOCKS. Otherwise, add `fileblocks.o' to the # output variable LIBOBJS. We still define HAVE_ST_BLOCKS for backward # compatibility. In the future, we will activate specializations for # this macro, so don't obsolete it right now. # # AC_OBSOLETE([$0], [; replace it with # AC_CHECK_MEMBERS([struct stat.st_blocks], # [AC_LIBOBJ([fileblocks])]) # Please note that it will define `HAVE_STRUCT_STAT_ST_BLOCKS', # and not `HAVE_ST_BLOCKS'.])dnl # AN_IDENTIFIER([st_blocks], [AC_STRUCT_ST_BLOCKS]) AC_DEFUN([AC_STRUCT_ST_BLOCKS], [AC_CHECK_MEMBERS([struct stat.st_blocks], [AC_DEFINE(HAVE_ST_BLOCKS, 1, [Define to 1 if your `struct stat' has `st_blocks'. Deprecated, use `HAVE_STRUCT_STAT_ST_BLOCKS' instead.])], [AC_LIBOBJ([fileblocks])]) ])# AC_STRUCT_ST_BLOCKS # AC_STRUCT_ST_RDEV # ----------------- AU_DEFUN([AC_STRUCT_ST_RDEV], [AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `HAVE_ST_RDEV', but `HAVE_STRUCT_STAT_ST_RDEV'. Remove this warning and the `AC_DEFINE' when you adjust the code.]) AC_CHECK_MEMBERS([struct stat.st_rdev], [AC_DEFINE(HAVE_ST_RDEV, 1, [Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use `HAVE_STRUCT_STAT_ST_RDEV' instead.])]) ])# AC_STRUCT_ST_RDEV # AC_STRUCT_TM # ------------ # FIXME: This macro is badly named, it should be AC_CHECK_TYPE_STRUCT_TM. # Or something else, but what? AC_CHECK_TYPE_STRUCT_TM_IN_SYS_TIME? AN_IDENTIFIER([tm], [AC_STRUCT_TM]) AC_DEFUN([AC_STRUCT_TM], [AC_CACHE_CHECK([whether struct tm is in sys/time.h or time.h], ac_cv_struct_tm, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [struct tm *tp; tp->tm_sec;])], [ac_cv_struct_tm=time.h], [ac_cv_struct_tm=sys/time.h])]) if test $ac_cv_struct_tm = sys/time.h; then AC_DEFINE(TM_IN_SYS_TIME, 1, [Define to 1 if your declares `struct tm'.]) fi ])# AC_STRUCT_TM # AC_STRUCT_TIMEZONE # ------------------ # Figure out how to get the current timezone. If `struct tm' has a # `tm_zone' member, define `HAVE_TM_ZONE'. Otherwise, if the # external array `tzname' is found, define `HAVE_TZNAME'. AN_IDENTIFIER([tm_zone], [AC_STRUCT_TIMEZONE]) AC_DEFUN([AC_STRUCT_TIMEZONE], [AC_REQUIRE([AC_STRUCT_TM])dnl AC_CHECK_MEMBERS([struct tm.tm_zone],,,[#include #include <$ac_cv_struct_tm> ]) if test "$ac_cv_member_struct_tm_tm_zone" = yes; then AC_DEFINE(HAVE_TM_ZONE, 1, [Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead.]) else AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, [AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include #ifndef tzname /* For SGI. */ extern char *tzname[]; /* RS6000 and others reject char **tzname. */ #endif ]], [atoi(*tzname);])], [ac_cv_var_tzname=yes], [ac_cv_var_tzname=no])]) if test $ac_cv_var_tzname = yes; then AC_DEFINE(HAVE_TZNAME, 1, [Define to 1 if you don't have `tm_zone' but do have the external array `tzname'.]) fi fi ])# AC_STRUCT_TIMEZONE autoconf2.59-2.59+dfsg/lib/autoconf/oldnames.m40000644000175000017500000001213107663162471020502 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Support old macros, and provide automated updates. # Copyright (C) 1994, 1999, 2000, 2001, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Originally written by David J. MacKenzie. ## ---------------------------- ## ## General macros of Autoconf. ## ## ---------------------------- ## AU_ALIAS([AC_WARN], [AC_MSG_WARN]) AU_ALIAS([AC_ERROR], [AC_MSG_ERROR]) AU_ALIAS([AC_HAVE_HEADERS], [AC_CHECK_HEADERS]) AU_ALIAS([AC_HEADER_CHECK], [AC_CHECK_HEADER]) AU_ALIAS([AC_HEADER_EGREP], [AC_EGREP_HEADER]) AU_ALIAS([AC_PREFIX], [AC_PREFIX_PROGRAM]) AU_ALIAS([AC_PROGRAMS_CHECK], [AC_CHECK_PROGS]) AU_ALIAS([AC_PROGRAMS_PATH], [AC_PATH_PROGS]) AU_ALIAS([AC_PROGRAM_CHECK], [AC_CHECK_PROG]) AU_ALIAS([AC_PROGRAM_EGREP], [AC_EGREP_CPP]) AU_ALIAS([AC_PROGRAM_PATH], [AC_PATH_PROG]) AU_ALIAS([AC_SIZEOF_TYPE], [AC_CHECK_SIZEOF]) AU_ALIAS([AC_TEST_CPP], [AC_TRY_CPP]) AU_ALIAS([AC_TEST_PROGRAM], [AC_TRY_RUN]) ## ----------------------------- ## ## Specific macros of Autoconf. ## ## ----------------------------- ## AU_ALIAS([AC_CHAR_UNSIGNED], [AC_C_CHAR_UNSIGNED]) AU_ALIAS([AC_CONST], [AC_C_CONST]) AU_ALIAS([AC_CROSS_CHECK], [AC_C_CROSS]) AU_ALIAS([AC_FIND_X], [AC_PATH_X]) AU_ALIAS([AC_FIND_XTRA], [AC_PATH_XTRA]) AU_ALIAS([AC_GCC_TRADITIONAL], [AC_PROG_GCC_TRADITIONAL]) AU_ALIAS([AC_GETGROUPS_T], [AC_TYPE_GETGROUPS]) AU_ALIAS([AC_INLINE], [AC_C_INLINE]) AU_ALIAS([AC_LN_S], [AC_PROG_LN_S]) AU_ALIAS([AC_LONG_DOUBLE], [AC_C_LONG_DOUBLE]) AU_ALIAS([AC_LONG_FILE_NAMES], [AC_SYS_LONG_FILE_NAMES]) AU_ALIAS([AC_MAJOR_HEADER], [AC_HEADER_MAJOR]) AU_ALIAS([AC_MINUS_C_MINUS_O], [AC_PROG_CC_C_O]) AU_ALIAS([AC_MODE_T], [AC_TYPE_MODE_T]) AU_ALIAS([AC_OFF_T], [AC_TYPE_OFF_T]) AU_ALIAS([AC_PID_T], [AC_TYPE_PID_T]) AU_ALIAS([AC_RESTARTABLE_SYSCALLS], [AC_SYS_RESTARTABLE_SYSCALLS]) AU_ALIAS([AC_RETSIGTYPE], [AC_TYPE_SIGNAL]) AU_ALIAS([AC_SET_MAKE], [AC_PROG_MAKE_SET]) AU_ALIAS([AC_SIZE_T], [AC_TYPE_SIZE_T]) AU_ALIAS([AC_STAT_MACROS_BROKEN], [AC_HEADER_STAT]) AU_ALIAS([AC_STDC_HEADERS], [AC_HEADER_STDC]) AU_ALIAS([AC_ST_BLKSIZE], [AC_STRUCT_ST_BLKSIZE]) AU_ALIAS([AC_ST_BLOCKS], [AC_STRUCT_ST_BLOCKS]) AU_ALIAS([AC_ST_RDEV], [AC_STRUCT_ST_RDEV]) AU_ALIAS([AC_SYS_SIGLIST_DECLARED], [AC_DECL_SYS_SIGLIST]) AU_ALIAS([AC_TIMEZONE], [AC_STRUCT_TIMEZONE]) AU_ALIAS([AC_TIME_WITH_SYS_TIME], [AC_HEADER_TIME]) AU_ALIAS([AC_UID_T], [AC_TYPE_UID_T]) AU_ALIAS([AC_WORDS_BIGENDIAN], [AC_C_BIGENDIAN]) AU_ALIAS([AC_YYTEXT_POINTER], [AC_DECL_YYTEXT]) AU_ALIAS([AM_CYGWIN32], [AC_CYGWIN32]) AU_ALIAS([AC_CYGWIN32], [AC_CYGWIN]) AU_ALIAS([AM_EXEEXT], [AC_EXEEXT]) # We cannot do this, because in libtool.m4 yet they provide # this update. Some solution is needed. # AU_ALIAS([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AU_ALIAS([AM_MINGW32], [AC_MINGW32]) AU_ALIAS([AM_PROG_INSTALL], [AC_PROG_INSTALL]) autoconf2.59-2.59+dfsg/lib/autoconf/libs.m40000644000175000017500000004142207663136371017636 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Checking for libraries. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # Table of contents # # 1. Generic tests for libraries # 2. Tests for specific libraries ## --------------------------------- ## ## 1. Generic tests for libraries.## ## ## --------------------------------- ## # AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [OTHER-LIBRARIES]) # -------------------------------------------------------- # Search for a library defining FUNC, if it's not already available. AC_DEFUN([AC_SEARCH_LIBS], [AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], [ac_func_search_save_LIBS=$LIBS ac_cv_search_$1=no AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [ac_cv_search_$1="none required"]) if test "$ac_cv_search_$1" = no; then for ac_lib in $2; do LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS" AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [ac_cv_search_$1="-l$ac_lib" break]) done fi LIBS=$ac_func_search_save_LIBS]) AS_IF([test "$ac_cv_search_$1" != no], [test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" $3], [$4])dnl ]) # AC_CHECK_LIB(LIBRARY, FUNCTION, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [OTHER-LIBRARIES]) # ------------------------------------------------------ # # Use a cache variable name containing both the library and function name, # because the test really is for library $1 defining function $2, not # just for library $1. Separate tests with the same $1 and different $2s # may have different results. # # Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2]) # is asking for troubles, since AC_CHECK_LIB($lib, fun) would give # ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence # the AS_LITERAL_IF indirection. # # FIXME: This macro is extremely suspicious. It DEFINEs unconditionally, # whatever the FUNCTION, in addition to not being a *S macro. Note # that the cache does depend upon the function we are looking for. # # It is on purpose we used `ac_check_lib_save_LIBS' and not just # `ac_save_LIBS': there are many macros which don't want to see `LIBS' # changed but still want to use AC_CHECK_LIB, so they save `LIBS'. # And ``ac_save_LIBS' is too tempting a name, so let's leave them some # freedom. AC_DEFUN([AC_CHECK_LIB], [m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl AS_LITERAL_IF([$1], [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])], [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl AC_CACHE_CHECK([for $2 in -l$1], ac_Lib, [ac_check_lib_save_LIBS=$LIBS LIBS="-l$1 $5 $LIBS" AC_LINK_IFELSE([AC_LANG_CALL([], [$2])], [AS_VAR_SET(ac_Lib, yes)], [AS_VAR_SET(ac_Lib, no)]) LIBS=$ac_check_lib_save_LIBS]) AS_IF([test AS_VAR_GET(ac_Lib) = yes], [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) LIBS="-l$1 $LIBS" ])], [$4])dnl AS_VAR_POPDEF([ac_Lib])dnl ])# AC_CHECK_LIB # AH_CHECK_LIB(LIBNAME) # --------------------- m4_define([AH_CHECK_LIB], [AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1), [Define to 1 if you have the `]$1[' library (-l]$1[).])]) # AC_HAVE_LIBRARY(LIBRARY, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [OTHER-LIBRARIES]) # --------------------------------------------------------- # # This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION # argument of `main'. In addition, LIBRARY can be written as any of # `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler # is passed `-lfoo'. However, LIBRARY cannot be a shell variable; # it must be a literal name. AU_DEFUN([AC_HAVE_LIBRARY], [m4_pushdef([AC_Lib_Name], m4_bpatsubst(m4_bpatsubst([[$1]], [lib\([^\.]*\)\.a], [\1]), [-l], []))dnl AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main m4_popdef([AC_Lib_Name])dnl ]) ## --------------------------------- ## ## 2. Tests for specific libraries. ## ## --------------------------------- ## # --------------------- # # Checks for X window. # # --------------------- # # _AC_PATH_X_XMKMF # ---------------- # Internal subroutine of _AC_PATH_X. # Set ac_x_includes and/or ac_x_libraries. m4_define([_AC_PATH_X_XMKMF], [rm -fr conftest.dir if mkdir conftest.dir; then cd conftest.dir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat >Imakefile <<'_ACEOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' _ACEOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. 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. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -fr conftest.dir fi ])# _AC_PATH_X_XMKMF # _AC_PATH_X_DIRECT # ----------------- # Internal subroutine of _AC_PATH_X. # Set ac_x_includes and/or ac_x_libraries. m4_define([_AC_PATH_X_DIRECT], [# Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include ])], [# We can compile using X headers with no special include directory. ac_x_includes=], [for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi done]) fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lXt $LIBS" AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include ], [XtMalloc (0)])], [LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries=], [LIBS=$ac_save_LIBS for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl; do if test -r $ac_dir/libXt.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done]) fi # $ac_x_libraries = no ])# _AC_PATH_X_DIRECT # _AC_PATH_X # ---------- # Compute ac_cv_have_x. AC_DEFUN([_AC_PATH_X], [AC_CACHE_VAL(ac_cv_have_x, [# One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no _AC_PATH_X_XMKMF _AC_PATH_X_DIRECT if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi])dnl ]) # AC_PATH_X # --------- # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. AN_HEADER([X11/Xlib.h], [AC_PATH_X]) AC_DEFUN([AC_PATH_X], [dnl Document the X abnormal options inherited from history. m4_divert_once([HELP_BEGIN], [ X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR])dnl AC_MSG_CHECKING([for X]) AC_ARG_WITH(x, [ --with-x use the X Window System]) # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else _AC_PATH_X fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then AC_MSG_RESULT([$have_x]) no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" AC_MSG_RESULT([libraries $x_libraries, headers $x_includes]) fi ])# AC_PATH_X # AC_PATH_XTRA # ------------ # Find additional X libraries, magic flags, etc. AC_DEFUN([AC_PATH_XTRA], [AC_REQUIRE([AC_PATH_X])dnl if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. AC_DEFINE([X_DISPLAY_MISSING], 1, [Define to 1 if the X Window System is missing or not being used.]) X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" dnl FIXME: banish uname from this macro! # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case `(uname -sr) 2>/dev/null` in "SunOS 5"*) AC_MSG_CHECKING([whether -R must be followed by a space]) ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_nospace=yes, ac_R_nospace=no) if test $ac_R_nospace = yes; then AC_MSG_RESULT([no]) X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_space=yes, ac_R_space=no) if test $ac_R_space = yes; then AC_MSG_RESULT([yes]) X_LIBS="$X_LIBS -R $x_libraries" else AC_MSG_RESULT([neither works]) fi fi LIBS=$ac_xsave_LIBS esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" AC_LINK_IFELSE([AC_LANG_CALL([], [XOpenDisplay])], [], [AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) if test $ac_cv_lib_dnet_dnet_ntoa = no; then AC_CHECK_LIB(dnet_stub, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) fi]) LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. AC_CHECK_FUNC(gethostbyname) if test $ac_cv_func_gethostbyname = no; then AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") if test $ac_cv_lib_nsl_gethostbyname = no; then AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. AC_CHECK_FUNC(connect) if test $ac_cv_func_connect = no; then AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , $X_EXTRA_LIBS) fi # Guillermo Gomez says -lposix is necessary on A/UX. AC_CHECK_FUNC(remove) if test $ac_cv_func_remove = no; then AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. AC_CHECK_FUNC(shmat) if test $ac_cv_func_shmat = no; then AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc") fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry AC_CHECK_LIB(ICE, IceConnectionNumber, [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS) LDFLAGS=$ac_save_LDFLAGS fi AC_SUBST(X_CFLAGS)dnl AC_SUBST(X_PRE_LIBS)dnl AC_SUBST(X_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl ])# AC_PATH_XTRA autoconf2.59-2.59+dfsg/lib/autoconf/autoscan.m40000644000175000017500000000643207663135107020520 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Interface with autoscan. # Copyright (C) 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # Written by Akim Demaille. # The prefix `AN' is chosen after `AutoscaN'. # AN_OUTPUT(KIND, WORD, MACROS) # ----------------------------- # Declare that the WORD, used as a KIND, requires triggering the MACROS. m4_define([AN_OUTPUT], []) # AN_FUNCTION(NAME, MACROS) # AN_HEADER(NAME, MACROS) # AN_IDENTIFIER(NAME, MACROS) # AN_LIBRARY(NAME, MACROS) # AN_MAKEVAR(NAME, MACROS) # AN_PROGRAM(NAME, MACROS) # --------------------------- # If the FUNCTION/HEADER etc. is used in the package, then the MACROS # should be invoked from configure.ac. m4_define([AN_FUNCTION], [AN_OUTPUT([function], $@)]) m4_define([AN_HEADER], [AN_OUTPUT([header], $@)]) m4_define([AN_IDENTIFIER], [AN_OUTPUT([identifier], $@)]) m4_define([AN_LIBRARY], [AN_OUTPUT([library], $@)]) m4_define([AN_MAKEVAR], [AN_OUTPUT([makevar], $@)]) m4_define([AN_PROGRAM], [AN_OUTPUT([program], $@)]) autoconf2.59-2.59+dfsg/lib/autoconf/programs.m40000644000175000017500000003760707663136371020551 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Checking for programs. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. ## ----------------------------- ## ## Generic checks for programs. ## ## ----------------------------- ## # AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, # [VALUE-IF-FOUND], [VALUE-IF-NOT-FOUND], # [PATH], [REJECT]) # ----------------------------------------------------- AC_DEFUN([AC_CHECK_PROG], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=$[2] AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_prog_$1, [if test -n "$$1"; then ac_cv_prog_$1="$$1" # Let the user override the test. else m4_ifvaln([$6], [ ac_prog_rejected=no])dnl _AS_PATH_WALK([$5], [for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$ac_word$ac_exec_ext"]); then m4_ifvaln([$6], [ if test "$as_dir/$ac_word$ac_exec_ext" = "$6"; then ac_prog_rejected=yes continue fi])dnl ac_cv_prog_$1="$3" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&AS_MESSAGE_LOG_FD break 2 fi done]) m4_ifvaln([$6], [if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_$1 shift if test $[@%:@] != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set $1 to just the basename; use the full file name. shift ac_cv_prog_$1="$as_dir/$ac_word${1+' '}$[@]" m4_if([$2], [$4], [ else # Default is a loser. AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl m4_default([$5], [\$PATH])]) ])dnl fi fi])dnl dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_CHECK_PROGS will keep looking. m4_ifvaln([$4], [ test -z "$ac_cv_prog_$1" && ac_cv_prog_$1="$4"])dnl fi])dnl $1=$ac_cv_prog_$1 if test -n "$$1"; then AC_MSG_RESULT([$$1]) else AC_MSG_RESULT([no]) fi AC_SUBST($1)dnl ])# AC_CHECK_PROG # AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], # [PATH]) # ------------------------------------------------------------------ AC_DEFUN([AC_CHECK_PROGS], [for ac_prog in $2 do AC_CHECK_PROG([$1], [$ac_prog], [$ac_prog], , [$4]) test -n "$$1" && break done m4_ifvaln([$3], [test -n "$$1" || $1="$3"])]) # AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH]) # ----------------------------------------------------------------------- AC_DEFUN([AC_PATH_PROG], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=$[2] AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL([ac_cv_path_$1], [case $$1 in [[\\/]]* | ?:[[\\/]]*) ac_cv_path_$1="$$1" # Let the user override the test with a path. ;; *) _AS_PATH_WALK([$4], [for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$ac_word$ac_exec_ext"]); then ac_cv_path_$1="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&AS_MESSAGE_LOG_FD break 2 fi done]) dnl If no 3rd arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. m4_ifvaln([$3], [ test -z "$ac_cv_path_$1" && ac_cv_path_$1="$3"])dnl ;; esac])dnl AC_SUBST([$1], [$ac_cv_path_$1]) if test -n "$$1"; then AC_MSG_RESULT([$$1]) else AC_MSG_RESULT([no]) fi ])# AC_PATH_PROG # AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], # [PATH]) # ----------------------------------------------------------------- AC_DEFUN([AC_PATH_PROGS], [for ac_prog in $2 do AC_PATH_PROG([$1], [$ac_prog], , [$4]) test -n "$$1" && break done m4_ifvaln([$3], [test -n "$$1" || $1="$3"])dnl ]) ## -------------------------- ## ## Generic checks for tools. ## ## -------------------------- ## # AC_CHECK_TOOL_PREFIX # -------------------- AU_DEFUN([AC_CHECK_TOOL_PREFIX]) # AC_PATH_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH]) # ----------------------------------------------------------------------- # (Use different variables $1 and ac_pt_$1 so that cache vars don't conflict.) AC_DEFUN([AC_PATH_TOOL], [if test -n "$ac_tool_prefix"; then AC_PATH_PROG([$1], [${ac_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_path_$1"; then ac_pt_$1=$$1 AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4]) $1=$ac_pt_$1 else $1="$ac_cv_path_$1" fi ])# AC_PATH_TOOL # AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH]) # ------------------------------------------------------------------------ # (Use different variables $1 and ac_ct_$1 so that cache vars don't conflict.) AC_DEFUN([AC_CHECK_TOOL], [if test -n "$ac_tool_prefix"; then AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4]) fi if test -z "$ac_cv_prog_$1"; then ac_ct_$1=$$1 AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4]) $1=$ac_ct_$1 else $1="$ac_cv_prog_$1" fi ])# AC_CHECK_TOOL # AC_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], # [PATH]) # ------------------------------------------------------------------ # Check for each tool in PROGS-TO-CHECK-FOR with the cross prefix. If # none can be found with a cross prefix, then use the first one that # was found without the cross prefix. AC_DEFUN([AC_CHECK_TOOLS], [if test -n "$ac_tool_prefix"; then for ac_prog in $2 do AC_CHECK_PROG([$1], [$ac_tool_prefix$ac_prog], [$ac_tool_prefix$ac_prog],, [$4]) test -n "$$1" && break done fi if test -z "$$1"; then ac_ct_$1=$$1 AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4]) $1=$ac_ct_$1 fi ])# AC_CHECK_TOOLS ## ---------------- ## ## Specific tests. ## ## ---------------- ## # Please, keep this section sorted. # (But of course when keeping related things together). # Check for gawk first since it's generally better. AN_MAKEVAR([AWK], [AC_PROG_AWK]) AN_PROGRAM([awk], [AC_PROG_AWK]) AN_PROGRAM([gawk], [AC_PROG_AWK]) AN_PROGRAM([mawk], [AC_PROG_AWK]) AN_PROGRAM([nawk], [AC_PROG_AWK]) AC_DEFUN([AC_PROG_AWK], [AC_CHECK_PROGS(AWK, gawk mawk nawk awk, )]) # AC_PROG_EGREP # ------------- AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])# AC_PROG_EGREP # AC_PROG_FGREP # ------------- AC_DEFUN([AC_PROG_FGREP], [AC_CACHE_CHECK([for fgrep], [ac_cv_prog_fgrep], [if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1 then ac_cv_prog_fgrep='grep -F' else ac_cv_prog_fgrep='fgrep' fi]) FGREP=$ac_cv_prog_fgrep AC_SUBST([FGREP]) ])# AC_PROG_FGREP # AC_PROG_INSTALL # --------------- AN_MAKEVAR([INSTALL], [AC_PROG_INSTALL]) AN_PROGRAM([install], [AC_PROG_INSTALL]) AC_DEFUN([AC_PROG_INSTALL], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. AC_MSG_CHECKING([for a BSD-compatible install]) if test -z "$INSTALL"; then AC_CACHE_VAL(ac_cv_path_install, [_AS_PATH_WALK([$PATH], [# Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$ac_prog$ac_exec_ext"]); then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac]) ])dnl if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi dnl We do special magic for INSTALL instead of AC_SUBST, to get dnl relative paths right. AC_MSG_RESULT([$INSTALL]) # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' AC_SUBST(INSTALL_PROGRAM)dnl test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' AC_SUBST(INSTALL_SCRIPT)dnl test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' AC_SUBST(INSTALL_DATA)dnl ])# AC_PROG_INSTALL # AC_PROG_LEX # ----------- # Look for flex or lex. Set its associated library to LEXLIB. # Check if lex declares yytext as a char * by default, not a char[]. AN_MAKEVAR([LEX], [AC_PROG_LEX]) AN_PROGRAM([lex], [AC_PROG_LEX]) AN_PROGRAM([flex], [AC_PROG_LEX]) AC_DEFUN_ONCE([AC_PROG_LEX], [AC_CHECK_PROGS(LEX, flex lex, :) if test -z "$LEXLIB" then AC_CHECK_LIB(fl, yywrap, LEXLIB="-lfl", [AC_CHECK_LIB(l, yywrap, LEXLIB="-ll")]) fi AC_SUBST(LEXLIB) if test "x$LEX" != "x:"; then _AC_PROG_LEX_YYTEXT_DECL fi]) # _AC_PROG_LEX_YYTEXT_DECL # ------------------------ # Check if lex declares yytext as a char * by default, not a char[]. m4_define([_AC_PROG_LEX_YYTEXT_DECL], [AC_CACHE_CHECK(lex output file root, 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. cat >conftest.l <<_ACEOF %% %% _ACEOF AC_TRY_EVAL(LEX conftest.l) if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else AC_MSG_ERROR([cannot find output from $LEX; giving up]) fi]) rm -f conftest.l AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root])dnl AC_CACHE_CHECK(whether yytext is a pointer, 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_LINK_IFELSE([`cat $LEX_OUTPUT_ROOT.c`], ac_cv_prog_lex_yytext_pointer=yes) LIBS=$ac_save_LIBS rm -f "${LEX_OUTPUT_ROOT}.c" ]) dnl if test $ac_cv_prog_lex_yytext_pointer = yes; then AC_DEFINE(YYTEXT_POINTER, 1, [Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'.]) fi ])# _AC_PROG_LEX_YYTEXT_DECL # Require AC_PROG_LEX in case some people were just calling this macro. AU_DEFUN([AC_DECL_YYTEXT], [AC_PROG_LEX]) # AC_PROG_LN_S # ------------ AN_MAKEVAR([LN], [AC_PROG_LN_S]) AN_PROGRAM([ln], [AC_PROG_LN_S]) AC_DEFUN([AC_PROG_LN_S], [AC_MSG_CHECKING([whether ln -s works]) AC_SUBST([LN_S], [$as_ln_s])dnl if test "$LN_S" = "ln -s"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no, using $LN_S]) fi ])# AC_PROG_LN_S # AC_PROG_MAKE_SET # ---------------- # Define SET_MAKE to set ${MAKE} if make doesn't. AN_MAKEVAR([MAKE], [AC_PROG_MAKE_SET]) AN_PROGRAM([make], [AC_PROG_MAKE_SET]) AC_DEFUN([AC_PROG_MAKE_SET], [AC_MSG_CHECKING([whether ${MAKE-make} sets \$(MAKE)]) set dummy ${MAKE-make}; ac_make=`echo "$[2]" | sed 'y,:./+-,___p_,'` AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set, [cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make])dnl if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then AC_MSG_RESULT([yes]) SET_MAKE= else AC_MSG_RESULT([no]) SET_MAKE="MAKE=${MAKE-make}" fi AC_SUBST([SET_MAKE])dnl ])# AC_PROG_MAKE_SET # AC_PROG_RANLIB # -------------- AN_MAKEVAR([RANLIB], [AC_PROG_RANLIB]) AN_PROGRAM([ranlib], [AC_PROG_RANLIB]) AC_DEFUN([AC_PROG_RANLIB], [AC_CHECK_TOOL(RANLIB, ranlib, :)]) # AC_RSH # ------ # I don't know what it used to do, but it no longer does. AU_DEFUN([AC_RSH], [AC_DIAGNOSE([obsolete], [$0: is no longer supported. Remove this warning when you adjust the code.])]) # AC_PROG_YACC # ------------ AN_MAKEVAR([BISON], [AC_PROG_YACC]) AN_MAKEVAR([YACC], [AC_PROG_YACC]) AN_PROGRAM([yacc], [AC_PROG_YACC]) AN_PROGRAM([byacc], [AC_PROG_YACC]) AN_PROGRAM([bison], [AC_PROG_YACC]) AC_DEFUN([AC_PROG_YACC], [AC_CHECK_PROGS(YACC, 'bison -y' byacc, yacc)]) autoconf2.59-2.59+dfsg/lib/autoconf/autoconf.m40000644000175000017500000001075207663136371020525 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Driver that loads the Autoconf macro files. # Copyright (C) 1994, 1999, 2000, 2001, 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie and many others. # # Do not sinclude acsite.m4 here, because it may not be installed # yet when Autoconf is frozen. # Do not sinclude ./aclocal.m4 here, to prevent it from being frozen. # general includes some AU_DEFUN. m4_include([autoconf/autoupdate.m4]) m4_include([autoconf/autoscan.m4]) m4_include([autoconf/general.m4]) m4_include([autoconf/status.m4]) m4_include([autoconf/autoheader.m4]) m4_include([autoconf/autotest.m4]) m4_include([autoconf/programs.m4]) m4_include([autoconf/lang.m4]) m4_include([autoconf/c.m4]) m4_include([autoconf/fortran.m4]) m4_include([autoconf/functions.m4]) m4_include([autoconf/headers.m4]) m4_include([autoconf/types.m4]) m4_include([autoconf/libs.m4]) m4_include([autoconf/specific.m4]) m4_include([autoconf/oldnames.m4]) # We discourage the use of the non prefixed macro names: M4sugar maps # all the builtins into `m4_'. Autoconf has been converted to these # names too. But users may still depend upon these, so reestablish # them. m4_copy_unm4([m4_builtin]) m4_copy_unm4([m4_changequote]) m4_copy_unm4([m4_decr]) m4_copy_unm4([m4_define]) m4_copy_unm4([m4_defn]) m4_copy_unm4([m4_divert]) m4_copy_unm4([m4_divnum]) m4_copy_unm4([m4_errprint]) m4_copy_unm4([m4_esyscmd]) m4_copy_unm4([m4_ifdef]) m4_copy([m4_if], [ifelse]) m4_copy_unm4([m4_incr]) m4_copy_unm4([m4_index]) m4_copy_unm4([m4_indir]) m4_copy_unm4([m4_len]) m4_copy([m4_bpatsubst], [patsubst]) m4_copy_unm4([m4_popdef]) m4_copy_unm4([m4_pushdef]) m4_copy([m4_bregexp], [regexp]) m4_copy_unm4([m4_sinclude]) m4_copy_unm4([m4_syscmd]) m4_copy_unm4([m4_sysval]) m4_copy_unm4([m4_traceoff]) m4_copy_unm4([m4_traceon]) m4_copy_unm4([m4_translit]) m4_copy_unm4([m4_undefine]) m4_copy_unm4([m4_undivert]) # Yet some people have started to use m4_patsubst and m4_regexp. m4_define([m4_patsubst], [m4_expand_once([m4_warn([syntax], [do not use m4_patsubst: use patsubst or m4_bpatsubst])])dnl patsubst($@)]) m4_define([m4_regexp], [m4_expand_once([m4_warn([syntax], [do not use m4_regexp: use regexp or m4_bregexp])])dnl regexp($@)]) autoconf2.59-2.59+dfsg/lib/autoconf/fortran.m40000644000175000017500000012227707750417555020373 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Fortran languages support. # Copyright (C) 2001, 2003 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # Fortran vs. Fortran 77: # This file contains macros for both "Fortran 77" and "Fortran", where # the former is the "classic" autoconf Fortran interface and is intended # for legacy F77 codes, while the latter is intended to support newer Fortran # dialects. Fortran 77 uses environment variables F77, FFLAGS, and FLIBS, # while Fortran uses FC, FCFLAGS, and FCLIBS. For each user-callable AC_* # macro, there is generally both an F77 and an FC version, where both versions # share the same _AC_*_FC_* backend. This backend macro requires that # the appropriate language be AC_LANG_PUSH'ed, and uses _AC_LANG_ABBREV and # _AC_LANG_PREFIX in order to name cache and environment variables, etc. # _AC_LIST_MEMBER_IF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # # Processing the elements of a list is tedious in shell programming, # as lists tend to be implemented as space delimited strings. # # This macro searches LIST for ELEMENT, and executes ACTION-IF-FOUND # if ELEMENT is a member of LIST, otherwise it executes # ACTION-IF-NOT-FOUND. AC_DEFUN([_AC_LIST_MEMBER_IF], [dnl Do some sanity checking of the arguments. m4_if([$1], , [AC_FATAL([$0: missing argument 1])])dnl m4_if([$2], , [AC_FATAL([$0: missing argument 2])])dnl ac_exists=false for ac_i in $2; do if test x"$1" = x"$ac_i"; then ac_exists=true break fi done AS_IF([test x"$ac_exists" = xtrue], [$3], [$4])[]dnl ])# _AC_LIST_MEMBER_IF # _AC_LINKER_OPTION(LINKER-OPTIONS, SHELL-VARIABLE) # ------------------------------------------------- # # Specifying options to the compiler (whether it be the C, C++ or # Fortran 77 compiler) that are meant for the linker is compiler # dependent. This macro lets you give options to the compiler that # are meant for the linker in a portable, compiler-independent way. # # This macro take two arguments, a list of linker options that the # compiler should pass to the linker (LINKER-OPTIONS) and the name of # a shell variable (SHELL-VARIABLE). The list of linker options are # appended to the shell variable in a compiler-dependent way. # # For example, if the selected language is C, then this: # # _AC_LINKER_OPTION([-R /usr/local/lib/foo], foo_LDFLAGS) # # will expand into this if the selected C compiler is gcc: # # foo_LDFLAGS="-Xlinker -R -Xlinker /usr/local/lib/foo" # # otherwise, it will expand into this: # # foo_LDFLAGS"-R /usr/local/lib/foo" # # You are encouraged to add support for compilers that this macro # doesn't currently support. # FIXME: Get rid of this macro. AC_DEFUN([_AC_LINKER_OPTION], [if test "$ac_compiler_gnu" = yes; then for ac_link_opt in $1; do $2="[$]$2 -Xlinker $ac_link_opt" done else $2="[$]$2 $1" fi[]dnl ])# _AC_LINKER_OPTION ## ----------------------- ## ## 1. Language selection. ## ## ----------------------- ## # -------------------------- # # 1d. The Fortran language. # # -------------------------- # # AC_LANG(Fortran 77) # ------------------- m4_define([AC_LANG(Fortran 77)], [ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' ac_compiler_gnu=$ac_cv_f77_compiler_gnu ]) # AC_LANG(Fortran) # ---------------- m4_define([AC_LANG(Fortran)], [ac_ext=${FC_SRCEXT-f} ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' ac_compiler_gnu=$ac_cv_fc_compiler_gnu ]) # AC_LANG_FORTRAN77 # ----------------- AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)]) # _AC_FORTRAN_ASSERT # ------------------ # Current language must be Fortran or Fortran 77. m4_defun([_AC_FORTRAN_ASSERT], [m4_if(_AC_LANG, [Fortran], [], [m4_if(_AC_LANG, [Fortran 77], [], [m4_fatal([$0: current language is not Fortran: ] _AC_LANG)])])]) # _AC_LANG_ABBREV(Fortran 77) # --------------------------- m4_define([_AC_LANG_ABBREV(Fortran 77)], [f77]) # _AC_LANG_ABBREV(Fortran) # ------------------------ m4_define([_AC_LANG_ABBREV(Fortran)], [fc]) # _AC_LANG_PREFIX(Fortran 77) # --------------------------- m4_define([_AC_LANG_PREFIX(Fortran 77)], [F]) # _AC_LANG_PREFIX(Fortran) # ------------------------ m4_define([_AC_LANG_PREFIX(Fortran)], [FC]) # _AC_FC # ------ # Return F77 or FC, depending upon the language. AC_DEFUN([_AC_FC], [_AC_FORTRAN_ASSERT()dnl AC_LANG_CASE([Fortran 77], [F77], [Fortran], [FC])]) ## ---------------------- ## ## 2.Producing programs. ## ## ---------------------- ## # --------------------- # # 2d. Fortran sources. # # --------------------- # # AC_LANG_SOURCE(Fortran 77)(BODY) # AC_LANG_SOURCE(Fortran)(BODY) # -------------------------------- # FIXME: Apparently, according to former AC_TRY_COMPILER, the CPP # directives must not be included. But AC_TRY_RUN_NATIVE was not # avoiding them, so? m4_define([AC_LANG_SOURCE(Fortran 77)], [$1]) m4_define([AC_LANG_SOURCE(Fortran)], [$1]) # AC_LANG_PROGRAM(Fortran 77)([PROLOGUE], [BODY]) # ----------------------------------------------- # Yes, we discard the PROLOGUE. m4_define([AC_LANG_PROGRAM(Fortran 77)], [m4_ifval([$1], [m4_warn([syntax], [$0: ignoring PROLOGUE: $1])])dnl program main $2 end]) # AC_LANG_PROGRAM(Fortran)([PROLOGUE], [BODY]) # ----------------------------------------------- # FIXME: can the PROLOGUE be used? m4_define([AC_LANG_PROGRAM(Fortran)], [m4_ifval([$1], [m4_warn([syntax], [$0: ignoring PROLOGUE: $1])])dnl program main $2 end]) # AC_LANG_CALL(Fortran 77)(PROLOGUE, FUNCTION) # -------------------------------------------- # FIXME: This is a guess, help! m4_define([AC_LANG_CALL(Fortran 77)], [AC_LANG_PROGRAM([$1], [ call $2])]) # AC_LANG_CALL(Fortran)(PROLOGUE, FUNCTION) # -------------------------------------------- # FIXME: This is a guess, help! m4_define([AC_LANG_CALL(Fortran)], [AC_LANG_PROGRAM([$1], [ call $2])]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## # -------------------------- # # 3d. The Fortran compiler. # # -------------------------- # # AC_LANG_PREPROC(Fortran 77) # --------------------------- # Find the Fortran 77 preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_PREPROC(Fortran 77)], [m4_warn([syntax], [$0: No preprocessor defined for ]_AC_LANG)]) # AC_LANG_PREPROC(Fortran) # --------------------------- # Find the Fortran preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_PREPROC(Fortran)], [m4_warn([syntax], [$0: No preprocessor defined for ]_AC_LANG)]) # AC_LANG_COMPILER(Fortran 77) # ---------------------------- # Find the Fortran 77 compiler. Must be AC_DEFUN'd to be # AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(Fortran 77)], [AC_REQUIRE([AC_PROG_F77])]) # AC_LANG_COMPILER(Fortran) # ---------------------------- # Find the Fortran compiler. Must be AC_DEFUN'd to be # AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(Fortran)], [AC_REQUIRE([AC_PROG_FC])]) # ac_cv_prog_g77 # -------------- # We used to name the cache variable this way. AU_DEFUN([ac_cv_prog_g77], [ac_cv_f77_compiler_gnu]) # _AC_FC_DIALECT_YEAR([DIALECT]) # ------------------------------ # Given a Fortran DIALECT, which is Fortran [YY]YY or simply [YY]YY, # convert to a 4-digit year. The dialect must be one of Fortran 77, # 90, 95, or 2000, currently. If DIALECT is simply Fortran or the # empty string, returns the empty string. AC_DEFUN([_AC_FC_DIALECT_YEAR], [m4_case(m4_bpatsubsts(m4_tolower([$1]), [fortran],[], [ *],[]), [77],[1977], [1977],[1977], [90],[1990], [1990],[1990], [95],[1995], [1995],[1995], [2000],[2000], [],[], [m4_fatal([unknown Fortran dialect])])]) # _AC_PROG_FC([DIALECT], [COMPILERS...]) # -------------------------------------- # DIALECT is a Fortran dialect, given by Fortran [YY]YY or simply [YY]YY, # and must be one of those supported by _AC_FC_DIALECT_YEAR # # If DIALECT is supplied, then we search for compilers of that dialect # first, and then later dialects. Otherwise, we search for compilers # of the newest dialect first, and then earlier dialects in increasing age. # This search order is necessarily imperfect because the dialect cannot # always be inferred from the compiler name. # # Known compilers: # f77/f90/f95: generic compiler names # g77: GNU Fortran 77 compiler # gfortran: putative GNU Fortran 95+ compiler (in progress) # fort77: native F77 compiler under HP-UX (and some older Crays) # frt: Fujitsu F77 compiler # pgf77/pgf90/pgf95: Portland Group F77/F90/F95 compilers # xlf/xlf90/xlf95: IBM (AIX) F77/F90/F95 compilers # lf95: Lahey-Fujitsu F95 compiler # fl32: Microsoft Fortran 77 "PowerStation" compiler # af77: Apogee F77 compiler for Intergraph hardware running CLIX # epcf90: "Edinburgh Portable Compiler" F90 # fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha # ifc: Intel Fortran 95 compiler for Linux/x86 # efc: Intel Fortran 95 compiler for IA64 m4_define([_AC_F95_FC], [f95 fort xlf95 ifc efc pgf95 lf95 gfortran]) m4_define([_AC_F90_FC], [f90 xlf90 pgf90 epcf90]) m4_define([_AC_F77_FC], [g77 f77 xlf frt pgf77 fort77 fl32 af77]) AC_DEFUN([_AC_PROG_FC], [_AC_FORTRAN_ASSERT()dnl AC_CHECK_TOOLS([]_AC_FC[], m4_default([$2], m4_case(_AC_FC_DIALECT_YEAR([$1]), [1995], [_AC_F95_FC], [1990], [_AC_F90_FC _AC_F95_FC], [1977], [_AC_F77_FC _AC_F90_FC _AC_F95_FC], [_AC_F95_FC _AC_F90_FC _AC_F77_FC]))) # Provide some information about the compiler. echo "$as_me:__oline__:" \ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` _AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) _AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) _AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) rm -f a.out m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F _AC_LANG_COMPILER_GNU ac_ext=$ac_save_ext _AC_PROG_FC_G ])# _AC_PROG_FC # AC_PROG_F77([COMPILERS...]) # --------------------------- # COMPILERS is a space separated list of Fortran 77 compilers to search # for. See also _AC_PROG_FC. AC_DEFUN([AC_PROG_F77], [AC_LANG_PUSH(Fortran 77)dnl AC_ARG_VAR([F77], [Fortran 77 compiler command])dnl AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl _AC_PROG_FC([Fortran 77], [$1]) G77=`test $ac_compiler_gnu = yes && echo yes` AC_LANG_POP(Fortran 77)dnl ])# AC_PROG_F77 # AC_PROG_FC([COMPILERS...], [DIALECT]) # ------------------------------------- # COMPILERS is a space separated list of Fortran 77 compilers to search # for, and [DIALECT] is an optional dialect. See also _AC_PROG_FC. AC_DEFUN([AC_PROG_FC], [AC_LANG_PUSH(Fortran)dnl AC_ARG_VAR([FC], [Fortran compiler command])dnl AC_ARG_VAR([FCFLAGS], [Fortran compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl _AC_PROG_FC([$2], [$1]) AC_LANG_POP(Fortran)dnl ])# AC_PROG_FC # _AC_PROG_FC_G # ------------- # Check whether -g works, even if F[C]FLAGS is set, in case the package # plays around with F[C]FLAGS (such as to build both debugging and normal # versions of a library), tasteless as that idea is. m4_define([_AC_PROG_FC_G], [_AC_FORTRAN_ASSERT()dnl ac_test_FFLAGS=${[]_AC_LANG_PREFIX[]FLAGS+set} ac_save_FFLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS= AC_CACHE_CHECK(whether $[]_AC_FC[] accepts -g, ac_cv_prog_[]_AC_LANG_ABBREV[]_g, [_AC_LANG_PREFIX[]FLAGS=-g _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_[]_AC_LANG_ABBREV[]_g=yes], [ac_cv_prog_[]_AC_LANG_ABBREV[]_g=no]) ]) if test "$ac_test_FFLAGS" = set; then _AC_LANG_PREFIX[]FLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_[]_AC_LANG_ABBREV[]_g = yes; then if test "x$ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu" = xyes; then _AC_LANG_PREFIX[]FLAGS="-g -O2" else _AC_LANG_PREFIX[]FLAGS="-g" fi else if test "x$ac_cv_[]_AC_LANG_ABBREV[]_compiler_gnu" = xyes; then _AC_LANG_PREFIX[]FLAGS="-O2" else _AC_LANG_PREFIX[]FLAGS= fi fi[]dnl ])# _AC_PROG_FC_G # _AC_PROG_FC_C_O # --------------- # Test if the Fortran compiler accepts the options `-c' and `-o' # simultaneously, and define `[F77/FC]_NO_MINUS_C_MINUS_O' if it does not. # # The usefulness of this macro is questionable, as I can't really see # why anyone would use it. The only reason I include it is for # completeness, since a similar test exists for the C compiler. # # FIXME: it seems like we could merge the C/Fortran versions of this. AC_DEFUN([_AC_PROG_FC_C_O], [_AC_FORTRAN_ASSERT()dnl AC_CACHE_CHECK([whether $[]_AC_FC[] understands -c and -o together], [ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # We test twice because some compilers refuse to overwrite an existing # `.o' file with `-o', although they will create one. ac_try='$[]_AC_FC[] $[]_AC_LANG_PREFIX[]FLAGS -c conftest.$ac_ext -o conftest.$ac_objext >&AS_MESSAGE_LOG_FD' if AC_TRY_EVAL(ac_try) && test -f conftest.$ac_objext && AC_TRY_EVAL(ac_try); then ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o=yes else ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o=no fi rm -f conftest*]) if test $ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o = no; then AC_DEFINE([]_AC_FC[]_NO_MINUS_C_MINUS_O, 1, [Define to 1 if your Fortran compiler doesn't accept -c and -o together.]) fi ])# _AC_PROG_FC_C_O # AC_PROG_F77_C_O # --------------- AC_DEFUN([AC_PROG_F77_C_O], [AC_REQUIRE([AC_PROG_F77])dnl AC_LANG_PUSH(Fortran 77)dnl _AC_PROG_FC_C_O AC_LANG_POP(Fortran 77)dnl ])# AC_PROG_F77_C_O # AC_PROG_FC_C_O # --------------- AC_DEFUN([AC_PROG_FC_C_O], [AC_REQUIRE([AC_PROG_FC])dnl AC_LANG_PUSH(Fortran)dnl _AC_PROG_FC_C_O AC_LANG_POP(Fortran)dnl ])# AC_PROG_FC_C_O ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ## # ---------------------------------------- # # 4d. Fortran 77 compiler characteristics. # # ---------------------------------------- # # _AC_PROG_FC_V_OUTPUT([FLAG = $ac_cv_prog_{f77/fc}_v]) # ------------------------------------------------- # Link a trivial Fortran program, compiling with a verbose output FLAG # (whose default value, $ac_cv_prog_{f77/fc}_v, is computed by # _AC_PROG_FC_V), and return the output in $ac_{f77/fc}_v_output. This # output is processed in the way expected by _AC_FC_LIBRARY_LDFLAGS, # so that any link flags that are echoed by the compiler appear as # space-separated items. AC_DEFUN([_AC_PROG_FC_V_OUTPUT], [_AC_FORTRAN_ASSERT()dnl AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Compile and link our simple test program by passing a flag (argument # 1 to this macro) to the Fortran compiler in order to get # "verbose" output that we can then parse for the Fortran linker # flags. ac_save_FFLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS m4_default([$1], [$ac_cv_prog_[]_AC_LANG_ABBREV[]_v])" (eval echo $as_me:__oline__: \"$ac_link\") >&AS_MESSAGE_LOG_FD ac_[]_AC_LANG_ABBREV[]_v_output=`eval $ac_link AS_MESSAGE_LOG_FD>&1 2>&1 | grep -v 'Driving:'` echo "$ac_[]_AC_LANG_ABBREV[]_v_output" >&AS_MESSAGE_LOG_FD _AC_LANG_PREFIX[]FLAGS=$ac_save_FFLAGS rm -f conftest* # On HP/UX there is a line like: "LPATH is: /foo:/bar:/baz" where # /foo, /bar, and /baz are search directories for the Fortran linker. # Here, we change these into -L/foo -L/bar -L/baz (and put it first): ac_[]_AC_LANG_ABBREV[]_v_output="`echo $ac_[]_AC_LANG_ABBREV[]_v_output | grep 'LPATH is:' | sed 's,.*LPATH is\(: *[[^ ]]*\).*,\1,;s,: */, -L/,g'` $ac_[]_AC_LANG_ABBREV[]_v_output" case $ac_[]_AC_LANG_ABBREV[]_v_output in # If we are using xlf then replace all the commas with spaces. *xlfentry*) ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed 's/,/ /g'` ;; # With Intel ifc, ignore the quoted -mGLOB_options_string stuff (quoted # $LIBS confuse us, and the libraries appear later in the output anyway). *mGLOB_options_string*) ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed 's/\"-mGLOB[[^\"]]*\"/ /g'` ;; # If we are using Cray Fortran then delete quotes. # Use "\"" instead of '"' for font-lock-mode. # FIXME: a more general fix for quoted arguments with spaces? *cft90*) ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed "s/\"//g"` ;; esac ])# _AC_PROG_FC_V_OUTPUT # _AC_PROG_FC_V # -------------- # # Determine the flag that causes the Fortran compiler to print # information of library and object files (normally -v) # Needed for _AC_FC_LIBRARY_FLAGS # Some compilers don't accept -v (Lahey: -verbose, xlf: -V, Fujitsu: -###) AC_DEFUN([_AC_PROG_FC_V], [_AC_FORTRAN_ASSERT()dnl AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]], [ac_cv_prog_[]_AC_LANG_ABBREV[]_v], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_[]_AC_LANG_ABBREV[]_v= # Try some options frequently used verbose output for ac_verb in -v -verbose --verbose -V -\#\#\#; do _AC_PROG_FC_V_OUTPUT($ac_verb) # look for -l* and *.a constructs in the output for ac_arg in $ac_[]_AC_LANG_ABBREV[]_v_output; do case $ac_arg in [[\\/]]*.a | ?:[[\\/]]*.a | -[[lLRu]]*) ac_cv_prog_[]_AC_LANG_ABBREV[]_v=$ac_verb break 2 ;; esac done done if test -z "$ac_cv_prog_[]_AC_LANG_ABBREV[]_v"; then AC_MSG_WARN([cannot determine how to obtain linking information from $[]_AC_FC[]]) fi], [AC_MSG_WARN([compilation failed])]) ])])# _AC_PROG_FC_V # _AC_FC_LIBRARY_LDFLAGS # ---------------------- # # Determine the linker flags (e.g. "-L" and "-l") for the Fortran # intrinsic and run-time libraries that are required to successfully # link a Fortran program or shared library. The output variable # FLIBS/FCLIBS is set to these flags. # # This macro is intended to be used in those situations when it is # necessary to mix, e.g. C++ and Fortran, source code into a single # program or shared library. # # For example, if object files from a C++ and Fortran compiler must # be linked together, then the C++ compiler/linker must be used for # linking (since special C++-ish things need to happen at link time # like calling global constructors, instantiating templates, enabling # exception support, etc.). # # However, the Fortran intrinsic and run-time libraries must be # linked in as well, but the C++ compiler/linker doesn't know how to # add these Fortran libraries. Hence, the macro # "AC_F77_LIBRARY_LDFLAGS" was created to determine these Fortran # libraries. # # This macro was packaged in its current form by Matthew D. Langston. # However, nearly all of this macro came from the "OCTAVE_FLIBS" macro # in "octave-2.0.13/aclocal.m4", and full credit should go to John # W. Eaton for writing this extremely useful macro. Thank you John. AC_DEFUN([_AC_FC_LIBRARY_LDFLAGS], [_AC_FORTRAN_ASSERT()dnl _AC_PROG_FC_V AC_CACHE_CHECK([for Fortran libraries of $[]_AC_FC[]], ac_cv_[]_AC_LANG_ABBREV[]_libs, [if test "x$[]_AC_LANG_PREFIX[]LIBS" != "x"; then ac_cv_[]_AC_LANG_ABBREV[]_libs="$[]_AC_LANG_PREFIX[]LIBS" # Let the user override the test. else _AC_PROG_FC_V_OUTPUT ac_cv_[]_AC_LANG_ABBREV[]_libs= # Save positional arguments (if any) ac_save_positional="$[@]" set X $ac_[]_AC_LANG_ABBREV[]_v_output while test $[@%:@] != 1; do shift ac_arg=$[1] case $ac_arg in [[\\/]]*.a | ?:[[\\/]]*.a) _AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, , ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg") ;; -bI:*) _AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, , [_AC_LINKER_OPTION([$ac_arg], ac_cv_[]_AC_LANG_ABBREV[]_libs)]) ;; # Ignore these flags. -lang* | -lcrt[[01]].o | -lcrtbegin.o | -lc | -lgcc | -libmil | -LANG:=*) ;; -lkernel32) test x"$CYGWIN" != xyes && ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg" ;; -[[LRuY]]) # These flags, when seen by themselves, take an argument. # We remove the space between option and argument and re-iterate # unless we find an empty arg or a new option (starting with -) case $[2] in "" | -*);; *) ac_arg="$ac_arg$[2]" shift; shift set X $ac_arg "$[@]" ;; esac ;; -YP,*) for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do _AC_LIST_MEMBER_IF($ac_j, $ac_cv_[]_AC_LANG_ABBREV[]_libs, , [ac_arg="$ac_arg $ac_j" ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_j"]) done ;; -[[lLR]]*) _AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, , ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg") ;; # Ignore everything else. esac done # restore positional arguments set X $ac_save_positional; shift # We only consider "LD_RUN_PATH" on Solaris systems. If this is seen, # then we insist that the "run path" must be an absolute path (i.e. it # must begin with a "/"). case `(uname -sr) 2>/dev/null` in "SunOS 5"*) ac_ld_run_path=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'` test "x$ac_ld_run_path" != x && _AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_[]_AC_LANG_ABBREV[]_libs) ;; esac fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x" ]) []_AC_LANG_PREFIX[]LIBS="$ac_cv_[]_AC_LANG_ABBREV[]_libs" AC_SUBST([]_AC_LANG_PREFIX[]LIBS) ])# _AC_FC_LIBRARY_LDFLAGS # AC_F77_LIBRARY_LDFLAGS # ---------------------- AC_DEFUN([AC_F77_LIBRARY_LDFLAGS], [AC_REQUIRE([AC_PROG_F77])dnl AC_LANG_PUSH(Fortran 77)dnl _AC_FC_LIBRARY_LDFLAGS AC_LANG_POP(Fortran 77)dnl ])# AC_F77_LIBRARY_LDFLAGS # AC_FC_LIBRARY_LDFLAGS # ---------------------- AC_DEFUN([AC_FC_LIBRARY_LDFLAGS], [AC_REQUIRE([AC_PROG_FC])dnl AC_LANG_PUSH(Fortran)dnl _AC_FC_LIBRARY_LDFLAGS AC_LANG_POP(Fortran)dnl ])# AC_FC_LIBRARY_LDFLAGS # _AC_FC_DUMMY_MAIN([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # ----------------------------------------------------------- # # Detect name of dummy main routine required by the Fortran libraries, # (if any) and define {F77,FC}_DUMMY_MAIN to this name (which should be # used for a dummy declaration, if it is defined). On some systems, # linking a C program to the Fortran library does not work unless you # supply a dummy function called something like MAIN__. # # Execute ACTION-IF-NOT-FOUND if no way of successfully linking a C # program with the {F77,FC} libs is found; default to exiting with an error # message. Execute ACTION-IF-FOUND if a dummy routine name is needed # and found or if it is not needed (default to defining {F77,FC}_DUMMY_MAIN # when needed). # # What is technically happening is that the Fortran libraries provide # their own main() function, which usually initializes Fortran I/O and # similar stuff, and then calls MAIN__, which is the entry point of # your program. Usually, a C program will override this with its own # main() routine, but the linker sometimes complain if you don't # provide a dummy (never-called) MAIN__ routine anyway. # # Of course, programs that want to allow Fortran subroutines to do # I/O, etcetera, should call their main routine MAIN__() (or whatever) # instead of main(). A separate autoconf test (_AC_FC_MAIN) checks # for the routine to use in this case (since the semantics of the test # are slightly different). To link to e.g. purely numerical # libraries, this is normally not necessary, however, and most C/C++ # programs are reluctant to turn over so much control to Fortran. =) # # The name variants we check for are (in order): # MAIN__ (g77, MAIN__ required on some systems; IRIX, MAIN__ optional) # MAIN_, __main (SunOS) # MAIN _MAIN __MAIN main_ main__ _main (we follow DDD and try these too) AC_DEFUN([_AC_FC_DUMMY_MAIN], [_AC_FORTRAN_ASSERT()dnl m4_define(_AC_LANG_PROGRAM_C_[]_AC_FC[]_HOOKS, [#ifdef ]_AC_FC[_DUMMY_MAIN ]AC_LANG_CASE([Fortran], [#ifndef FC_DUMMY_MAIN_EQ_F77]) [# ifdef __cplusplus extern "C" # endif int ]_AC_FC[_DUMMY_MAIN() { return 1; } ]AC_LANG_CASE([Fortran], [#endif]) [#endif ]) AC_CACHE_CHECK([for dummy main to link with Fortran libraries], ac_cv_[]_AC_LANG_ABBREV[]_dummy_main, [ac_[]_AC_LANG_ABBREV[]_dm_save_LIBS=$LIBS LIBS="$LIBS $[]_AC_LANG_PREFIX[]LIBS" ac_fortran_dm_var=[]_AC_FC[]_DUMMY_MAIN AC_LANG_PUSH(C)dnl # First, try linking without a dummy main: AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [ac_cv_fortran_dummy_main=none], [ac_cv_fortran_dummy_main=unknown]) if test $ac_cv_fortran_dummy_main = unknown; then for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@define $ac_fortran_dm_var $ac_func]])], [ac_cv_fortran_dummy_main=$ac_func; break]) done fi AC_LANG_POP(C)dnl ac_cv_[]_AC_LANG_ABBREV[]_dummy_main=$ac_cv_fortran_dummy_main rm -f conftest* LIBS=$ac_[]_AC_LANG_ABBREV[]_dm_save_LIBS ]) []_AC_FC[]_DUMMY_MAIN=$ac_cv_[]_AC_LANG_ABBREV[]_dummy_main AS_IF([test "$[]_AC_FC[]_DUMMY_MAIN" != unknown], [m4_default([$1], [if test $[]_AC_FC[]_DUMMY_MAIN != none; then AC_DEFINE_UNQUOTED([]_AC_FC[]_DUMMY_MAIN, $[]_AC_FC[]_DUMMY_MAIN, [Define to dummy `main' function (if any) required to link to the Fortran libraries.]) if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then AC_DEFINE([FC_DUMMY_MAIN_EQ_F77], 1, [Define if F77 and FC dummy `main' functions are identical.]) fi fi])], [m4_default([$2], [AC_MSG_FAILURE([linking to Fortran libraries from C fails])])]) ])# _AC_FC_DUMMY_MAIN # AC_F77_DUMMY_MAIN # ---------------------- AC_DEFUN([AC_F77_DUMMY_MAIN], [AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl AC_LANG_PUSH(Fortran 77)dnl _AC_FC_DUMMY_MAIN AC_LANG_POP(Fortran 77)dnl ])# AC_F77_DUMMY_MAIN # AC_FC_DUMMY_MAIN # ---------------------- AC_DEFUN([AC_FC_DUMMY_MAIN], [AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])dnl AC_LANG_PUSH(Fortran)dnl _AC_FC_DUMMY_MAIN AC_LANG_POP(Fortran)dnl ])# AC_FC_DUMMY_MAIN # _AC_FC_MAIN # ----------- # Define {F77,FC}_MAIN to name of alternate main() function for use with # the Fortran libraries. (Typically, the libraries may define their # own main() to initialize I/O, etcetera, that then call your own # routine called MAIN__ or whatever.) See _AC_FC_DUMMY_MAIN, above. # If no such alternate name is found, just define {F77,FC}_MAIN to main. # AC_DEFUN([_AC_FC_MAIN], [_AC_FORTRAN_ASSERT()dnl AC_CACHE_CHECK([for alternate main to link with Fortran libraries], ac_cv_[]_AC_LANG_ABBREV[]_main, [ac_[]_AC_LANG_ABBREV[]_m_save_LIBS=$LIBS LIBS="$LIBS $[]_AC_LANG_PREFIX[]LIBS" ac_fortran_dm_var=[]_AC_FC[]_DUMMY_MAIN AC_LANG_PUSH(C)dnl ac_cv_fortran_main="main" # default entry point name for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@ifdef FC_DUMMY_MAIN_EQ_F77 @%:@ undef F77_DUMMY_MAIN @%:@ undef FC_DUMMY_MAIN @%:@else @%:@ undef $ac_fortran_dm_var @%:@endif @%:@define main $ac_func])], [ac_cv_fortran_main=$ac_func; break]) done AC_LANG_POP(C)dnl ac_cv_[]_AC_LANG_ABBREV[]_main=$ac_cv_fortran_main rm -f conftest* LIBS=$ac_[]_AC_LANG_ABBREV[]_m_save_LIBS ]) AC_DEFINE_UNQUOTED([]_AC_FC[]_MAIN, $ac_cv_[]_AC_LANG_ABBREV[]_main, [Define to alternate name for `main' routine that is called from a `main' in the Fortran libraries.]) ])# _AC_FC_MAIN # AC_F77_MAIN # ----------- AC_DEFUN([AC_F77_MAIN], [AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl AC_LANG_PUSH(Fortran 77)dnl _AC_FC_MAIN AC_LANG_POP(Fortran 77)dnl ])# AC_F77_MAIN # AC_FC_MAIN # ---------- AC_DEFUN([AC_FC_MAIN], [AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])dnl AC_LANG_PUSH(Fortran)dnl _AC_FC_MAIN AC_LANG_POP(Fortran)dnl ])# AC_FC_MAIN # __AC_FC_NAME_MANGLING # --------------------- # Test for the name mangling scheme used by the Fortran compiler. # # Sets ac_cv_{f77,fc}_mangling. The value contains three fields, separated # by commas: # # lower case / upper case: # case translation of the Fortran symbols # underscore / no underscore: # whether the compiler appends "_" to symbol names # extra underscore / no extra underscore: # whether the compiler appends an extra "_" to symbol names already # containing at least one underscore # AC_DEFUN([__AC_FC_NAME_MANGLING], [_AC_FORTRAN_ASSERT()dnl AC_CACHE_CHECK([for Fortran name-mangling scheme], ac_cv_[]_AC_LANG_ABBREV[]_mangling, [AC_COMPILE_IFELSE( [ subroutine foobar() return end subroutine foo_bar() return end], [mv conftest.$ac_objext cfortran_test.$ac_objext ac_save_LIBS=$LIBS LIBS="cfortran_test.$ac_objext $LIBS $[]_AC_LANG_PREFIX[]LIBS" AC_LANG_PUSH(C)dnl ac_success=no for ac_foobar in foobar FOOBAR; do for ac_underscore in "" "_"; do ac_func="$ac_foobar$ac_underscore" AC_LINK_IFELSE([AC_LANG_CALL([], [$ac_func])], [ac_success=yes; break 2]) done done AC_LANG_POP(C)dnl if test "$ac_success" = "yes"; then case $ac_foobar in foobar) ac_case=lower ac_foo_bar=foo_bar ;; FOOBAR) ac_case=upper ac_foo_bar=FOO_BAR ;; esac AC_LANG_PUSH(C)dnl ac_success_extra=no for ac_extra in "" "_"; do ac_func="$ac_foo_bar$ac_underscore$ac_extra" AC_LINK_IFELSE([AC_LANG_CALL([], [$ac_func])], [ac_success_extra=yes; break]) done AC_LANG_POP(C)dnl if test "$ac_success_extra" = "yes"; then ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_case case" if test -z "$ac_underscore"; then ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no underscore" else ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, underscore" fi if test -z "$ac_extra"; then ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no extra underscore" else ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, extra underscore" fi else ac_cv_[]_AC_LANG_ABBREV[]_mangling="unknown" fi else ac_cv_[]_AC_LANG_ABBREV[]_mangling="unknown" fi LIBS=$ac_save_LIBS rm -f cfortran_test* conftest*], [AC_MSG_FAILURE([cannot compile a simple Fortran program])]) ]) ])# __AC_FC_NAME_MANGLING # The replacement is empty. AU_DEFUN([AC_F77_NAME_MANGLING], []) # _AC_F77_NAME_MANGLING # ---------------------- AC_DEFUN([_AC_F77_NAME_MANGLING], [AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])dnl AC_REQUIRE([AC_F77_DUMMY_MAIN])dnl AC_LANG_PUSH(Fortran 77)dnl __AC_FC_NAME_MANGLING AC_LANG_POP(Fortran 77)dnl ])# _AC_F77_NAME_MANGLING # _AC_FC_NAME_MANGLING # ---------------------- AC_DEFUN([_AC_FC_NAME_MANGLING], [AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])dnl AC_REQUIRE([AC_FC_DUMMY_MAIN])dnl AC_LANG_PUSH(Fortran)dnl __AC_FC_NAME_MANGLING AC_LANG_POP(Fortran)dnl ])# _AC_FC_NAME_MANGLING # _AC_FC_WRAPPERS # --------------- # Defines C macros {F77,FC}_FUNC(name,NAME) and {F77,FC}_FUNC_(name,NAME) to # properly mangle the names of C identifiers, and C identifiers with # underscores, respectively, so that they match the name mangling # scheme used by the Fortran compiler. AC_DEFUN([_AC_FC_WRAPPERS], [_AC_FORTRAN_ASSERT()dnl AH_TEMPLATE(_AC_FC[_FUNC], [Define to a macro mangling the given C identifier (in lower and upper case), which must not contain underscores, for linking with Fortran.])dnl AH_TEMPLATE(_AC_FC[_FUNC_], [As ]_AC_FC[_FUNC, but for C identifiers containing underscores.])dnl case $ac_cv_[]_AC_LANG_ABBREV[]_mangling in "lower case, no underscore, no extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name]) ;; "lower case, no underscore, extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## _]) ;; "lower case, underscore, no extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name ## _]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## _]) ;; "lower case, underscore, extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name ## _]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## __]) ;; "upper case, no underscore, no extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME]) ;; "upper case, no underscore, extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## _]) ;; "upper case, underscore, no extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME ## _]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## _]) ;; "upper case, underscore, extra underscore") AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME ## _]) AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## __]) ;; *) AC_MSG_WARN([unknown Fortran name-mangling scheme]) ;; esac ])# _AC_FC_WRAPPERS # AC_F77_WRAPPERS # --------------- AC_DEFUN([AC_F77_WRAPPERS], [AC_REQUIRE([_AC_F77_NAME_MANGLING])dnl AC_LANG_PUSH(Fortran 77)dnl _AC_FC_WRAPPERS AC_LANG_POP(Fortran 77)dnl ])# AC_F77_WRAPPERS # AC_FC_WRAPPERS # -------------- AC_DEFUN([AC_FC_WRAPPERS], [AC_REQUIRE([_AC_FC_NAME_MANGLING])dnl AC_LANG_PUSH(Fortran)dnl _AC_FC_WRAPPERS AC_LANG_POP(Fortran)dnl ])# AC_FC_WRAPPERS # _AC_FC_FUNC(NAME, [SHELLVAR = NAME]) # ------------------------------------ # For a Fortran subroutine of given NAME, define a shell variable # $SHELLVAR to the Fortran-mangled name. If the SHELLVAR # argument is not supplied, it defaults to NAME. AC_DEFUN([_AC_FC_FUNC], [_AC_FORTRAN_ASSERT()dnl case $ac_cv_[]_AC_LANG_ABBREV[]_mangling in upper*) ac_val="m4_toupper([$1])" ;; lower*) ac_val="m4_tolower([$1])" ;; *) ac_val="unknown" ;; esac case $ac_cv_[]_AC_LANG_ABBREV[]_mangling in *," underscore"*) ac_val="$ac_val"_ ;; esac m4_if(m4_index([$1],[_]),-1,[], [case $ac_cv_[]_AC_LANG_ABBREV[]_mangling in *," extra underscore"*) ac_val="$ac_val"_ ;; esac ]) m4_default([$2],[$1])="$ac_val" ])# _AC_FC_FUNC # AC_F77_FUNC(NAME, [SHELLVAR = NAME]) # ------------------------------------ AC_DEFUN([AC_F77_FUNC], [AC_REQUIRE([_AC_F77_NAME_MANGLING])dnl AC_LANG_PUSH(Fortran 77)dnl _AC_FC_FUNC([$1],[$2]) AC_LANG_POP(Fortran 77)dnl ])# AC_F77_FUNC # AC_FC_FUNC(NAME, [SHELLVAR = NAME]) # ----------------------------------- AC_DEFUN([AC_FC_FUNC], [AC_REQUIRE([_AC_FC_NAME_MANGLING])dnl AC_LANG_PUSH(Fortran)dnl _AC_FC_FUNC([$1],[$2]) AC_LANG_POP(Fortran)dnl ])# AC_FC_FUNC # AC_FC_SRCEXT(EXT, [ACTION-IF-SUCCESS], [ACTION-IF-FAILURE]) # ----------------------------------------------------------- # Set the source-code extension used in Fortran (FC) tests to EXT (which # defaults to f). Also, look for any necessary additional FCFLAGS needed # to allow this extension, and store them in the output variable # FCFLAGS_ (e.g. FCFLAGS_f90 for EXT=f90). If successful, # call ACTION-IF-SUCCESS. If unable to compile source code with EXT, # call ACTION-IF-FAILURE, which defaults to failing with an error # message. # # (The flags for the current source-code extension, if any, are stored # in the FCFLAGS_SRCEXT variable and are automatically used in subsequent # autoconf tests.) # # For ordinary extensions like f90, etcetera, the modified FCFLAGS # are currently needed for IBM's xlf* and Intel's ifc (grrr). Unfortunately, # xlf* will only take flags to recognize one extension at a time, so if the # user wants to compile multiple extensions (.f90 and .f95, say), she # will need to use the FCFLAGS_F90 and FCFLAGS_F95 individually rather # than just adding them all to FCFLAGS, for example. # # Also, for Intel's ifc compiler (which does not accept .f95 by default in # some versions), the $FCFLAGS_ variable *must* go immediately before # the source file on the command line, unlike other $FCFLAGS. Ugh. AC_DEFUN([AC_FC_SRCEXT], [AC_LANG_ASSERT(Fortran)dnl AC_CACHE_CHECK([for Fortran flag to compile .$1 files], ac_cv_fc_srcext_$1, [ac_ext=$1 ac_fc_srcext_FCFLAGS_SRCEXT_save=$FCFLAGS_SRCEXT FCFLAGS_SRCEXT="" ac_cv_fc_srcext_$1=unknown for ac_flag in none -qsuffix=f=$1 -Tf; do test "x$ac_flag" != xnone && FCFLAGS_SRCEXT="$ac_flag" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_fc_srcext_$1=$ac_flag; break]) done rm -f conftest.$ac_objext conftest.$1 FCFLAGS_SRCEXT=$ac_fc_srcext_FCFLAGS_SRCEXT_save ]) if test "x$ac_cv_fc_srcext_$1" = xunknown; then m4_default([$3],[AC_MSG_ERROR([Fortran could not compile .$1 files])]) else FC_SRCEXT=$1 if test "x$ac_cv_fc_srcext_$1" = xnone; then FCFLAGS_SRCEXT="" FCFLAGS_[]$1[]="" else FCFLAGS_SRCEXT=$ac_cv_fc_srcext_$1 FCFLAGS_[]$1[]=$ac_cv_fc_srcext_$1 fi AC_SUBST(FCFLAGS_[]$1) $2 fi ])# AC_FC_SRCEXT # AC_FC_FREEFORM([ACTION-IF-SUCCESS], [ACTION-IF-FAILURE = FAILURE]) # ------------------------------------------------------------------ # Look for a compiler flag to make the Fortran (FC) compiler accept # free-format source code, and adds it to FCFLAGS. Call # ACTION-IF-SUCCESS (defaults to nothing) if successful (i.e. can # compile code using new extension) and ACTION-IF-FAILURE (defaults to # failing with an error message) if not. (Defined via DEFUN_ONCE to # prevent flag from being added to FCFLAGS multiple times.) # # The known flags are: # -ffree-form: GNU g77 # -FR: Intel compiler (icc, ecc) # -free: Compaq compiler (fort) # -qfree: IBM compiler (xlf) # -Mfree, -Mfreeform: Portland Group compiler # -freeform: SGI compiler # -f free: Absoft Fortran # We try to test the "more popular" flags first, by some prejudiced # notion of popularity. AC_DEFUN_ONCE([AC_FC_FREEFORM], [AC_LANG_ASSERT([Fortran])dnl AC_CACHE_CHECK([for Fortran flag needed to allow free-form source], ac_cv_fc_freeform, [ac_cv_fc_freeform=unknown ac_fc_freeform_FCFLAGS_save=$FCFLAGS for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \ -freeform "-f free" do test "x$ac_flag" != xnone && FCFLAGS="$ac_fc_freeform_FCFLAGS_save $ac_flag" AC_COMPILE_IFELSE([ program freeform ! FIXME: how to best confuse non-freeform compilers? print *, 'Hello ', & 'world.' end], [ac_cv_fc_freeform=$ac_flag; break]) done rm -f conftest.err conftest.$ac_objext conftest.$ac_ext FCFLAGS=$ac_fc_freeform_FCFLAGS_save ]) if test "x$ac_cv_fc_freeform" = xunknown; then m4_default([$2], [AC_MSG_ERROR([Fortran does not accept free-form source], 77)]) else if test "x$ac_cv_fc_freeform" != xnone; then FCFLAGS="$FCFLAGS $ac_cv_fc_freeform" fi $1 fi ])# AC_FC_FREEFORM autoconf2.59-2.59+dfsg/lib/autoconf/headers.m40000644000175000017500000006356407734514463020334 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Checking for headers. # # Copyright (C) 2000, 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # Table of contents # # 1. Generic tests for headers # 2. Default includes # 3. Headers to tests with AC_CHECK_HEADERS # 4. Tests for specific headers ## ------------------------------ ## ## 1. Generic tests for headers. ## ## ------------------------------ ## # AC_CHECK_HEADER(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # --------------------------------------------------------- # We are slowly moving to checking headers with the compiler instead # of the preproc, so that we actually learn about the usability of a # header instead of its mere presence. But since users are used to # the old semantics, they check for headers in random order and # without providing prerequisite headers. This macro implements the # transition phase, and should be cleaned up latter to use compilation # only. # # If INCLUDES is empty, then check both via the compiler and preproc. # If the results are different, issue a warning, but keep the preproc # result. # # If INCLUDES is `-', keep only the old semantics. # # If INCLUDES is specified and different from `-', then use the new # semantics only. AC_DEFUN([AC_CHECK_HEADER], [m4_case([$4], [], [_AC_CHECK_HEADER_MONGREL($@)], [-], [_AC_CHECK_HEADER_OLD($@)], [_AC_CHECK_HEADER_NEW($@)]) ])# AC_CHECK_HEADER # _AC_CHECK_HEADER_MONGREL(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # -------------------------------------------------------------- # Check using both the compiler and the preprocessor. If they disagree, # warn, and the preproc wins. # # This is not based on _AC_CHECK_HEADER_NEW and _AC_CHECK_HEADER_OLD # because it obfuscate the code to try to factor everything, in particular # because of the cache variables, and the `checking...' messages. m4_define([_AC_CHECK_HEADER_MONGREL], [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl AS_VAR_SET_IF(ac_Header, [AC_CACHE_CHECK([for $1], ac_Header, [])], [# Is the header compilable? AC_MSG_CHECKING([$1 usability]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([$4]) @%:@include <$1>])], [ac_header_compiler=yes], [ac_header_compiler=no]) AC_MSG_RESULT([$ac_header_compiler]) # Is the header present? AC_MSG_CHECKING([$1 presence]) AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$1>])], [ac_header_preproc=yes], [ac_header_preproc=no]) AC_MSG_RESULT([$ac_header_preproc]) # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag in yes:no: ) AC_MSG_WARN([$1: accepted by the compiler, rejected by the preprocessor!]) AC_MSG_WARN([$1: proceeding with the compiler's result]) ac_header_preproc=yes ;; no:yes:* ) AC_MSG_WARN([$1: present but cannot be compiled]) AC_MSG_WARN([$1: check for missing prerequisite headers?]) AC_MSG_WARN([$1: see the Autoconf documentation]) AC_MSG_WARN([$1: section "Present But Cannot Be Compiled"]) AC_MSG_WARN([$1: proceeding with the preprocessor's result]) AC_MSG_WARN([$1: in the future, the compiler will take precedence]) ( AS_BOX([Report this to ]m4_ifset([AC_PACKAGE_BUGREPORT], [AC_PACKAGE_BUGREPORT], [the AC_PACKAGE_NAME lists. ])) ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac AC_CACHE_CHECK([for $1], ac_Header, [AS_VAR_SET(ac_Header, $ac_header_preproc)]) ])dnl ! set ac_HEADER AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Header])dnl ])# _AC_CHECK_HEADER_MONGREL # _AC_CHECK_HEADER_NEW(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # -------------------------------------------------------------- # Check the compiler accepts HEADER-FILE. The INCLUDES are defaulted. m4_define([_AC_CHECK_HEADER_NEW], [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl AC_CACHE_CHECK([for $1], ac_Header, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT([$4]) @%:@include <$1>])], [AS_VAR_SET(ac_Header, yes)], [AS_VAR_SET(ac_Header, no)])]) AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Header])dnl ])# _AC_CHECK_HEADER_NEW # _AC_CHECK_HEADER_OLD(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # -------------------------------------------------------------- # Check the preprocessor accepts HEADER-FILE. m4_define([_AC_CHECK_HEADER_OLD], [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl AC_CACHE_CHECK([for $1], ac_Header, [AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <$1>])], [AS_VAR_SET(ac_Header, yes)], [AS_VAR_SET(ac_Header, no)])]) AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Header])dnl ])# _AC_CHECK_HEADER_OLD # AH_CHECK_HEADERS(HEADER-FILE...) # -------------------------------- m4_define([AH_CHECK_HEADERS], [AC_FOREACH([AC_Header], [$1], [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Header), [Define to 1 if you have the <]AC_Header[> header file.])])]) # AC_CHECK_HEADERS(HEADER-FILE... # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], # [INCLUDES]) # ---------------------------------------------------------- AC_DEFUN([AC_CHECK_HEADERS], [AH_CHECK_HEADERS([$1])dnl for ac_header in $1 do AC_CHECK_HEADER($ac_header, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$ac_header)) $2], [$3], [$4])dnl done ])# AC_CHECK_HEADERS ## --------------------- ## ## 2. Default includes. ## ## --------------------- ## # Always use the same set of default headers for all the generic # macros. It is easier to document, to extend, and to understand than # having specific defaults for each macro. # _AC_INCLUDES_DEFAULT_REQUIREMENTS # --------------------------------- # Required when AC_INCLUDES_DEFAULT uses its default branch. AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS], [m4_divert_text([DEFAULTS], [# Factoring default headers for most tests. dnl If ever you change this variable, please keep autoconf.texi in sync. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ])dnl AC_REQUIRE([AC_HEADER_STDC])dnl # On IRIX 5.3, sys/types and inttypes.h are conflicting. AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h], [], [], $ac_includes_default) ])# _AC_INCLUDES_DEFAULT_REQUIREMENTS # AC_INCLUDES_DEFAULT([INCLUDES]) # ------------------------------- # If INCLUDES is empty, expand in default includes, otherwise in # INCLUDES. # In most cases INCLUDES is not double quoted as it should, and if # for instance INCLUDES = `#include ' then unless we force # a newline, the hash will swallow the closing paren etc. etc. # The usual failure. # Take no risk: for the newline. AC_DEFUN([AC_INCLUDES_DEFAULT], [m4_ifval([$1], [$1 ], [AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl $ac_includes_default])]) ## ------------------------------------------- ## ## 3. Headers to check with AC_CHECK_HEADERS. ## ## ------------------------------------------- ## # errno.h is portable. AN_HEADER([OS.h], [AC_CHECK_HEADERS]) AN_HEADER([argz.h], [AC_CHECK_HEADERS]) AN_HEADER([arpa/inet.h], [AC_CHECK_HEADERS]) AN_HEADER([fcntl.h], [AC_CHECK_HEADERS]) AN_HEADER([fenv.h], [AC_CHECK_HEADERS]) AN_HEADER([float.h], [AC_CHECK_HEADERS]) AN_HEADER([fs_info.h], [AC_CHECK_HEADERS]) AN_HEADER([inttypes.h], [AC_CHECK_HEADERS]) AN_HEADER([langinfo.h], [AC_CHECK_HEADERS]) AN_HEADER([libintl.h], [AC_CHECK_HEADERS]) AN_HEADER([limits.h], [AC_CHECK_HEADERS]) AN_HEADER([locale.h], [AC_CHECK_HEADERS]) AN_HEADER([mach/mach.h], [AC_CHECK_HEADERS]) AN_HEADER([malloc.h], [AC_CHECK_HEADERS]) AN_HEADER([memory.h], [AC_CHECK_HEADERS]) AN_HEADER([mntent.h], [AC_CHECK_HEADERS]) AN_HEADER([mnttab.h], [AC_CHECK_HEADERS]) AN_HEADER([netdb.h], [AC_CHECK_HEADERS]) AN_HEADER([netinet/in.h], [AC_CHECK_HEADERS]) AN_HEADER([nl_types.h], [AC_CHECK_HEADERS]) AN_HEADER([nlist.h], [AC_CHECK_HEADERS]) AN_HEADER([paths.h], [AC_CHECK_HEADERS]) AN_HEADER([sgtty.h], [AC_CHECK_HEADERS]) AN_HEADER([shadow.h], [AC_CHECK_HEADERS]) AN_HEADER([stddef.h], [AC_CHECK_HEADERS]) AN_HEADER([stdint.h], [AC_CHECK_HEADERS]) AN_HEADER([stdio_ext.h], [AC_CHECK_HEADERS]) AN_HEADER([stdlib.h], [AC_CHECK_HEADERS]) AN_HEADER([string.h], [AC_CHECK_HEADERS]) AN_HEADER([strings.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/acl.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/file.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/filsys.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/fs/s5param.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/fs_types.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/fstyp.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/ioctl.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/mntent.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/mount.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/param.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/socket.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/statfs.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/statvfs.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/systeminfo.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/time.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/timeb.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/vfs.h], [AC_CHECK_HEADERS]) AN_HEADER([sys/window.h], [AC_CHECK_HEADERS]) AN_HEADER([syslog.h], [AC_CHECK_HEADERS]) AN_HEADER([termio.h], [AC_CHECK_HEADERS]) AN_HEADER([termios.h], [AC_CHECK_HEADERS]) AN_HEADER([unistd.h], [AC_CHECK_HEADERS]) AN_HEADER([utime.h], [AC_CHECK_HEADERS]) AN_HEADER([utmp.h], [AC_CHECK_HEADERS]) AN_HEADER([utmpx.h], [AC_CHECK_HEADERS]) AN_HEADER([values.h], [AC_CHECK_HEADERS]) AN_HEADER([wchar.h], [AC_CHECK_HEADERS]) AN_HEADER([wctype.h], [AC_CHECK_HEADERS]) ## ------------------------------- ## ## 4. Tests for specific headers. ## ## ------------------------------- ## # _AC_CHECK_HEADER_DIRENT(HEADER-FILE, # [ACTION-IF-FOUND], [ACTION-IF-NOT_FOUND]) # ----------------------------------------------------------------- # Like AC_CHECK_HEADER, except also make sure that HEADER-FILE # defines the type `DIR'. dirent.h on NextStep 3.2 doesn't. m4_define([_AC_CHECK_HEADER_DIRENT], [AS_VAR_PUSHDEF([ac_Header], [ac_cv_header_dirent_$1])dnl AC_CACHE_CHECK([for $1 that defines DIR], ac_Header, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include <$1> ], [if ((DIR *) 0) return 0;])], [AS_VAR_SET(ac_Header, yes)], [AS_VAR_SET(ac_Header, no)])]) AS_IF([test AS_VAR_GET(ac_Header) = yes], [$2], [$3])[]dnl AS_VAR_POPDEF([ac_Header])dnl ])# _AC_CHECK_HEADER_DIRENT # AH_CHECK_HEADERS_DIRENT(HEADERS...) # ----------------------------------- m4_define([AH_CHECK_HEADERS_DIRENT], [AC_FOREACH([AC_Header], [$1], [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Header), [Define to 1 if you have the <]AC_Header[> header file, and it defines `DIR'.])])]) # AC_HEADER_DIRENT # ---------------- AN_HEADER([dirent.h], [AC_HEADER_DIRENT]) AN_HEADER([ndir.h], [AC_HEADER_DIRENT]) AN_HEADER([sys/dir.h], [AC_HEADER_DIRENT]) AN_HEADER([sys/ndir.h], [AC_HEADER_DIRENT]) AC_DEFUN([AC_HEADER_DIRENT], [AH_CHECK_HEADERS_DIRENT(dirent.h sys/ndir.h sys/dir.h ndir.h) ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do _AC_CHECK_HEADER_DIRENT($ac_hdr, [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$ac_hdr), 1) ac_header_dirent=$ac_hdr; break]) done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then AC_SEARCH_LIBS(opendir, dir) else AC_SEARCH_LIBS(opendir, x) fi ])# AC_HEADER_DIRENT # AC_HEADER_MAJOR # --------------- AN_FUNCTION([major], [AC_HEADER_MAJOR]) AN_FUNCTION([makedev], [AC_HEADER_MAJOR]) AN_FUNCTION([minor], [AC_HEADER_MAJOR]) AN_HEADER([sys/mkdev.h], [AC_HEADER_MAJOR]) AC_DEFUN([AC_HEADER_MAJOR], [AC_CACHE_CHECK(whether sys/types.h defines makedev, ac_cv_header_sys_types_h_makedev, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[return makedev(0, 0);]])], [ac_cv_header_sys_types_h_makedev=yes], [ac_cv_header_sys_types_h_makedev=no]) ]) if test $ac_cv_header_sys_types_h_makedev = no; then AC_CHECK_HEADER(sys/mkdev.h, [AC_DEFINE(MAJOR_IN_MKDEV, 1, [Define to 1 if `major', `minor', and `makedev' are declared in .])]) if test $ac_cv_header_sys_mkdev_h = no; then AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS, 1, [Define to 1 if `major', `minor', and `makedev' are declared in .])]) fi fi ])# AC_HEADER_MAJOR # AC_HEADER_STAT # -------------- # FIXME: Shouldn't this be named AC_HEADER_SYS_STAT? AN_IDENTIFIER([S_ISBLK], [AC_HEADER_STAT]) AN_IDENTIFIER([S_ISCHR], [AC_HEADER_STAT]) AN_IDENTIFIER([S_ISDIR], [AC_HEADER_STAT]) AN_IDENTIFIER([S_ISFIFO], [AC_HEADER_STAT]) AN_IDENTIFIER([S_ISLNK], [AC_HEADER_STAT]) AN_IDENTIFIER([S_ISREG], [AC_HEADER_STAT]) AN_IDENTIFIER([S_ISSOCK], [AC_HEADER_STAT]) AC_DEFUN([AC_HEADER_STAT], [AC_CACHE_CHECK(whether stat file-mode macros are broken, ac_cv_header_stat_broken, [AC_EGREP_CPP([You lose], [#include #include #if defined(S_ISBLK) && defined(S_IFDIR) # if S_ISBLK (S_IFDIR) You lose. # endif #endif #if defined(S_ISBLK) && defined(S_IFCHR) # if S_ISBLK (S_IFCHR) You lose. # endif #endif #if defined(S_ISLNK) && defined(S_IFREG) # if S_ISLNK (S_IFREG) You lose. # endif #endif #if defined(S_ISSOCK) && defined(S_IFREG) # if S_ISSOCK (S_IFREG) You lose. # endif #endif ], ac_cv_header_stat_broken=yes, ac_cv_header_stat_broken=no)]) if test $ac_cv_header_stat_broken = yes; then AC_DEFINE(STAT_MACROS_BROKEN, 1, [Define to 1 if the `S_IS*' macros in do not work properly.]) fi ])# AC_HEADER_STAT # AC_HEADER_STDBOOL # ----------------- # Check for stdbool.h that conforms to C99. AN_IDENTIFIER([bool], [AC_HEADER_STDBOOL]) AN_IDENTIFIER([true], [AC_HEADER_STDBOOL]) AN_IDENTIFIER([false],[AC_HEADER_STDBOOL]) AC_DEFUN([AC_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99], [ac_cv_header_stdbool_h], [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[ #include #ifndef bool # error bool is not defined #endif #ifndef false # error false is not defined #endif #if false # error false is not 0 #endif #ifndef true # error true is not defined #endif #if true != 1 # error true is not 1 #endif #ifndef __bool_true_false_are_defined # error __bool_true_false_are_defined is not defined #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) -0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) -0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; ]], [[ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ]])], [ac_cv_header_stdbool_h=yes], [ac_cv_header_stdbool_h=no])]) AC_CHECK_TYPES([_Bool]) if test $ac_cv_header_stdbool_h = yes; then AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.]) fi ])# AC_HEADER_STDBOOL # AC_HEADER_STDC # -------------- # FIXME: I find this list very strange. It comes from the original # autoscan list, but I don't think it is useful for the same reason # that we don't bind AC_PROG_CC to finding a C function calls: if the # user uses bcmp, then she will certainly have the `#include', and # therefore, we will trigger AC_HEADER_STDC elsewhere. --akim 2002-09-28 # FIXME: Err... index and rindex are _not_ to be used... --akim 2002-09-28 AN_FUNCTION([bcmp], [AC_HEADER_STDC]) AN_FUNCTION([bcopy], [AC_HEADER_STDC]) AN_FUNCTION([bzero], [AC_HEADER_STDC]) AN_FUNCTION([index], [AC_HEADER_STDC]) AN_FUNCTION([memchr], [AC_HEADER_STDC]) AN_FUNCTION([memcpy], [AC_HEADER_STDC]) AN_FUNCTION([memmove], [AC_HEADER_STDC]) AN_FUNCTION([memset], [AC_HEADER_STDC]) AN_FUNCTION([rindex], [AC_HEADER_STDC]) AN_HEADER([float.h], [AC_HEADER_STDC]) AN_HEADER([stdarg.h], [AC_HEADER_STDC]) AN_HEADER([stddef.h], [AC_HEADER_STDC]) AN_HEADER([stdlib.h], [AC_HEADER_STDC]) AN_HEADER([string.h], [AC_HEADER_STDC]) AC_DEFUN([AC_HEADER_STDC], [AC_CACHE_CHECK(for ANSI C header files, ac_cv_header_stdc, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include #include #include ]])], [ac_cv_header_stdc=yes], [ac_cv_header_stdc=no]) if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. AC_EGREP_HEADER(memchr, string.h, , ac_cv_header_stdc=no) fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. AC_EGREP_HEADER(free, stdlib.h, , ac_cv_header_stdc=no) fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. AC_RUN_IFELSE([AC_LANG_SOURCE( [[#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); }]])], , ac_cv_header_stdc=no, :) fi]) if test $ac_cv_header_stdc = yes; then AC_DEFINE(STDC_HEADERS, 1, [Define to 1 if you have the ANSI C header files.]) fi ])# AC_HEADER_STDC # AC_HEADER_SYS_WAIT # ------------------ AN_HEADER([sys/wait.h], [AC_HEADER_SYS_WAIT]) AC_DEFUN([AC_HEADER_SYS_WAIT], [AC_CACHE_CHECK([for sys/wait.h that is POSIX.1 compatible], ac_cv_header_sys_wait_h, [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([#include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif ], [ int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;])], [ac_cv_header_sys_wait_h=yes], [ac_cv_header_sys_wait_h=no])]) if test $ac_cv_header_sys_wait_h = yes; then AC_DEFINE(HAVE_SYS_WAIT_H, 1, [Define to 1 if you have that is POSIX.1 compatible.]) fi ])# AC_HEADER_SYS_WAIT # AC_HEADER_TIME # -------------- AN_IDENTIFIER([timeval], [AC_HEADER_TIME]) AC_DEFUN([AC_HEADER_TIME], [AC_CACHE_CHECK([whether time.h and sys/time.h may both be included], ac_cv_header_time, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include #include ], [if ((struct tm *) 0) return 0;])], [ac_cv_header_time=yes], [ac_cv_header_time=no])]) if test $ac_cv_header_time = yes; then AC_DEFINE(TIME_WITH_SYS_TIME, 1, [Define to 1 if you can safely include both and .]) fi ])# AC_HEADER_TIME # _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H # ---------------------------------- m4_define([_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H], [AC_CACHE_CHECK([whether termios.h defines TIOCGWINSZ], ac_cv_sys_tiocgwinsz_in_termios_h, [AC_EGREP_CPP([yes], [#include #include #ifdef TIOCGWINSZ yes #endif ], ac_cv_sys_tiocgwinsz_in_termios_h=yes, ac_cv_sys_tiocgwinsz_in_termios_h=no)]) ])# _AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H # _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL # ---------------------------------- m4_define([_AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL], [AC_CACHE_CHECK([whether sys/ioctl.h defines TIOCGWINSZ], ac_cv_sys_tiocgwinsz_in_sys_ioctl_h, [AC_EGREP_CPP([yes], [#include #include #ifdef TIOCGWINSZ yes #endif ], ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes, ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no)]) ])# _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL # AC_HEADER_TIOCGWINSZ # -------------------- # Look for a header that defines TIOCGWINSZ. # FIXME: Is this the proper name? Is this the proper implementation? # I need more help. AC_DEFUN([AC_HEADER_TIOCGWINSZ], [_AC_HEADER_TIOCGWINSZ_IN_TERMIOS_H if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then _AC_HEADER_TIOCGWINSZ_IN_SYS_IOCTL if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then AC_DEFINE(GWINSZ_IN_SYS_IOCTL,1, [Define to 1 if `TIOCGWINSZ' requires .]) fi fi ])# AC_HEADER_TIOCGWINSZ # AU::AC_UNISTD_H # --------------- AU_DEFUN([AC_UNISTD_H], [AC_CHECK_HEADERS(unistd.h)]) # AU::AC_USG # ---------- # Define `USG' if string functions are in strings.h. AU_DEFUN([AC_USG], [AC_DIAGNOSE([obsolete], [$0: Remove `AC_MSG_CHECKING', `AC_LINK_IFELSE' and this `AC_WARNING' when you adjust your code to use HAVE_STRING_H.])dnl AC_MSG_CHECKING([for BSD string and memory functions]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], [[rindex(0, 0); bzero(0, 0);]])], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no) AC_DEFINE(USG, 1, [Define to 1 if you do not have , index, bzero, etc... This symbol is obsolete, you should not depend upon it.])]) AC_CHECK_HEADERS(string.h) ])# AU::AC_USG # AU::AC_MEMORY_H # --------------- # To be precise this macro used to be: # # | AC_MSG_CHECKING(whether string.h declares mem functions) # | AC_EGREP_HEADER(memchr, string.h, ac_found=yes, ac_found=no) # | AC_MSG_RESULT($ac_found) # | if test $ac_found = no; then # | AC_CHECK_HEADER(memory.h, [AC_DEFINE(NEED_MEMORY_H)]) # | fi # # But it is better to check for both headers, and alias NEED_MEMORY_H to # HAVE_MEMORY_H. AU_DEFUN([AC_MEMORY_H], [AC_DIAGNOSE([obsolete], [$0: Remove this warning and `AC_CHECK_HEADER(memory.h, AC_DEFINE(...))' when you adjust your code to use and HAVE_STRING_H and HAVE_MEMORY_H, not NEED_MEMORY_H.])dnl AC_CHECK_HEADER(memory.h, [AC_DEFINE([NEED_MEMORY_H], 1, [Same as `HAVE_MEMORY_H', don't depend on me.])]) AC_CHECK_HEADERS(string.h memory.h) ]) # AU::AC_DIR_HEADER # ----------------- # Like calling `AC_HEADER_DIRENT' and `AC_FUNC_CLOSEDIR_VOID', but # defines a different set of C preprocessor macros to indicate which # header file is found. AU_DEFUN([AC_DIR_HEADER], [AC_HEADER_DIRENT AC_FUNC_CLOSEDIR_VOID AC_DIAGNOSE([obsolete], [$0: Remove this warning and the four `AC_DEFINE' when you adjust your code to use `AC_HEADER_DIRENT'.]) test ac_cv_header_dirent_dirent_h && AC_DEFINE([DIRENT], 1, [Same as `HAVE_DIRENT_H', don't depend on me.]) test ac_cv_header_dirent_sys_ndir_h && AC_DEFINE([SYSNDIR], 1, [Same as `HAVE_SYS_NDIR_H', don't depend on me.]) test ac_cv_header_dirent_sys_dir_h && AC_DEFINE([SYSDIR], 1, [Same as `HAVE_SYS_DIR_H', don't depend on me.]) test ac_cv_header_dirent_ndir_h && AC_DEFINE([NDIR], 1, [Same as `HAVE_NDIR_H', don't depend on me.]) ]) autoconf2.59-2.59+dfsg/lib/autoconf/c.m40000644000175000017500000011033407734514463017127 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Programming languages support. # Copyright (C) 2001, 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. # -------------------- # # 1b. The C language. # # -------------------- # # AC_LANG(C) # ---------- # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. m4_define([AC_LANG(C)], [ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' ac_compiler_gnu=$ac_cv_c_compiler_gnu ]) # AC_LANG_C # --------- AU_DEFUN([AC_LANG_C], [AC_LANG(C)]) # _AC_LANG_ABBREV(C) # ------------------ m4_define([_AC_LANG_ABBREV(C)], [c]) # _AC_LANG_PREFIX(C) # ------------------ m4_define([_AC_LANG_PREFIX(C)], [C]) # ---------------------- # # 1c. The C++ language. # # ---------------------- # # AC_LANG(C++) # ------------ # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. m4_define([AC_LANG(C++)], [ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ]) # AC_LANG_CPLUSPLUS # ----------------- AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) # _AC_LANG_ABBREV(C++) # -------------------- m4_define([_AC_LANG_ABBREV(C++)], [cxx]) # _AC_LANG_PREFIX(C++) # -------------------- m4_define([_AC_LANG_PREFIX(C++)], [CXX]) ## ---------------------- ## ## 2.Producing programs. ## ## ---------------------- ## # --------------- # # 2b. C sources. # # --------------- # # AC_LANG_SOURCE(C)(BODY) # ----------------------- # This sometimes fails to find confdefs.h, for some reason. # We can't use '#line $LINENO "configure"' here, since # Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09) # rejects $LINENO greater than 32767, and some configure scripts # are longer than 32767 lines. m4_define([AC_LANG_SOURCE(C)], [/* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $1]) # AC_LANG_PROGRAM(C)([PROLOGUE], [BODY]) # -------------------------------------- m4_define([AC_LANG_PROGRAM(C)], [$1 m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl m4_ifdef([_AC_LANG_PROGRAM_C_FC_HOOKS], [_AC_LANG_PROGRAM_C_FC_HOOKS])[]dnl int main () { dnl Do *not* indent the following line: there may be CPP directives. dnl Don't move the `;' right after for the same reason. $2 ; return 0; }]) # AC_LANG_CALL(C)(PROLOGUE, FUNCTION) # ----------------------------------- # Avoid conflicting decl of main. m4_define([AC_LANG_CALL(C)], [AC_LANG_PROGRAM([$1 m4_if([$2], [main], , [/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $2 ();])], [$2 ();])]) # AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) # ---------------------------------- # Don't include because on OSF/1 3.0 it includes # which includes which contains a # prototype for select. Similarly for bzero. # # This test used to merely assign f=$1 in main(), but that was # optimized away by HP unbundled cc A.05.36 for ia64 under +O3, # presumably on the basis that there's no need to do that store if the # program is about to exit. Conversely, the AIX linker optimizes an # unused external declaration that initializes f=$1. So this test # program has both an external initialization of f, and a use of f in # main that affects the exit status. # m4_define([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_PROGRAM( [/* Define $1 to an innocuous variant, in case declares $1. For example, HP-UX 11i declares gettimeofday. */ #define $1 innocuous_$1 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $1 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $1 /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $1 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_$1) || defined (__stub___$1) choke me #else char (*f) () = $1; #endif #ifdef __cplusplus } #endif ], [return f != $1;])]) # AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION) # ------------------------------------------------- # Be sure to use this array to avoid `unused' warnings, which are even # errors with `-W error'. m4_define([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_PROGRAM([$1], [static int test_array @<:@1 - 2 * !($2)@:>@; test_array @<:@0@:>@ = 0 ])]) # AC_LANG_INT_SAVE(C)(PROLOGUE, EXPRESSION) # ----------------------------------------- # We need `stdio.h' to open a `FILE' and `stdlib.h' for `exit'. # But we include them only after the EXPRESSION has been evaluated. m4_define([AC_LANG_INT_SAVE(C)], [AC_LANG_PROGRAM([$1 long longval () { return $2; } unsigned long ulongval () { return $2; } @%:@include @%:@include ], [ FILE *f = fopen ("conftest.val", "w"); if (! f) exit (1); if (($2) < 0) { long i = longval (); if (i != ($2)) exit (1); fprintf (f, "%ld\n", i); } else { unsigned long i = ulongval (); if (i != ($2)) exit (1); fprintf (f, "%lu\n", i); } exit (ferror (f) || fclose (f) != 0); ])]) # ----------------- # # 2c. C++ sources. # # ----------------- # # AC_LANG_SOURCE(C++)(BODY) # ------------------------- m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(C++)]) # AC_LANG_PROGRAM(C++)([PROLOGUE], [BODY]) # ---------------------------------------- m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(C++)]) # AC_LANG_CALL(C++)(PROLOGUE, FUNCTION) # ------------------------------------- m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(C++)]) # AC_LANG_FUNC_LINK_TRY(C++)(FUNCTION) # ------------------------------------ m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(C++)]) # AC_LANG_BOOL_COMPILE_TRY(C++)(PROLOGUE, EXPRESSION) # --------------------------------------------------- m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(C++)]) # AC_LANG_INT_SAVE(C++)(PROLOGUE, EXPRESSION) # ------------------------------------------- m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(C++)]) ## -------------------------------------------- ## ## 3. Looking for Compilers and Preprocessors. ## ## -------------------------------------------- ## # -------------------- # # 3b. The C compiler. # # -------------------- # # _AC_ARG_VAR_CPPFLAGS # -------------------- # Document and register CPPFLAGS, which is used by # AC_PROG_{CC, CPP, CXX, CXXCPP}. AC_DEFUN([_AC_ARG_VAR_CPPFLAGS], [AC_ARG_VAR([CPPFLAGS], [C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory ])]) # _AC_ARG_VAR_LDFLAGS # ------------------- # Document and register LDFLAGS, which is used by # AC_PROG_{CC, CXX, F77}. AC_DEFUN([_AC_ARG_VAR_LDFLAGS], [AC_ARG_VAR([LDFLAGS], [linker flags, e.g. -L if you have libraries in a nonstandard directory ])]) # AC_LANG_PREPROC(C) # ------------------- # Find the C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_PREPROC(C)], [AC_REQUIRE([AC_PROG_CPP])]) # _AC_PROG_PREPROC_WORKS_IFELSE(IF-WORKS, IF-NOT) # ----------------------------------------------- # Check if $ac_cpp is a working preprocessor that can flag absent # includes either by the exit status or by warnings. # Set ac_cpp_err to a non-empty value if the preprocessor failed. # This macro is for all languages, not only C. AC_DEFUN([_AC_PROG_PREPROC_WORKS_IFELSE], [ac_preproc_ok=false for ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. _AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error]])], [], [# Broken: fails on valid input. continue]) # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. _AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include ]])], [# Broken: success on invalid input. continue], [# Passes both tests. ac_preproc_ok=: break]) done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext AS_IF([$ac_preproc_ok], [$1], [$2])])# _AC_PROG_PREPROC_WORKS_IFELSE # AC_PROG_CPP # ----------- # Find a working C preprocessor. # We shouldn't have to require AC_PROG_CC, but this is due to the concurrency # between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CC. AN_MAKEVAR([CPP], [AC_PROG_CPP]) AN_PROGRAM([cpp], [AC_PROG_CPP]) AC_DEFUN([AC_PROG_CPP], [AC_REQUIRE([AC_PROG_CC])dnl AC_ARG_VAR([CPP], [C preprocessor])dnl _AC_ARG_VAR_CPPFLAGS()dnl AC_LANG_PUSH(C)dnl AC_MSG_CHECKING([how to run the C preprocessor]) # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then AC_CACHE_VAL([ac_cv_prog_CPP], [dnl # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do _AC_PROG_PREPROC_WORKS_IFELSE([break]) done ac_cv_prog_CPP=$CPP ])dnl CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi AC_MSG_RESULT([$CPP]) _AC_PROG_PREPROC_WORKS_IFELSE([], [AC_MSG_FAILURE([C preprocessor "$CPP" fails sanity check])]) AC_SUBST(CPP)dnl AC_LANG_POP(C)dnl ])# AC_PROG_CPP # AC_PROG_CPP_WERROR # ------------------ # Treat warnings from the preprocessor as errors. AC_DEFUN([AC_PROG_CPP_WERROR], [AC_REQUIRE([AC_PROG_CPP])dnl ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR # AC_LANG_COMPILER(C) # ------------------- # Find the C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(C)], [AC_REQUIRE([AC_PROG_CC])]) # ac_cv_prog_gcc # -------------- # We used to name the cache variable this way. AU_DEFUN([ac_cv_prog_gcc], [ac_cv_c_compiler_gnu]) # AC_PROG_CC([COMPILER ...]) # -------------------------- # COMPILER ... is a space separated list of C compilers to search for. # This just gives the user an opportunity to specify an alternative # search list for the C compiler. AN_MAKEVAR([CC], [AC_PROG_CC]) AN_PROGRAM([cc], [AC_PROG_CC]) AN_PROGRAM([gcc], [AC_PROG_CC]) AC_DEFUN([AC_PROG_CC], [AC_LANG_PUSH(C)dnl AC_ARG_VAR([CC], [C compiler command])dnl AC_ARG_VAR([CFLAGS], [C compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl _AC_ARG_VAR_CPPFLAGS()dnl m4_ifval([$1], [AC_CHECK_TOOLS(CC, [$1])], [AC_CHECK_TOOL(CC, gcc) if test -z "$CC"; then AC_CHECK_TOOL(CC, cc) fi if test -z "$CC"; then AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) fi if test -z "$CC"; then AC_CHECK_TOOLS(CC, cl) fi ]) test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` _AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) _AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) _AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl _AC_LANG_COMPILER_GNU GCC=`test $ac_compiler_gnu = yes && echo yes` _AC_PROG_CC_G _AC_PROG_CC_STDC # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. _AC_COMPILE_IFELSE([@%:@ifndef __cplusplus choke me @%:@endif], [_AC_PROG_CXX_EXIT_DECLARATION]) AC_LANG_POP(C)dnl ])# AC_PROG_CC # _AC_PROG_CC_G # ------------- # Check whether -g works, even if CFLAGS is set, in case the package # plays around with CFLAGS (such as to build both debugging and normal # versions of a library), tasteless as that idea is. m4_define([_AC_PROG_CC_G], [ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" AC_CACHE_CHECK(whether $CC accepts -g, ac_cv_prog_cc_g, [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_cc_g=yes], [ac_cv_prog_cc_g=no])]) if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi[]dnl ])# _AC_PROG_CC_G # AC_PROG_GCC_TRADITIONAL # ----------------------- AN_FUNCTION([ioctl], [AC_PROG_GCC_TRADITIONAL]) AC_DEFUN([AC_PROG_GCC_TRADITIONAL], [if test $ac_cv_c_compiler_gnu = yes; then AC_CACHE_CHECK(whether $CC needs -traditional, ac_cv_prog_gcc_traditional, [ ac_pattern="Autoconf.*'x'" AC_EGREP_CPP($ac_pattern, [#include Autoconf TIOCGETP], ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no) if test $ac_cv_prog_gcc_traditional = no; then AC_EGREP_CPP($ac_pattern, [#include Autoconf TCGETA], ac_cv_prog_gcc_traditional=yes) fi]) if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi fi ])# AC_PROG_GCC_TRADITIONAL # AC_PROG_CC_C_O # -------------- AC_DEFUN([AC_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])dnl if test "x$CC" != xcc; then AC_MSG_CHECKING([whether $CC and cc understand -c and -o together]) else AC_MSG_CHECKING([whether cc understands -c and -o together]) fi set dummy $CC; ac_cc=`echo $[2] | sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'` AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&AS_MESSAGE_LOG_FD' if AC_TRY_EVAL(ac_try) && test -f conftest.$ac_objext && AC_TRY_EVAL(ac_try); then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if AC_TRY_COMMAND(cc -c conftest.$ac_ext >&AS_MESSAGE_LOG_FD); then ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&AS_MESSAGE_LOG_FD' if AC_TRY_EVAL(ac_try) && test -f conftest.$ac_objext && AC_TRY_EVAL(ac_try); then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f conftest* ])dnl if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_DEFINE(NO_MINUS_C_MINUS_O, 1, [Define to 1 if your C compiler doesn't accept -c and -o together.]) fi ])# AC_PROG_CC_C_O # ---------------------- # # 3c. The C++ compiler. # # ---------------------- # # AC_LANG_PREPROC(C++) # --------------------- # Find the C++ preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_PREPROC(C++)], [AC_REQUIRE([AC_PROG_CXXCPP])]) # AC_PROG_CXXCPP # -------------- # Find a working C++ preprocessor. # We shouldn't have to require AC_PROG_CC, but this is due to the concurrency # between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CXX. AC_DEFUN([AC_PROG_CXXCPP], [AC_REQUIRE([AC_PROG_CXX])dnl AC_ARG_VAR([CXXCPP], [C++ preprocessor])dnl _AC_ARG_VAR_CPPFLAGS()dnl AC_LANG_PUSH(C++)dnl AC_MSG_CHECKING([how to run the C++ preprocessor]) if test -z "$CXXCPP"; then AC_CACHE_VAL(ac_cv_prog_CXXCPP, [dnl # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do _AC_PROG_PREPROC_WORKS_IFELSE([break]) done ac_cv_prog_CXXCPP=$CXXCPP ])dnl CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi AC_MSG_RESULT([$CXXCPP]) _AC_PROG_PREPROC_WORKS_IFELSE([], [AC_MSG_FAILURE([C++ preprocessor "$CXXCPP" fails sanity check])]) AC_SUBST(CXXCPP)dnl AC_LANG_POP(C++)dnl ])# AC_PROG_CXXCPP # AC_LANG_COMPILER(C++) # --------------------- # Find the C++ compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. AC_DEFUN([AC_LANG_COMPILER(C++)], [AC_REQUIRE([AC_PROG_CXX])]) # ac_cv_prog_gxx # -------------- # We used to name the cache variable this way. AU_DEFUN([ac_cv_prog_gxx], [ac_cv_cxx_compiler_gnu]) # AC_PROG_CXX([LIST-OF-COMPILERS]) # -------------------------------- # LIST-OF-COMPILERS is a space separated list of C++ compilers to search # for (if not specified, a default list is used). This just gives the # user an opportunity to specify an alternative search list for the C++ # compiler. # aCC HP-UX C++ compiler much better than `CC', so test before. # FCC Fujitsu C++ compiler # KCC KAI C++ compiler # RCC Rational C++ # xlC_r AIX C Set++ (with support for reentrant code) # xlC AIX C Set++ AN_MAKEVAR([CXX], [AC_PROG_CXX]) AN_PROGRAM([CC], [AC_PROG_CXX]) AN_PROGRAM([c++], [AC_PROG_CXX]) AN_PROGRAM([g++], [AC_PROG_CXX]) AC_DEFUN([AC_PROG_CXX], [AC_LANG_PUSH(C++)dnl AC_ARG_VAR([CXX], [C++ compiler command])dnl AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl _AC_ARG_VAR_CPPFLAGS()dnl AC_CHECK_TOOLS(CXX, [$CCC m4_default([$1], [g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC])], g++) # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` _AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) _AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) _AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl _AC_LANG_COMPILER_GNU GXX=`test $ac_compiler_gnu = yes && echo yes` _AC_PROG_CXX_G _AC_PROG_CXX_EXIT_DECLARATION AC_LANG_POP(C++)dnl ])# AC_PROG_CXX # _AC_PROG_CXX_G # -------------- # Check whether -g works, even if CXXFLAGS is set, in case the package # plays around with CXXFLAGS (such as to build both debugging and # normal versions of a library), tasteless as that idea is. m4_define([_AC_PROG_CXX_G], [ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" AC_CACHE_CHECK(whether $CXX accepts -g, ac_cv_prog_cxx_g, [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ac_cv_prog_cxx_g=yes], [ac_cv_prog_cxx_g=no])]) if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi[]dnl ])# _AC_PROG_CXX_G # _AC_PROG_CXX_EXIT_DECLARATION # ----------------------------- # If doesn't already provide a valid prototype for exit, # determine the appropriate prototype and put it in confdefs.h. # This macro is run only when testing a C++ compiler, but it generates # a prototype that is also appropriate for C compilers in order to # support a mixed C/C++ configuration environment. # We don't need to worry about this for C, since we include # if it is available, and that method works for all C compilers. m4_define([_AC_PROG_CXX_EXIT_DECLARATION], [for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration @%:@include ], [exit (42);])], [], [continue]) _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration], [exit (42);])], [break]) done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ])# _AC_PROG_CXX_EXIT_DECLARATION ## ------------------------------- ## ## 4. Compilers' characteristics. ## ## ------------------------------- ## # -------------------------------- # # 4b. C compiler characteristics. # # -------------------------------- # # _AC_PROG_CC_STDC # ---------------- # If the C compiler in not in ANSI C mode by default, try to add an # option to output variable @code{CC} to make it so. This macro tries # various options that select ANSI C on some system or another. It # considers the compiler to be in ANSI C mode if it handles function # prototypes correctly. AC_DEFUN([_AC_PROG_CC_STDC], [AC_MSG_CHECKING([for $CC option to accept ANSI C]) AC_CACHE_VAL(ac_cv_prog_cc_stdc, [ac_cv_prog_cc_stdc=no ac_save_CC=$CC AC_LANG_CONFTEST([AC_LANG_PROGRAM( [[#include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv;]], [[return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];]])]) # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_stdc=$ac_arg break]) done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC ]) case "x$ac_cv_prog_cc_stdc" in x|xno) AC_MSG_RESULT([none needed]) ;; *) AC_MSG_RESULT([$ac_cv_prog_cc_stdc]) CC="$CC $ac_cv_prog_cc_stdc" ;; esac ])# _AC_PROG_CC_STDC # AC_PROG_CC_STDC # --------------- # Has been merged into AC_PROG_CC. AU_DEFUN([AC_PROG_CC_STDC], []) # AC_C_BACKSLASH_A # ---------------- AC_DEFUN([AC_C_BACKSLASH_A], [ AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[ #if '\a' == 'a' syntax error; #endif char buf['\a' == 'a' ? -1 : 1]; buf[0] = '\a'; return buf[0] != "\a"[0]; ]])], [ac_cv_c_backslash_a=yes], [ac_cv_c_backslash_a=no])]) if test $ac_cv_c_backslash_a = yes; then AC_DEFINE(HAVE_C_BACKSLASH_A, 1, [Define if backslash-a works in C strings.]) fi ]) # AC_C_CROSS # ---------- # Has been merged into AC_PROG_CC. AU_DEFUN([AC_C_CROSS], []) # AC_C_CHAR_UNSIGNED # ------------------ AC_DEFUN([AC_C_CHAR_UNSIGNED], [AH_VERBATIM([__CHAR_UNSIGNED__], [/* Define to 1 if type `char' is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ # undef __CHAR_UNSIGNED__ #endif])dnl AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned, [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT([])], [((char) -1) < 0])], ac_cv_c_char_unsigned=no, ac_cv_c_char_unsigned=yes)]) if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then AC_DEFINE(__CHAR_UNSIGNED__) fi ])# AC_C_CHAR_UNSIGNED # AC_C_LONG_DOUBLE # ---------------- AC_DEFUN([AC_C_LONG_DOUBLE], [AC_CACHE_CHECK( [for working long double with more range or precision than double], [ac_cv_c_long_double], [AC_COMPILE_IFELSE( [AC_LANG_BOOL_COMPILE_TRY( [#include long double foo = 0.0;], [/* Using '|' rather than '||' catches a GCC 2.95.2 x86 bug. */ (DBL_MAX < LDBL_MAX) | (LDBL_EPSILON < DBL_EPSILON) | (DBL_MAX_EXP < LDBL_MAX_EXP) | (DBL_MANT_DIG < LDBL_MANT_DIG)])], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)]) if test $ac_cv_c_long_double = yes; then AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define to 1 if long double works and has more range or precision than double.]) fi ])# AC_C_LONG_DOUBLE # AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN]) # ------------------------------------------------------------------------- AC_DEFUN([AC_C_BIGENDIAN], [AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, [# See if sys/param.h defines the BYTE_ORDER macro. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN bogus endian macros #endif ])], [# It does; now see whether it defined to BIG_ENDIAN or not. AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include #include ], [#if BYTE_ORDER != BIG_ENDIAN not big endian #endif ])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])], [# It does not; compile a test program. AC_RUN_IFELSE( [AC_LANG_SOURCE([[int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long l; char c[sizeof (long)]; } u; u.l = 1; exit (u.c[sizeof (long) - 1] == 1); }]])], [ac_cv_c_bigendian=no], [ac_cv_c_bigendian=yes], [# try to guess the endianness by grepping values into an object file ac_cv_c_bigendian=unknown AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }]], [[ _ascii (); _ebcdic (); ]])], [if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi])])])]) case $ac_cv_c_bigendian in yes) m4_default([$1], [AC_DEFINE([WORDS_BIGENDIAN], 1, [Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX).])]) ;; no) $2 ;; *) m4_default([$3], [AC_MSG_ERROR([unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help])]) ;; esac ])# AC_C_BIGENDIAN # AC_C_INLINE # ----------- # Do nothing if the compiler accepts the inline keyword. # Otherwise define inline to __inline__ or __inline if one of those work, # otherwise define inline to be empty. # # HP C version B.11.11.04 doesn't allow a typedef as the return value for an # inline function, only builtin types. # AN_IDENTIFIER([inline], [AC_C_INLINE]) AC_DEFUN([AC_C_INLINE], [AC_CACHE_CHECK([for inline], ac_cv_c_inline, [ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do AC_COMPILE_IFELSE([AC_LANG_SOURCE( [#ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif ])], [ac_cv_c_inline=$ac_kw; break]) done ]) AH_VERBATIM([inline], [/* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ])# AC_C_INLINE # AC_C_CONST # ---------- AN_IDENTIFIER([const], [AC_C_CONST]) AC_DEFUN([AC_C_CONST], [AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[/* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ]])], [ac_cv_c_const=yes], [ac_cv_c_const=no])]) if test $ac_cv_c_const = no; then AC_DEFINE(const,, [Define to empty if `const' does not conform to ANSI C.]) fi ])# AC_C_CONST # AC_C_RESTRICT # ------------- # based on acx_restrict.m4, from the GNU Autoconf Macro Archive at: # http://www.gnu.org/software/ac-archive/htmldoc/acx_restrict.html # # Determine whether the C/C++ compiler supports the "restrict" keyword # introduced in ANSI C99, or an equivalent. Do nothing if the compiler # accepts it. Otherwise, if the compiler supports an equivalent, # define "restrict" to be that. Here are some variants: # - GCC supports both __restrict and __restrict__ # - older DEC Alpha C compilers support only __restrict # - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C # Otherwise, define "restrict" to be empty. AN_IDENTIFIER([restrict], [AC_C_RESTRICT]) AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict, [ac_cv_c_restrict=no # Try the official restrict keyword, then gcc's __restrict, and # the less common variants. for ac_kw in restrict __restrict __restrict__ _Restrict; do AC_COMPILE_IFELSE([AC_LANG_SOURCE( [float * $ac_kw x;])], [ac_cv_c_restrict=$ac_kw; break]) done ]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE(restrict,, [Define to equivalent of C99 restrict keyword, or to nothing if this is not supported. Do not define if restrict is supported directly.]) ;; *) AC_DEFINE_UNQUOTED(restrict, $ac_cv_c_restrict) ;; esac ])# AC_C_RESTRICT # AC_C_VOLATILE # ------------- # Note that, unlike const, #defining volatile to be the empty string can # actually turn a correct program into an incorrect one, since removing # uses of volatile actually grants the compiler permission to perform # optimizations that could break the user's code. So, do not #define # volatile away unless it is really necessary to allow the user's code # to compile cleanly. Benign compiler failures should be tolerated. AN_IDENTIFIER([volatile], [AC_C_VOLATILE]) AC_DEFUN([AC_C_VOLATILE], [AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ volatile int x; int * volatile y;])], [ac_cv_c_volatile=yes], [ac_cv_c_volatile=no])]) if test $ac_cv_c_volatile = no; then AC_DEFINE(volatile,, [Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care.]) fi ])# AC_C_VOLATILE # AC_C_STRINGIZE # -------------- # Checks if `#' can be used to glue strings together at the CPP level. # Defines HAVE_STRINGIZE if positive. AC_DEFUN([AC_C_STRINGIZE], [AC_CACHE_CHECK([for preprocessor stringizing operator], [ac_cv_c_stringize], [AC_EGREP_CPP([@%:@teststring], [@%:@define x(y) #y char *s = x(teststring);], [ac_cv_c_stringize=no], [ac_cv_c_stringize=yes])]) if test $ac_cv_c_stringize = yes; then AC_DEFINE(HAVE_STRINGIZE, 1, [Define to 1 if cpp supports the ANSI @%:@ stringizing operator.]) fi ])# AC_C_STRINGIZE # AC_C_PROTOTYPES # --------------- # Check if the C compiler supports prototypes, included if it needs # options. AC_DEFUN([AC_C_PROTOTYPES], [AC_REQUIRE([AC_PROG_CC])dnl AC_MSG_CHECKING([for function prototypes]) if test "$ac_cv_prog_cc_stdc" != no; then AC_MSG_RESULT([yes]) AC_DEFINE(PROTOTYPES, 1, [Define to 1 if the C compiler supports function prototypes.]) AC_DEFINE(__PROTOTYPES, 1, [Define like PROTOTYPES; this can be used by system headers.]) else AC_MSG_RESULT([no]) fi ])# AC_C_PROTOTYPES autoconf2.59-2.59+dfsg/lib/autoconf/specific.m40000644000175000017500000003434207727310563020473 0ustar taffittaffit# This file is part of Autoconf. -*- Autoconf -*- # Macros that test for specific, unclassified, features. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # # As a special exception, the Free Software Foundation gives unlimited # permission to copy, distribute and modify the configure scripts that # are the output of Autoconf. You need not follow the terms of the GNU # General Public License when using or distributing such scripts, even # though portions of the text of Autoconf appear in them. The GNU # General Public License (GPL) does govern all other use of the material # that constitutes the Autoconf program. # # Certain portions of the Autoconf source text are designed to be copied # (in certain cases, depending on the input) into the output of # Autoconf. We call these the "data" portions. The rest of the Autoconf # source text consists of comments plus executable code that decides which # of the data portions to output in any given case. We call these # comments and executable code the "non-data" portions. Autoconf never # copies any of the non-data portions into its output. # # This special exception to the GPL applies to versions of Autoconf # released by the Free Software Foundation. When you make and # distribute a modified version of Autoconf, you may extend this special # exception to the GPL to apply to your modified version as well, *unless* # your modified version has the potential to copy into its output some # of the text that was the non-data portion of the version that you started # with. (In other words, unless your change moves or copies text from # the non-data portions to the data portions.) If your modification has # such potential, you must delete any notice of this special exception # to the GPL from your modified version. # # Written by David MacKenzie, with help from # Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, # Roland McGrath, Noah Friedman, david d zuhn, and many others. ## ------------------------- ## ## Checks for declarations. ## ## ------------------------- ## # AC_DECL_SYS_SIGLIST # ------------------- AN_IDENTIFIER([sys_siglist], [AC_CHECK_DECLS([sys_siglist])]) AU_DEFUN([AC_DECL_SYS_SIGLIST], [AC_CHECK_DECLS([sys_siglist],,, [#include /* NetBSD declares sys_siglist in unistd.h. */ #if HAVE_UNISTD_H # include #endif ]) ])# AC_DECL_SYS_SIGLIST ## -------------------------------------- ## ## Checks for operating system services. ## ## -------------------------------------- ## # AC_SYS_INTERPRETER # ------------------ AC_DEFUN([AC_SYS_INTERPRETER], [AC_CACHE_CHECK(whether @%:@! works in shell scripts, ac_cv_sys_interpreter, [echo '#! /bin/cat exit 69 ' >conftest chmod u+x conftest (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null) if test $? -ne 69; then ac_cv_sys_interpreter=yes else ac_cv_sys_interpreter=no fi rm -f conftest]) interpval=$ac_cv_sys_interpreter ]) AU_DEFUN([AC_HAVE_POUNDBANG], [AC_SYS_INTERPRETER AC_DIAGNOSE([obsolete], [$0: Remove this warning when you adjust your code to use `AC_SYS_INTERPRETER'.])]) AU_DEFUN([AC_ARG_ARRAY], [AC_DIAGNOSE([obsolete], [$0: no longer implemented: don't do unportable things with arguments. Remove this warning when you adjust your code.])]) # _AC_SYS_LARGEFILE_TEST_INCLUDES # ------------------------------- m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [@%:@include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ @%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]];[]dnl ]) # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, # CACHE-VAR, # DESCRIPTION, # [INCLUDES], [FUNCTION-BODY]) # ---------------------------------------------------------- m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_CACHE_CHECK([for $1 value needed for large files], [$3], [while :; do $3=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$5], [$6])], [break]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@define $1 $2 $5], [$6])], [$3=$2; break]) break done]) if test "$$3" != no; then AC_DEFINE_UNQUOTED([$1], [$$3], [$4]) fi rm -f conftest*[]dnl ])# _AC_SYS_LARGEFILE_MACRO_VALUE # AC_SYS_LARGEFILE # ---------------- # By default, many hosts won't let programs access large files; # one must use special compiler options to get large-file access to work. # For more details about this brain damage please see: # http://www.unix-systems.org/version2/whatsnew/lfs20mar.html AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files]) if test "$enable_largefile" != no; then AC_CACHE_CHECK([for special C compiler options needed for large files], ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) AC_COMPILE_IFELSE([], [break]) CC="$CC -n32" AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) break done CC=$ac_save_CC rm -f conftest.$ac_ext fi]) if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, ac_cv_sys_large_files, [Define for large files, on AIX-style hosts.], [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi ])# AC_SYS_LARGEFILE # AC_SYS_LONG_FILE_NAMES # ---------------------- # Security: use a temporary directory as the most portable way of # creating files in /tmp securely. Removing them leaves a race # condition, set -C is not portably guaranteed to use O_EXCL, so still # leaves a race, and not all systems have the `mktemp' utility. We # still test for existence first in case of broken systems where the # mkdir succeeds even when the directory exists. Broken systems may # retain a race, but they probably have other security problems # anyway; this should be secure on well-behaved systems. In any case, # use of `mktemp' is probably inappropriate here since it would fail in # attempting to create different file names differing after the 14th # character on file systems without long file names. AC_DEFUN([AC_SYS_LONG_FILE_NAMES], [AC_CACHE_CHECK(for long file names, ac_cv_sys_long_file_names, [ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: # . the current directory, where building will happen # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # eval it to expand exec_prefix. # $TMPDIR if set, where it might want to write temporary files # if $TMPDIR is not set: # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then ac_tmpdirs=$TMPDIR else ac_tmpdirs='/tmp /var/tmp /usr/tmp' fi for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do test -d $ac_dir || continue test -w $ac_dir || continue # It is less confusing to not echo anything here. ac_xdir=$ac_dir/cf$$ (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue ac_tf1=$ac_xdir/conftest9012345 ac_tf2=$ac_xdir/conftest9012346 (echo 1 >$ac_tf1) 2>/dev/null (echo 2 >$ac_tf2) 2>/dev/null ac_val=`cat $ac_tf1 2>/dev/null` if test ! -f $ac_tf1 || test "$ac_val" != 1; then ac_cv_sys_long_file_names=no rm -rf $ac_xdir 2>/dev/null break fi rm -rf $ac_xdir 2>/dev/null done]) if test $ac_cv_sys_long_file_names = yes; then AC_DEFINE(HAVE_LONG_FILE_NAMES, 1, [Define to 1 if you support file names longer than 14 characters.]) fi ]) # AC_SYS_RESTARTABLE_SYSCALLS # --------------------------- # If the system automatically restarts a system call that is # interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'. AC_DEFUN([AC_SYS_RESTARTABLE_SYSCALLS], [AC_DIAGNOSE([obsolete], [$0: AC_SYS_RESTARTABLE_SYSCALLS is useful only when supporting very old systems that lack `sigaction' and `SA_RESTART'. Don't bother with this macro unless you need to support very old systems like 4.2BSD and SVR3.])dnl AC_REQUIRE([AC_HEADER_SYS_WAIT])dnl AC_CHECK_HEADERS(unistd.h) AC_CACHE_CHECK(for restartable system calls, ac_cv_sys_restartable_syscalls, [AC_RUN_IFELSE([AC_LANG_SOURCE( [/* Exit 0 (true) if wait returns something other than -1, i.e. the pid of the child, which means that wait was restarted after getting the signal. */ #include #include #if HAVE_UNISTD_H # include #endif #if HAVE_SYS_WAIT_H # include #endif /* Some platforms explicitly require an extern "C" signal handler when using C++. */ #ifdef __cplusplus extern "C" void ucatch (int dummy) { } #else void ucatch (dummy) int dummy; { } #endif int main () { int i = fork (), status; if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } signal (SIGINT, ucatch); status = wait (&i); if (status == -1) wait (&i); exit (status == -1); }])], [ac_cv_sys_restartable_syscalls=yes], [ac_cv_sys_restartable_syscalls=no])]) if test $ac_cv_sys_restartable_syscalls = yes; then AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS, 1, [Define to 1 if system calls automatically restart after interruption by a signal.]) fi ])# AC_SYS_RESTARTABLE_SYSCALLS # AC_SYS_POSIX_TERMIOS # -------------------- AC_DEFUN([AC_SYS_POSIX_TERMIOS], [AC_CACHE_CHECK([POSIX termios], ac_cv_sys_posix_termios, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include #include #include ]], [/* SunOS 4.0.3 has termios.h but not the library calls. */ tcgetattr(0, 0);])], ac_cv_sys_posix_termios=yes, ac_cv_sys_posix_termios=no)]) ])# AC_SYS_POSIX_TERMIOS ## ------------------------------------ ## ## Checks for not-quite-Unix variants. ## ## ------------------------------------ ## # AC_GNU_SOURCE # -------------- AC_DEFUN([AC_GNU_SOURCE], [AH_VERBATIM([_GNU_SOURCE], [/* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif])dnl AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_DEFINE([_GNU_SOURCE]) ]) # AC_CYGWIN # --------- # Check for Cygwin. This is a way to set the right value for # EXEEXT. AU_DEFUN([AC_CYGWIN], [AC_CANONICAL_HOST AC_DIAGNOSE([obsolete], [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl case $host_os in *cygwin* ) CYGWIN=yes;; * ) CYGWIN=no;; esac ])# AC_CYGWIN # AC_EMXOS2 # --------- # Check for EMX on OS/2. This is another way to set the right value # for EXEEXT. AU_DEFUN([AC_EMXOS2], [AC_CANONICAL_HOST AC_DIAGNOSE([obsolete], [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl case $host_os in *emx* ) EMXOS2=yes;; * ) EMXOS2=no;; esac ])# AC_EMXOS2 # AC_MINGW32 # ---------- # Check for mingw32. This is another way to set the right value for # EXEEXT. AU_DEFUN([AC_MINGW32], [AC_CANONICAL_HOST AC_DIAGNOSE([obsolete], [$0 is obsolete: use AC_CANONICAL_HOST and $host_os])dnl case $host_os in *mingw32* ) MINGW32=yes;; * ) MINGW32=no;; esac ])# AC_MINGW32 ## -------------------------- ## ## Checks for UNIX variants. ## ## -------------------------- ## # These are kludges which should be replaced by a single POSIX check. # They aren't cached, to discourage their use. # AC_AIX # ------ AC_DEFUN([AC_AIX], [AH_VERBATIM([_ALL_SOURCE], [/* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ @%:@ifndef _ALL_SOURCE @%:@ undef _ALL_SOURCE @%:@endif])dnl AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_MSG_CHECKING([for AIX]) AC_EGREP_CPP(yes, [#ifdef _AIX yes #endif ], [AC_MSG_RESULT([yes]) AC_DEFINE(_ALL_SOURCE)], [AC_MSG_RESULT([no])]) ])# AC_AIX # AC_MINIX # -------- AC_DEFUN([AC_MINIX], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_CHECK_HEADER(minix/config.h, MINIX=yes, MINIX=) if test "$MINIX" = yes; then AC_DEFINE(_POSIX_SOURCE, 1, [Define to 1 if you need to in order for `stat' and other things to work.]) AC_DEFINE(_POSIX_1_SOURCE, 2, [Define to 2 if the system does not provide POSIX.1 features except with this defined.]) AC_DEFINE(_MINIX, 1, [Define to 1 if on MINIX.]) fi ])# AC_MINIX # AC_ISC_POSIX # ------------ AC_DEFUN([AC_ISC_POSIX], [AC_SEARCH_LIBS(strerror, cposix)]) # AC_XENIX_DIR # ------------ AU_DEFUN(AC_XENIX_DIR, [# You shouldn't need to depend upon XENIX. Remove this test if useless. AC_MSG_CHECKING([for Xenix]) AC_EGREP_CPP(yes, [#if defined(M_XENIX) && !defined(M_UNIX) yes @%:@endif], [AC_MSG_RESULT([yes]); XENIX=yes], [AC_MSG_RESULT([no]); XENIX=]) AC_HEADER_DIRENT[]dnl ]) # AC_DYNIX_SEQ # ------------ AU_DEFUN([AC_DYNIX_SEQ], [AC_FUNC_GETMNTENT]) # AC_IRIX_SUN # ----------- AU_DEFUN([AC_IRIX_SUN], [AC_FUNC_GETMNTENT AC_CHECK_LIB(sun, getpwnam)]) # AC_SCO_INTL # ----------- AU_DEFUN([AC_SCO_INTL], [AC_FUNC_STRFTIME]) autoconf2.59-2.59+dfsg/lib/autoscan/0000755000175000017500000000000007752722361016436 5ustar taffittaffitautoconf2.59-2.59+dfsg/lib/autoscan/Makefile.am0000644000175000017500000000330407556257420020473 0ustar taffittaffit## Process this file with automake to create Makefile.in ## Copyright 2001, 2002 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 ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. autoscanlibdir = $(pkgdatadir)/autoscan EXTRA_DIST = autoscan.pre nodist_autoscanlib_DATA = autoscan.list CLEANFILES = autoscan.list ## ------------------------ ## ## Building autoscan.list. ## ## ------------------------ ## ## autoscan.list might change when autoconf.m4f sources change. ## Therefore we want the same dependencies as autoconf.m4f, which ## are listed in freeze.mk. It also ensure that tests/autom4te ## is built (we need it in the command below). include ../freeze.mk autoscan.list: $(srcdir)/autoscan.pre $(autoconf_m4f_dependencies) Makefile.am echo '# Automatically Generated: do not edit this file' >autoscan.list sed '/^[#]/!q' $(srcdir)/autoscan.pre >>autoscan.list ( \ sed -n '/^[^#]/p' $(srcdir)/autoscan.pre; \ $(MY_AUTOM4TE) --cache '' -M -l autoconf -t'AN_OUTPUT:$$1: $$2 $$3' \ ) | LC_ALL=C sort >>autoscan.list autoconf2.59-2.59+dfsg/lib/autoscan/Makefile.in0000644000175000017500000002734107752412547020514 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : DIST_COMMON = $(srcdir)/../freeze.mk $(srcdir)/Makefile.in Makefile.am subdir = lib/autoscan ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__installdirs = $(DESTDIR)$(autoscanlibdir) nodist_autoscanlibDATA_INSTALL = $(INSTALL_DATA) DATA = $(nodist_autoscanlib_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ autoscanlibdir = $(pkgdatadir)/autoscan EXTRA_DIST = autoscan.pre nodist_autoscanlib_DATA = autoscan.list CLEANFILES = autoscan.list SUFFIXES = .m4 .m4f # Do not use AUTOM4TE here, since Makefile.maint (my-distcheck) # checks if we are independent of Autoconf by defining AUTOM4TE (and # others) to `false'. But we _ship_ tests/autom4te, so it doesn't # apply to us. MY_AUTOM4TE = $(top_builddir)/tests/autom4te AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg # Factor the dependencies between all the frozen files. # Some day we should explain to Automake how to use autom4te to compute # the dependencies... src_libdir = $(top_srcdir)/lib build_libdir = $(top_builddir)/lib m4f_dependencies = $(MY_AUTOM4TE) $(AUTOM4TE_CFG) m4sugar_m4f_dependencies = \ $(m4f_dependencies) \ $(src_libdir)/m4sugar/m4sugar.m4 \ $(build_libdir)/m4sugar/version.m4 m4sh_m4f_dependencies = \ $(m4sugar_m4f_dependencies) \ $(src_libdir)/m4sugar/m4sh.m4 autotest_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autotest/autotest.m4 \ $(src_libdir)/autotest/general.m4 autoconf_m4f_dependencies = \ $(m4sh_m4f_dependencies) \ $(src_libdir)/autoconf/autoscan.m4 \ $(src_libdir)/autoconf/general.m4 \ $(src_libdir)/autoconf/autoheader.m4 \ $(src_libdir)/autoconf/autoupdate.m4 \ $(src_libdir)/autoconf/autotest.m4 \ $(src_libdir)/autoconf/status.m4 \ $(src_libdir)/autoconf/oldnames.m4 \ $(src_libdir)/autoconf/specific.m4 \ $(src_libdir)/autoconf/lang.m4 \ $(src_libdir)/autoconf/c.m4 \ $(src_libdir)/autoconf/fortran.m4 \ $(src_libdir)/autoconf/functions.m4 \ $(src_libdir)/autoconf/headers.m4 \ $(src_libdir)/autoconf/types.m4 \ $(src_libdir)/autoconf/libs.m4 \ $(src_libdir)/autoconf/programs.m4 \ $(src_libdir)/autoconf/autoconf.m4 ETAGS_FOR_M4 = \ --lang=none \ --regex='/\(m4_define\|define\)(\[\([^]]*\)\]/\2/' ETAGS_FOR_M4SUGAR = \ $(ETAGS_FOR_M4) \ --regex='/m4_defun(\[\([^]]*\)\]/\1/' ETAGS_FOR_AUTOCONF = \ $(ETAGS_FOR_M4SUGAR) \ --regex='/\(A[CU]_DEFUN\|AU_ALIAS\)(\[\([^]]*\)\]/\2/' \ --regex='/AN_\(FUNCTION\|HEADER\|IDENTIFIER\|LIBRARY\|MAKEVAR\|PROGRAM\)(\[\([^]]*\)\]/\2/' all: all-am .SUFFIXES: .SUFFIXES: .m4 .m4f $(srcdir)/Makefile.in: Makefile.am $(srcdir)/../freeze.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/autoscan/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/autoscan/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-nodist_autoscanlibDATA: $(nodist_autoscanlib_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(autoscanlibdir) @list='$(nodist_autoscanlib_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(nodist_autoscanlibDATA_INSTALL) $$d$$p $(DESTDIR)$(autoscanlibdir)/$$f"; \ $(nodist_autoscanlibDATA_INSTALL) $$d$$p $(DESTDIR)$(autoscanlibdir)/$$f; \ done uninstall-nodist_autoscanlibDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_autoscanlib_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(autoscanlibdir)/$$f"; \ rm -f $(DESTDIR)$(autoscanlibdir)/$$f; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/.. @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: $(mkinstalldirs) $(DESTDIR)$(autoscanlibdir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-nodist_autoscanlibDATA install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-nodist_autoscanlibDATA .PHONY: all all-am check check-am clean clean-generic distclean \ distclean-generic distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-nodist_autoscanlibDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ uninstall-nodist_autoscanlibDATA $(MY_AUTOM4TE): $(top_srcdir)/tests/wrapper.in cd $(top_builddir)/tests && $(MAKE) $(AM_MAKEFLAGS) autom4te $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg # When processing the file with diversion disabled, there must be no # output but comments and empty lines. # If freezing produces output, something went wrong: a bad `divert', # or an improper paren etc. # It may happen that the output does not end with a end of line, hence # force an end of line when reporting errors. .m4.m4f: $(MY_AUTOM4TE) \ --language=$* \ --freeze \ --output=$@ # For parallel builds. $(build_libdir)/m4sugar/version.m4: cd $(build_libdir)/m4sugar && $(MAKE) $(AM_MAKEFLAGS) version.m4 check-forbidden-patterns: if (cd $(srcdir) && \ grep $(forbidden_patterns) $(forbidden_patterns_files)) \ >forbidden.log; then \ echo "ERROR: forbidden patterns were found:" >&2; \ sed "s,^,$*.m4: ," &2; \ echo >&2; \ exit 1; \ else \ rm -f forbidden.log; \ fi autoscan.list: $(srcdir)/autoscan.pre $(autoconf_m4f_dependencies) Makefile.am echo '# Automatically Generated: do not edit this file' >autoscan.list sed '/^[#]/!q' $(srcdir)/autoscan.pre >>autoscan.list ( \ sed -n '/^[^#]/p' $(srcdir)/autoscan.pre; \ $(MY_AUTOM4TE) --cache '' -M -l autoconf -t'AN_OUTPUT:$$1: $$2 $$3' \ ) | LC_ALL=C sort >>autoscan.list # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/lib/autoscan/autoscan.pre0000644000175000017500000000152007564156653020767 0ustar taffittaffit# autoscan's mapping to Autoconf macros -*- Makefile -*- # Copyright (C) 1992, 1993, 1994, 1996, 1999, 2000, 2001, 2002 # 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. autoconf2.59-2.59+dfsg/lib/Makefile.in0000644000175000017500000003400107752412547016666 0ustar taffittaffit# Makefile.in generated by automake 1.7a from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/m4.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__installdirs = $(DESTDIR)$(pkgdatadir) nodist_pkgdataDATA_INSTALL = $(INSTALL_DATA) DATA = $(nodist_pkgdata_DATA) ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EMACS = @EMACS@ EMACSLOADPATH = @EMACSLOADPATH@ EXPR = @EXPR@ HELP2MAN = @HELP2MAN@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ M4 = @M4@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ TEST_EMACS = @TEST_EMACS@ VERSION = @VERSION@ ac_ct_STRIP = @ac_ct_STRIP@ am__leading_dot = @am__leading_dot@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ lispdir = @lispdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = Autom4te m4sugar autoconf autotest autoscan emacs nodist_pkgdata_DATA = autom4te.cfg EXTRA_DIST = autom4te.in freeze.mk edit = sed \ -e 's,@SHELL\@,$(SHELL),g' \ -e 's,@PERL\@,$(PERL),g' \ -e 's,@bindir\@,$(bindir),g' \ -e 's,@datadir\@,$(pkgdatadir),g' \ -e 's,@prefix\@,$(prefix),g' \ -e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \ -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \ -e 's,@autom4te-name\@,'`echo autom4te | sed '$(transform)'`',g' \ -e 's,@M4\@,$(M4),g' \ -e 's,@AWK\@,$(AWK),g' \ -e 's,@VERSION\@,$(VERSION),g' \ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' # All the files below depend on Makefile so that they are rebuilt # when the prefix, etc. changes. Unfortunately, suffix rules # cannot have additional dependencies, so we have to use explicit rules. CLEANFILES = autom4te.cfg all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu lib/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh uninstall-info-am: install-nodist_pkgdataDATA: $(nodist_pkgdata_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @list='$(nodist_pkgdata_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(nodist_pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f"; \ $(nodist_pkgdataDATA_INSTALL) $$d$$p $(DESTDIR)$(pkgdatadir)/$$f; \ done uninstall-nodist_pkgdataDATA: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgdata_DATA)'; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f $(DESTDIR)$(pkgdatadir)/$$f"; \ rm -f $(DESTDIR)$(pkgdatadir)/$$f; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || mkdir "$(distdir)/$$subdir" \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="../$(top_distdir)" \ distdir="../$(distdir)/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-nodist_pkgdataDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-nodist_pkgdataDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-recursive ctags ctags-recursive \ distclean distclean-generic distclean-recursive distclean-tags \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-nodist_pkgdataDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-nodist_pkgdataDATA autom4te.cfg: $(srcdir)/autom4te.in Makefile rm -f autom4te.cfg autom4te.tmp $(edit) $(srcdir)/autom4te.in >autom4te.tmp chmod -w autom4te.tmp mv autom4te.tmp autom4te.cfg # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: autoconf2.59-2.59+dfsg/lib/Autom4te/0000755000175000017500000000000007752722357016330 5ustar taffittaffitautoconf2.59-2.59+dfsg/lib/Autom4te/Channels.pm0000644000175000017500000004202607730302464020412 0ustar taffittaffit# Copyright (C) 2002 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 # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. package Autom4te::Channels; =head1 NAME Autom4te::Channels - support functions for error and warning management =head1 SYNOPSIS use Autom4te::Channels; # Register a channel to output warnings about unused variables. register_channel 'unused', type => 'warning'; # Register a channel for system errors. register_channel 'system', type => 'error', exit_code => 4; # Output a message on channel 'unused'. msg 'unused', "$file:$line", "unused variable `$var'"; # Make the 'unused' channel silent. setup_channel 'unused', silent => 1; # Turn on all channels of type 'warning'. setup_channel_type 'warning', silent => 0; # Treat all warnings as errors. $warnings_are_errors = 1; # Exit with the greater exist code encountered so far. exit $exit_code; =head1 DESCRIPTION This perl module provides support functions for handling diagnostic channels in programs. Channels can be registered to convey fatal, error, warning, or debug messages. Each channel has various options (e.g. is the channel silent, should duplicate messages be removed, etc.) that can also be overridden on a per-message basis. =cut use 5.005; use strict; use Exporter; use Carp; use File::Basename; use vars qw (@ISA @EXPORT %channels $me); @ISA = qw (Exporter); @EXPORT = qw ($exit_code $warnings_are_errors &reset_local_duplicates &reset_global_duplicates ®ister_channel &msg &exists_channel &channel_type &setup_channel &setup_channel_type &dup_channel_setup &drop_channel_setup &buffer_messages &flush_messages US_GLOBAL US_LOCAL UP_NONE UP_TEXT UP_LOC_TEXT); $me = basename $0; =head2 Global Variables =over 4 =item C<$exit_code> The greatest exit code seen so far. C<$exit_code> is updated from the C options of C and C channels. =cut use vars qw ($exit_code); $exit_code = 0; =item C<$warnings_are_errors> Set this variable to 1 if warning messages should be treated as errors (i.e. if they should update C<$exit_code>). =cut use vars qw ($warnings_are_errors); $warnings_are_errors = 0; =back =head2 Constants =over 4 =item C, C, C Possible values for the C options. This select the part of the message that should be considered when filtering out duplicates. If C is used, the location and the explanation message are used for filtering. If C is used, only the explanation message is used (so the same message will be filtered out if it appears at different locations). C means that duplicate messages should be output. =cut use constant UP_NONE => 0; use constant UP_TEXT => 1; use constant UP_LOC_TEXT => 2; =item C, C Possible values for the C options. Use C for error messages that should be printed only once in the run of the program, C for message that should be printed only once per file. (Actually, C does not now when files are changed, it relies on you calling C when this happens.) =cut # possible values for uniq_scope use constant US_LOCAL => 0; use constant US_GLOBAL => 1; =back =head2 Options Channels accept the options described below. These options can be passed as a hash to the C, C, and C functions. The possible keys, with there default value are: =over =item C 'warning'> The type of the channel. One of C<'debug'>, C<'warning'>, C<'error'>, or C<'fatal'>. Fatal messages abort the program when they are output. Error messages update the exit status. Debug and warning messages are harmless, except that warnings can be treated as errors of C<$warnings_are_errors> is set. =item C 1> The value to update C<$exit_code> with when a fatal or error message is emitted. C<$exit_code> is also updated for warnings output when @<$warnings_are_errors> is set. =item C \*STDERR> The file where the error should be output. =item C 0> Whether the channel should be silent. Use this do disable a category of warning, for instance. =item C UP_LOC_TEXT> The part of the message subject to duplicate filtering. See the documentation for the C, C, and C constants above. =item C US_LOCAL> The scope of duplicate filtering. See the documentation for the C, and C constants above. =item C
''> A string to prepend to each message emitted through this channel. =item C